Skip to content

net: Convert ->exit_batch_rtnl() to ->exit_rtnl().

Kuniyuki Iwashima 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 4 repliesApplied 14/14
  2. v114 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* Collect tags
* Patch2
* Convert free_exit_list() under CONFIG_NET_NS=n

Patches in v2 All 14 applied

#Subject and filesSizeRepliesApplied
1/14net: Factorise setup_net() and cleanup_net().net/core/net_namespace.c+51 -550 repliesApplied
2/14net: Add ops_undo_single for module load/unload.net/core/net_namespace.c+24 -303 repliesApplied
3/14net: Add ->exit_rtnl() hook to struct pernet_operations.include/net/net_namespace.h net/core/net_namespace.c+41 -140 repliesApplied
4/14nexthop: Convert nexthop_net_exit_batch_rtnl() to ->exit_rtnl().net/ipv4/nexthop.c+5 -80 repliesApplied
5/14vxlan: Convert vxlan_exit_batch_rtnl() to ->exit_rtnl().drivers/net/vxlan/vxlan_core.c+7 -110 repliesApplied
6/14ipv4: ip_tunnel: Convert ip_tunnel_delete_nets() callers to ->exit_rtnl().include/net/ip_tunnels.h net/ipv4/ip_gre.c net/ipv4/ip_tunnel.c +2 more+30 -470 repliesApplied
7/14ipv6: Convert tunnel devices' ->exit_batch_rtnl() to ->exit_rtnl().net/ipv6/ip6_gre.c net/ipv6/ip6_tunnel.c net/ipv6/ip6_vti.c +1 more+27 -690 repliesApplied
8/14xfrm: Convert xfrmi_exit_batch_rtnl() to ->exit_rtnl().net/xfrm/xfrm_interface_core.c+15 -190 repliesApplied
9/14bridge: Convert br_net_exit_batch_rtnl() to ->exit_rtnl().net/bridge/br.c+8 -90 repliesApplied
10/14bonding: Convert bond_net_exit_batch_rtnl() to ->exit_rtnl().drivers/net/bonding/bond_main.c+9 -140 repliesApplied
11/14gtp: Convert gtp_net_exit_batch_rtnl() to ->exit_rtnl().drivers/net/gtp.c+7 -110 repliesApplied
12/14bareudp: Convert bareudp_exit_batch_rtnl() to ->exit_rtnl().drivers/net/bareudp.c+4 -120 repliesApplied
13/14geneve: Convert geneve_exit_batch_rtnl() to ->exit_rtnl().drivers/net/geneve.c+4 -120 repliesApplied
14/14net: Remove ->exit_batch_rtnl().include/net/net_namespace.h net/core/net_namespace.c+1 -90 repliesApplied

Reviews trailers per patch

6 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid AhernNikolay AleksandrovIdo SchimmelSabrina Dubroca
SeriesR-b
1/14
2/14
3/14
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14
9/14A-b R-b
10/14R-b
11/14
12/14
13/14
14/14

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

Read the v2 thread

Cover letter [PATCH v2 net-next 00/14] net: Convert ->exit_batch_rtnl() to ->exit_rtnl().

While converting nexthop to per-netns RTNL, there are two blockers to using rtnl_net_dereference(), flush_all_nexthops() and __unregister_nexthop_notifier(), both of which are called from ->exit_batch_rtnl().

Instead of spreading __rtnl_net_lock() over each ->exit_batch_rtnl(), we should convert all ->exit_batch_rtnl() to per-net ->exit_rtnl() and run it under __rtnl_net_lock() because all ->exit_batch_rtnl() functions do not have anything to factor out for batching.

Patch 1 & 2 factorise the undo mechanism against ->init() into a single function, and Patch 3 adds ->exit_batch_rtnl().

Patch 4 ~ 13 convert all ->exit_batch_rtnl() users.

Patch 14 removes ->exit_batch_rtnl().

Later, we can convert pfcp and ppp to use ->exit_rtnl().

v2:
* Collect tags
* Patch2
* Convert free_exit_list() under CONFIG_NET_NS=n

v1: https://lore.kernel.org/all/[email protected]/

Kuniyuki Iwashima (14):
net: Factorise setup_net() and cleanup_net().
net: Add ops_undo_single for module load/unload.
net: Add ->exit_rtnl() hook to struct pernet_operations.
nexthop: Convert nexthop_net_exit_batch_rtnl() to ->exit_rtnl().
vxlan: Convert vxlan_exit_batch_rtnl() to ->exit_rtnl().
ipv4: ip_tunnel: Convert ip_tunnel_delete_nets() callers to

    ->exit_rtnl().

ipv6: Convert tunnel devices' ->exit_batch_rtnl() to ->exit_rtnl().
xfrm: Convert xfrmi_exit_batch_rtnl() to ->exit_rtnl().
bridge: Convert br_net_exit_batch_rtnl() to ->exit_rtnl().
bonding: Convert bond_net_exit_batch_rtnl() to ->exit_rtnl().
gtp: Convert gtp_net_exit_batch_rtnl() to ->exit_rtnl().
bareudp: Convert bareudp_exit_batch_rtnl() to ->exit_rtnl().
geneve: Convert geneve_exit_batch_rtnl() to ->exit_rtnl().
net: Remove ->exit_batch_rtnl().

 drivers/net/bareudp.c           |  16 +--
 drivers/net/bonding/bond_main.c |  23 ++--
 drivers/net/geneve.c            |  16 +--
 drivers/net/gtp.c               |  18 ++--
 drivers/net/vxlan/vxlan_core.c  |  18 ++--
 include/net/ip_tunnels.h        |   7 +-
 include/net/net_namespace.h     |   4 +-
 net/bridge/br.c                 |  17 ++-
 net/core/net_namespace.c        | 181 +++++++++++++++++---------------
 net/ipv4/ip_gre.c               |  27 +++--
 net/ipv4/ip_tunnel.c            |  25 ++---
 net/ipv4/ip_vti.c               |   9 +-
 net/ipv4/ipip.c                 |   9 +-
 net/ipv4/nexthop.c              |  13 +--
 net/ipv6/ip6_gre.c              |  22 ++--
 net/ipv6/ip6_tunnel.c           |  24 ++---
 net/ipv6/ip6_vti.c              |  27 ++---
 net/ipv6/sit.c                  |  23 ++--
 net/xfrm/xfrm_interface_core.c  |  34 +++---
 19 files changed, 213 insertions(+), 300 deletions(-)
Signature · 1 line
2.49.0