[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241106230703.48870-1-kuniyu@amazon.com>
Date: Wed, 6 Nov 2024 15:07:03 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <gnaaman@...venets.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next v8 4/6] neighbour: Convert iteration to use hlist+macro
From: Gilad Naaman <gnaaman@...venets.com>
Date: Mon, 4 Nov 2024 08:04:32 +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.
> if (n->dev == dev && key_eq(n, pkey))
> return n;
> - }
>
> return NULL;
> }
Powered by blists - more mailing lists