[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241003112317.GK1310185@kernel.org>
Date: Thu, 3 Oct 2024 12:23:17 +0100
From: Simon Horman <horms@...nel.org>
To: Gilad Naaman <gnaaman@...venets.com>
Cc: netdev <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 1/2] Convert neighbour-table to use hlist
On Tue, Oct 01, 2024 at 05:09:56AM +0000, Gilad Naaman wrote:
> Use doubly-linked instead of singly-linked list when linking neighbours,
> so that it is possible to remove neighbours without traversing the
> entire table.
>
> Signed-off-by: Gilad Naaman <gnaaman@...venets.com>
Hi Gilad,
This is not a full review, but rather some feedback to take into account
once a proper review arrives.
> ---
> include/net/neighbour.h | 8 +--
> net/core/neighbour.c | 123 ++++++++++++++--------------------------
> 2 files changed, 45 insertions(+), 86 deletions(-)
>
> diff --git a/include/net/neighbour.h b/include/net/neighbour.h
> index a44f262a7384..77a4aa53aecb 100644
> --- a/include/net/neighbour.h
> +++ b/include/net/neighbour.h
> @@ -135,7 +135,7 @@ struct neigh_statistics {
> #define NEIGH_CACHE_STAT_INC(tbl, field) this_cpu_inc((tbl)->stats->field)
>
> struct neighbour {
> - struct neighbour __rcu *next;
> + struct hlist_node __rcu list;
> struct neigh_table *tbl;
> struct neigh_parms *parms;
> unsigned long confirmed;
Sparse is having a bit of a cow with rcu changes introduced by this patch.
Please take a look at that.
...
Powered by blists - more mailing lists