Commit 5fc3903c authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'rtnetlink-reduce-rtnl-pressure'



Eric Dumazet says:

====================
rtnetlink: reduce RTNL pressure for dumps

This series restarts the conversion of rtnl dump operations
to RCU protection, instead of requiring RTNL.

In this new attempt (prior one failed in 2011), I chose to
allow a gradual conversion of selected operations.

After this series, "ip -6 addr" and "ip -4 ro" no longer
need to acquire RTNL.

I refrained from changing inet_dump_ifaddr() and inet6_dump_addr()
to avoid merge conflicts because of two fixes in net tree.

I also started the work for "ip link" future conversion.

v2: rtnl_fill_link_ifmap() always emit IFLA_MAP (Jiri Pirko)
    Added "nexthop: allow nexthop_mpath_fill_node()
           to be called without RTNL" to avoid a lockdep splat (Ido Schimmel)
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5f6000aa 0ec4e48c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1272,10 +1272,10 @@ static int ipoib_get_iflink(const struct net_device *dev)

	/* parent interface */
	if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags))
		return dev->ifindex;
		return READ_ONCE(dev->ifindex);

	/* child/vlan interface */
	return priv->parent->ifindex;
	return READ_ONCE(priv->parent->ifindex);
}

static u32 ipoib_addr_hash(struct ipoib_neigh_hash *htbl, u8 *daddr)
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ static int vxcan_get_iflink(const struct net_device *dev)

	rcu_read_lock();
	peer = rcu_dereference(priv->peer);
	iflink = peer ? peer->ifindex : 0;
	iflink = peer ? READ_ONCE(peer->ifindex) : 0;
	rcu_read_unlock();

	return iflink;
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static int rmnet_vnd_get_iflink(const struct net_device *dev)
{
	struct rmnet_priv *priv = netdev_priv(dev);

	return priv->real_dev->ifindex;
	return READ_ONCE(priv->real_dev->ifindex);
}

static int rmnet_vnd_init(struct net_device *dev)
+1 −1
Original line number Diff line number Diff line
@@ -349,7 +349,7 @@ static int ipvlan_get_iflink(const struct net_device *dev)
{
	struct ipvl_dev *ipvlan = netdev_priv(dev);

	return ipvlan->phy_dev->ifindex;
	return READ_ONCE(ipvlan->phy_dev->ifindex);
}

static const struct net_device_ops ipvlan_netdev_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -3753,7 +3753,7 @@ static void macsec_get_stats64(struct net_device *dev,

static int macsec_get_iflink(const struct net_device *dev)
{
	return macsec_priv(dev)->real_dev->ifindex;
	return READ_ONCE(macsec_priv(dev)->real_dev->ifindex);
}

static const struct net_device_ops macsec_netdev_ops = {
Loading