mbox series

[net-next,0/4] ipv4: preliminary work for per-netns RTNL

Message ID 20241004134720.579244-1-edumazet@google.com (mailing list archive)
Headers show
Series ipv4: preliminary work for per-netns RTNL | expand

Message

Eric Dumazet Oct. 4, 2024, 1:47 p.m. UTC
Inspired by 9b8ca04854fd ("ipv4: avoid quadratic behavior in
FIB insertion of common address") and per-netns RTNL conversion
started by Kuniyuki this week.

ip_fib_check_default() can use RCU instead of a shared spinlock.

fib_info_lock can be removed, RTNL is already used.

fib_info_devhash[] can be removed in favor of a single
pointer in net_device.

Eric Dumazet (4):
  ipv4: remove fib_devindex_hashfn()
  ipv4: use rcu in ip_fib_check_default()
  ipv4: remove fib_info_lock
  ipv4: remove fib_info_devhash[]

 .../networking/net_cachelines/net_device.rst  |  1 +
 include/linux/netdevice.h                     |  2 +
 net/ipv4/fib_semantics.c                      | 77 +++++++------------
 3 files changed, 31 insertions(+), 49 deletions(-)

Comments

David Ahern Oct. 4, 2024, 2:35 p.m. UTC | #1
On 10/4/24 7:47 AM, Eric Dumazet wrote:
> Inspired by 9b8ca04854fd ("ipv4: avoid quadratic behavior in
> FIB insertion of common address") and per-netns RTNL conversion
> started by Kuniyuki this week.
> 
> ip_fib_check_default() can use RCU instead of a shared spinlock.
> 
> fib_info_lock can be removed, RTNL is already used.
> 
> fib_info_devhash[] can be removed in favor of a single
> pointer in net_device.
> 
> Eric Dumazet (4):
>   ipv4: remove fib_devindex_hashfn()
>   ipv4: use rcu in ip_fib_check_default()
>   ipv4: remove fib_info_lock
>   ipv4: remove fib_info_devhash[]
> 
>  .../networking/net_cachelines/net_device.rst  |  1 +
>  include/linux/netdevice.h                     |  2 +
>  net/ipv4/fib_semantics.c                      | 77 +++++++------------
>  3 files changed, 31 insertions(+), 49 deletions(-)
> 


For the set:
Reviewed-by: David Ahern <dsahern@kernel.org>