From: Simon Horman <horms@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Alexandre Ferrieux <alexandre.ferrieux@orange.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 4/4] ipv4: remove fib_info_devhash[]
Date: Mon, 7 Oct 2024 15:08:50 +0100 [thread overview]
Message-ID: <20241007140850.GC32733@kernel.org> (raw)
In-Reply-To: <20241004134720.579244-5-edumazet@google.com>
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@google.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.
...
next prev parent reply other threads:[~2024-10-07 14:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 13:47 [PATCH net-next 0/4] ipv4: preliminary work for per-netns RTNL Eric Dumazet
2024-10-04 13:47 ` [PATCH net-next 1/4] ipv4: remove fib_devindex_hashfn() Eric Dumazet
2024-10-04 22:32 ` Kuniyuki Iwashima
2024-10-04 13:47 ` [PATCH net-next 2/4] ipv4: use rcu in ip_fib_check_default() Eric Dumazet
2024-10-04 22:39 ` Kuniyuki Iwashima
2024-10-04 13:47 ` [PATCH net-next 3/4] ipv4: remove fib_info_lock Eric Dumazet
2024-10-04 22:41 ` Kuniyuki Iwashima
2024-10-04 13:47 ` [PATCH net-next 4/4] ipv4: remove fib_info_devhash[] Eric Dumazet
2024-10-04 22:45 ` Kuniyuki Iwashima
2024-10-07 14:08 ` Simon Horman [this message]
2024-10-07 14:13 ` Eric Dumazet
2024-10-04 14:35 ` [PATCH net-next 0/4] ipv4: preliminary work for per-netns RTNL David Ahern
2024-10-08 0:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241007140850.GC32733@kernel.org \
--to=horms@kernel.org \
--cc=alexandre.ferrieux@orange.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.