mirror of
https://github.com/torvalds/linux
synced 2024-09-06 09:51:23 +00:00
vlan: use netdev_lockdep_set_classes()
vlan uses vlan_dev_set_lockdep_class() which lacks qdisc_tx_busylock initialization. Use generic netdev_lockdep_set_classes() to not worry anymore. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20240212140700.2795436-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
88c9d07b96
commit
9a3c93af54
|
@ -504,28 +504,6 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
|
||||||
dev_uc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev);
|
dev_uc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* vlan network devices have devices nesting below it, and are a special
|
|
||||||
* "super class" of normal network devices; split their locks off into a
|
|
||||||
* separate class since they always nest.
|
|
||||||
*/
|
|
||||||
static struct lock_class_key vlan_netdev_xmit_lock_key;
|
|
||||||
static struct lock_class_key vlan_netdev_addr_lock_key;
|
|
||||||
|
|
||||||
static void vlan_dev_set_lockdep_one(struct net_device *dev,
|
|
||||||
struct netdev_queue *txq,
|
|
||||||
void *unused)
|
|
||||||
{
|
|
||||||
lockdep_set_class(&txq->_xmit_lock, &vlan_netdev_xmit_lock_key);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vlan_dev_set_lockdep_class(struct net_device *dev)
|
|
||||||
{
|
|
||||||
lockdep_set_class(&dev->addr_list_lock,
|
|
||||||
&vlan_netdev_addr_lock_key);
|
|
||||||
netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static __be16 vlan_parse_protocol(const struct sk_buff *skb)
|
static __be16 vlan_parse_protocol(const struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
|
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
|
||||||
|
@ -627,7 +605,7 @@ static int vlan_dev_init(struct net_device *dev)
|
||||||
|
|
||||||
SET_NETDEV_DEVTYPE(dev, &vlan_type);
|
SET_NETDEV_DEVTYPE(dev, &vlan_type);
|
||||||
|
|
||||||
vlan_dev_set_lockdep_class(dev);
|
netdev_lockdep_set_classes(dev);
|
||||||
|
|
||||||
vlan->vlan_pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats);
|
vlan->vlan_pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats);
|
||||||
if (!vlan->vlan_pcpu_stats)
|
if (!vlan->vlan_pcpu_stats)
|
||||||
|
|
Loading…
Reference in a new issue