netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <gnaaman@drivenets.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<kuniyu@amazon.com>, <netdev@vger.kernel.org>,
	<pabeni@redhat.com>
Subject: Re: [PATCH net-next v8 4/6] neighbour: Convert iteration to use hlist+macro
Date: Wed, 6 Nov 2024 21:48:40 -0800	[thread overview]
Message-ID: <20241107054840.91923-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20241107053946.1252382-1-gnaaman@drivenets.com>

From: Gilad Naaman <gnaaman@drivenets.com>
Date: Thu,  7 Nov 2024 05:39:46 +0000
> > > diff --git a/include/net/neighbour.h b/include/net/neighbour.h
> > > index 69aaacd1419f..68b1970d9045 100644
> > > --- a/include/net/neighbour.h
> > > +++ b/include/net/neighbour.h
> > > @@ -309,12 +309,9 @@ static inline struct neighbour *___neigh_lookup_noref(
> > >  	u32 hash_val;
> > >  
> > >  	hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
> > > -	for (n = rcu_dereference(nht->hash_buckets[hash_val]);
> > > -	     n != NULL;
> > > -	     n = rcu_dereference(n->next)) {
> > > +	neigh_for_each_in_bucket(n, &nht->hash_heads[hash_val])
> > 
> > Sorry, I missed this part needs to be _rcu version.
> > 
> > You can keep my Reviewed-by tag in v9.
> > 
> 
> No problem at all, will do.
> 
> Is it possible that the `_rcu` version will also be needed in `neigh_dump_table`?
> It is called from an `rcu_read_lock`ed section, and it doesn't hold the table-lock.

Right, there also should use _rcu one.

  reply	other threads:[~2024-11-07  5:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04  8:04 [PATCH net-next v8 0/6] Improve neigh_flush_dev performance Gilad Naaman
2024-11-04  8:04 ` [PATCH net-next v8 1/6] neighbour: Add hlist_node to struct neighbour Gilad Naaman
2024-11-06 20:26   ` Kuniyuki Iwashima
2024-11-04  8:04 ` [PATCH net-next v8 2/6] neighbour: Define neigh_for_each_in_bucket Gilad Naaman
2024-11-06 20:28   ` Kuniyuki Iwashima
2024-11-04  8:04 ` [PATCH net-next v8 3/6] neighbour: Convert seq_file functions to use hlist Gilad Naaman
2024-11-06 20:34   ` Kuniyuki Iwashima
2024-11-04  8:04 ` [PATCH net-next v8 4/6] neighbour: Convert iteration to use hlist+macro Gilad Naaman
2024-11-06 20:40   ` Kuniyuki Iwashima
2024-11-06 23:07   ` Kuniyuki Iwashima
2024-11-07  5:39     ` Gilad Naaman
2024-11-07  5:48       ` Kuniyuki Iwashima [this message]
2024-11-04  8:04 ` [PATCH net-next v8 5/6] neighbour: Remove bare neighbour::next pointer Gilad Naaman
2024-11-06 23:15   ` Kuniyuki Iwashima
2024-11-04  8:04 ` [PATCH net-next v8 6/6] neighbour: Create netdev->neighbour association Gilad Naaman

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=20241107054840.91923-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --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).