: netdev: Add addr_list_lock to struct net_device.
Subsystems (2)
David Miller
maintainerPATCH 1/3 : netdev: Add addr_list_lock to struct net_device.
netdev: Add addr_list_lock to struct net_device.
This will be used to protect the per-device unicast and multicast address lists, as well as the callbacks into the drivers which configure such state such as ->set_rx_mode() and ->set_multicast_list().
Signed-off-by David S. Miller <[email protected]>
--- include/linux/netdevice.h | 1 + net/core/dev.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
include/linux/netdevice.h +1 -0
@@ -590,6 +590,7 @@ struct net_deviceunsigned char addr_len;/* hardware address length */ unsigned short dev_id;/* for shared network cards */ +spinlock_t addr_list_lock;struct dev_addr_list *uc_list;/* Secondary unicast mac addresses */ int uc_count;/* Number of installed ucasts */ int uc_promisc;
net/core/dev.c +1 -0
@@ -3784,6 +3784,7 @@ int register_netdevice(struct net_device *dev) net =dev_net (dev);spin_lock_init (&dev->queue_lock); +spin_lock_init (&dev->addr_list_lock);spin_lock_init (&dev->_xmit_lock);netdev_set_lockdep_class (&dev->_xmit_lock, dev->type); dev->xmit_lock_owner =-1 ;
Signature · 1 line
1.5.6