From: Simon Horman <horms@kernel.org>
To: Gilad Naaman <gnaaman@drivenets.com>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 1/2] Convert neighbour-table to use hlist
Date: Thu, 3 Oct 2024 12:23:17 +0100 [thread overview]
Message-ID: <20241003112317.GK1310185@kernel.org> (raw)
In-Reply-To: <20241001050959.1799151-2-gnaaman@drivenets.com>
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@drivenets.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.
...
next prev parent reply other threads:[~2024-10-03 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 5:09 [PATCH net-next 0/2] Improve neigh_flush_dev performance Gilad Naaman
2024-10-01 5:09 ` [PATCH net-next 1/2] Convert neighbour-table to use hlist Gilad Naaman
2024-10-03 11:23 ` Simon Horman [this message]
2024-10-04 15:06 ` Gilad Naaman
2024-10-04 1:41 ` kernel test robot
2024-10-01 5:09 ` [PATCH net-next 2/2] Create netdev->neighbour association Gilad Naaman
2024-10-03 11:26 ` Simon Horman
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=20241003112317.GK1310185@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnaaman@drivenets.com \
--cc=kuba@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).