Skip to content

rtnetlink: reduce RTNL pressure for dumps

Eric Dumazet netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 25 repliesApplied 14/14
  2. v113 patches 6 repliesSuperseded

Patches in v2 All 14 applied

#Subject and filesSizeRepliesApplied
1/14rtnetlink: prepare nla_put_iflink() to run under RCUdrivers/infiniband/ulp/ipoib/ipoib_main.c drivers/net/can/vxcan.c drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +13 more+20 -205 repliesApplied
2/14ipv6: prepare inet6_fill_ifla6_attrs() for RCUnet/ipv6/addrconf.c net/ipv6/ndisc.c+90 -751 replyApplied
3/14ipv6: prepare inet6_fill_ifinfo() for RCU protectioninclude/linux/netdevice.h net/core/dev.c net/ipv6/addrconf.c+13 -85 repliesApplied
4/14ipv6: use xarray iterator to implement inet6_dump_ifinfo()net/ipv6/addrconf.c+19 -271 replyApplied
5/14netlink: fix netlink_diag_dump() return valuenet/netlink/diag.c+1 -11 replyApplied
6/14netlink: hold nlk->cb_mutex longer in __netlink_dump_start()net/netlink/af_netlink.c+6 -75 repliesApplied
7/14rtnetlink: change nlk->cb_mutex rolenet/netlink/af_netlink.c net/netlink/af_netlink.h+21 -160 repliesApplied
8/14rtnetlink: add RTNL_FLAG_DUMP_UNLOCKED flaginclude/linux/netlink.h include/net/rtnetlink.h net/core/rtnetlink.c +1 more+8 -01 replyApplied
9/14ipv6: switch inet6_dump_ifinfo() to RCU protectionnet/ipv6/addrconf.c+1 -11 replyApplied
10/14inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCUinclude/net/ip_fib.h net/ipv4/fib_frontend.c net/ipv4/ipmr.c +3 more+26 -91 replyApplied
11/14nexthop: allow nexthop_mpath_fill_node() to be called without RTNLinclude/net/nexthop.h+1 -11 replyApplied
12/14inet: switch inet_dump_fib() to RCU protectionnet/ipv4/fib_frontend.c net/ipv4/fib_trie.c+20 -211 replyApplied
13/14rtnetlink: make rtnl_fill_link_ifmap() RCU readynet/core/rtnetlink.c+11 -101 replyApplied
14/14rtnetlink: provide RCU protection to rtnl_fill_prop_list()net/core/rtnetlink.c+4 -51 replyApplied

Reviews trailers per patch

11 of 14 patches have a Reviewed-by or Acked-by.

PatchIdo SchimmelJiri PirkoDonald Hunter
1/14
2/14R-b
3/14
4/14R-b R-b
5/14R-b
6/14R-b
7/14
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 net-next 00/14] 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)

Eric Dumazet (14):
rtnetlink: prepare nla_put_iflink() to run under RCU
ipv6: prepare inet6_fill_ifla6_attrs() for RCU
ipv6: prepare inet6_fill_ifinfo() for RCU protection
ipv6: use xarray iterator to implement inet6_dump_ifinfo()
netlink: fix netlink_diag_dump() return value
netlink: hold nlk->cb_mutex longer in __netlink_dump_start()
rtnetlink: change nlk->cb_mutex role
rtnetlink: add RTNL_FLAG_DUMP_UNLOCKED flag
ipv6: switch inet6_dump_ifinfo() to RCU protection
inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU
nexthop: allow nexthop_mpath_fill_node() to be called without RTNL
inet: switch inet_dump_fib() to RCU protection
rtnetlink: make rtnl_fill_link_ifmap() RCU ready
rtnetlink: provide RCU protection to rtnl_fill_prop_list()

 drivers/infiniband/ulp/ipoib/ipoib_main.c     |   4 +-
 drivers/net/can/vxcan.c                       |   2 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   |   2 +-
 drivers/net/ipvlan/ipvlan_main.c              |   2 +-
 drivers/net/macsec.c                          |   2 +-
 drivers/net/macvlan.c                         |   2 +-
 drivers/net/netkit.c                          |   2 +-
 drivers/net/veth.c                            |   2 +-
 drivers/net/wireless/virtual/virt_wifi.c      |   2 +-
 include/linux/netdevice.h                     |   6 +-
 include/linux/netlink.h                       |   2 +
 include/net/ip_fib.h                          |   1 +
 include/net/nexthop.h                         |   2 +-
 include/net/rtnetlink.h                       |   1 +
 net/8021q/vlan_dev.c                          |   4 +-
 net/core/dev.c                                |   6 +-
 net/core/rtnetlink.c                          |  36 +--
 net/dsa/user.c                                |   2 +-
 net/ieee802154/6lowpan/core.c                 |   2 +-
 net/ipv4/fib_frontend.c                       |  50 ++--
 net/ipv4/fib_trie.c                           |   4 +-
 net/ipv4/ipmr.c                               |   4 +-
 net/ipv6/addrconf.c                           | 222 +++++++++---------
 net/ipv6/ip6_fib.c                            |   7 +-
 net/ipv6/ip6_tunnel.c                         |   2 +-
 net/ipv6/ip6mr.c                              |   4 +-
 net/ipv6/ndisc.c                              |   2 +-
 net/mpls/af_mpls.c                            |   4 +-
 net/netlink/af_netlink.c                      |  46 ++--
 net/netlink/af_netlink.h                      |   5 +-
 net/netlink/diag.c                            |   2 +-
 net/xfrm/xfrm_interface_core.c                |   2 +-
 32 files changed, 238 insertions(+), 198 deletions(-)
Signature · 1 line
2.44.0.rc1.240.g4c46232300-goog