lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241007140850.GC32733@kernel.org>
Date: Mon, 7 Oct 2024 15:08:50 +0100
From: Simon Horman <horms@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	David Ahern <dsahern@...nel.org>,
	Kuniyuki Iwashima <kuniyu@...zon.com>,
	Alexandre Ferrieux <alexandre.ferrieux@...nge.com>,
	netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 4/4] ipv4: remove fib_info_devhash[]

On Fri, Oct 04, 2024 at 01:47:20PM +0000, Eric Dumazet wrote:
> Upcoming per-netns RTNL conversion needs to get rid
> of shared hash tables.
> 
> fib_info_devhash[] is one of them.
> 
> It is unclear why we used a hash table, because
> a single hlist_head per net device was cheaper and scalable.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
>  .../networking/net_cachelines/net_device.rst  |  1 +
>  include/linux/netdevice.h                     |  2 ++
>  net/ipv4/fib_semantics.c                      | 35 ++++++++-----------
>  3 files changed, 18 insertions(+), 20 deletions(-)
> 
> diff --git a/Documentation/networking/net_cachelines/net_device.rst b/Documentation/networking/net_cachelines/net_device.rst
> index 22b07c814f4a4575d255fdf472d07c549536e543..a8e2a7ce0383343464800be8db31aeddd791f086 100644
> --- a/Documentation/networking/net_cachelines/net_device.rst
> +++ b/Documentation/networking/net_cachelines/net_device.rst
> @@ -83,6 +83,7 @@ unsigned_int                        allmulti
>  bool                                uc_promisc                                                      
>  unsigned_char                       nested_level                                                    
>  struct_in_device*                   ip_ptr                  read_mostly         read_mostly         __in_dev_get
> +struct hlist_head                   fib_nh_head
>  struct_inet6_dev*                   ip6_ptr                 read_mostly         read_mostly         __in6_dev_get
>  struct_vlan_info*                   vlan_info                                                       
>  struct_dsa_port*                    dsa_ptr                                                         

> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 4d20c776a4ff3d0e881b8d9b99901edb35f66da2..cda20a3fe1adf54c1e6df5b5a8882ef7830e1b46 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -2209,6 +2209,8 @@ struct net_device {
>  
>  	/* Protocol-specific pointers */
>  	struct in_device __rcu	*ip_ptr;
> +	struct hlist_head	fib_nh_head;
> +
>  #if IS_ENABLED(CONFIG_VLAN_8021Q)
>  	struct vlan_info __rcu	*vlan_info;
>  #endif

Hi Eric,

A minor nit from my side: Kernel-doc should be updated for this new field.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ