Skip to content

ipv4: fib: Remove RTNL in fib_net_exit_batch().

Kuniyuki Iwashima netdev 1 version 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

  1. v1 Latest5 patches 6 repliesApplied 5/5

Patches in v1 All 5 applied

#Subject and filesSizeRepliesApplied
1/5ipv4: fib: Flush all fib_info in fib_table_flush() during netns dismantle.net/ipv4/fib_trie.c+2 -81 replyApplied
2/5ipv4: fib: Call fib_proc_exit() and nl_fib_lookup_exit() at ->pre_exit().net/ipv4/fib_frontend.c+2 -21 replyApplied
3/5ipv4: fib: Free net->ipv4.{fib_table_hash,notifier_ops} without RTNL.net/ipv4/fib_frontend.c+7 -41 replyApplied
4/5ipv4: fib: Avoid calling fib_trie_table() in fib_new_table() for dying net.net/ipv4/fib_frontend.c+2 -11 replyApplied
5/5ipv4: fib: Convert fib_net_exit_batch() to ->exit_rtnl().net/ipv4/fib_frontend.c+12 -171 replyApplied

Reviews trailers per patch

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

PatchIdo SchimmelEric Dumazet
SeriesR-b
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 net-next 0/5] ipv4: fib: Remove RTNL in fib_net_exit_batch().

Currently, we flush all IPv4 routes at ->exit_batch() during netns dismantle, which requires an extra RTNL.

IPv4 routes are not added from the fast path unlike IPv6, so we can flush routes before default_device_exit_batch().

However, there is implicit ordering between ip_fib_net_exit() and default_device_exit_batch().

This series detangles it and moves ip_fib_net_exit() to
->exit_rtnl() to save the RTNL dance.

The same change for IPv6 will need more work.

Kuniyuki Iwashima (5):
ipv4: fib: Flush all fib_info in fib_table_flush() during netns
dismantle.
ipv4: fib: Call fib_proc_exit() and nl_fib_lookup_exit() at

    ->pre_exit().

ipv4: fib: Free net->ipv4.{fib_table_hash,notifier_ops} without RTNL.
ipv4: fib: Avoid calling fib_trie_table() in fib_new_table() for dying
net.
ipv4: fib: Convert fib_net_exit_batch() to ->exit_rtnl().

 net/ipv4/fib_frontend.c | 37 ++++++++++++++++++-------------------
 net/ipv4/fib_trie.c     | 10 ++--------
 2 files changed, 20 insertions(+), 27 deletions(-)
Signature · 1 line
2.54.0.1136.gdb2ca164c4-goog