Commit 7c754e6a authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dev_base_lock-remove'



Eric Dumazet says:

====================
net: complete dev_base_lock removal

Back in 2009 we started an effort to get rid of dev_base_lock
in favor of RCU.

It is time to finish this work.

Say goodbye to dev_base_lock !

v4: rebase, and move dev_addr_sem to net/core/dev.h in patch 06/13 (Jakub)

v3: I misread kbot reports, the issue was with dev->operstate (patch 10/13)
    So dev->reg_state is back to u8, and dev->operstate becomes an u32.
    Sorry for the noise.

v2: dev->reg_state must be a standard enum, some arches
    do not support cmpxchg() on u8.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b7f9ef72 1b3ef46c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -252,8 +252,8 @@ ndo_eth_ioctl:
	Context: process

ndo_get_stats:
	Synchronization: rtnl_lock() semaphore, dev_base_lock rwlock, or RCU.
	Context: atomic (can't sleep under rwlock or RCU)
	Synchronization: rtnl_lock() semaphore, or RCU.
	Context: atomic (can't sleep under RCU)

ndo_start_xmit:
	Synchronization: __netif_tx_lock spinlock.
+1 −1
Original line number Diff line number Diff line
@@ -872,7 +872,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
	return NETDEV_TX_OK;
}

/* dev_base_lock rwlock held, nominally process context */
/* rcu_read_lock potentially held, nominally process context */
static void enic_get_stats(struct net_device *netdev,
			   struct rtnl_link_stats64 *net_stats)
{
+2 −2
Original line number Diff line number Diff line
@@ -1761,7 +1761,7 @@ static void nv_get_stats(int cpu, struct fe_priv *np,
/*
 * nv_get_stats64: dev->ndo_get_stats64 function
 * Get latest stats value from the nic.
 * Called with read_lock(&dev_base_lock) held for read -
 * Called with rcu_read_lock() held -
 * only synchronized against unregister_netdevice.
 */
static void
@@ -3090,7 +3090,7 @@ static void set_bufsize(struct net_device *dev)

/*
 * nv_change_mtu: dev->change_mtu function
 * Called with dev_base_lock held for read.
 * Called with RTNL held for read.
 */
static int nv_change_mtu(struct net_device *dev, int new_mtu)
{
+1 −1
Original line number Diff line number Diff line
@@ -595,7 +595,7 @@ void efx_stop_all(struct efx_nic *efx)
	efx_stop_datapath(efx);
}

/* Context: process, dev_base_lock or RTNL held, non-blocking. */
/* Context: process, rcu_read_lock or RTNL held, non-blocking. */
void efx_net_stats(struct net_device *net_dev, struct rtnl_link_stats64 *stats)
{
	struct efx_nic *efx = efx_netdev_priv(net_dev);
+1 −1
Original line number Diff line number Diff line
@@ -2085,7 +2085,7 @@ int ef4_net_stop(struct net_device *net_dev)
	return 0;
}

/* Context: process, dev_base_lock or RTNL held, non-blocking. */
/* Context: process, rcu_read_lock or RTNL held, non-blocking. */
static void ef4_net_stats(struct net_device *net_dev,
			  struct rtnl_link_stats64 *stats)
{
Loading