From: Paolo Abeni <pabeni@redhat.com>
To: Zhefu Peng <ilskdw@gmail.com>, netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, horms@kernel.org, kuniyu@google.com,
mschiffer@universe-factory.net, nicolas.dichtel@6wind.com,
shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net v6 1/2] vxlan: reset the remote's dst cache when snooping moves a MAC
Date: Thu, 26 Nov 2026 13:06:07 +0100 [thread overview]
Message-ID: <dddc8e30-73fa-4ac4-8467-ec39184a3fc6@redhat.com> (raw)
In-Reply-To: <20261119095256.42005-2-ilskdw@gmail.com>
On 11/19/26 10:52, Zhefu Peng wrote:
> +static enum skb_drop_reason vxlan_snoop_move(struct net_device *dev,
> + struct vxlan_fdb *f,
> + const u8 *src_mac,
> + union vxlan_addr *src_ip,
> + u32 ifindex)
> +{
> + struct vxlan_dev *vxlan = netdev_priv(dev);
> + struct vxlan_rdst *rdst;
> +
> + lockdep_assert_held(&vxlan->hash_lock);
Since this function has a single caller invoked after acquiring the lock
the above assertion is quite redundant, please drop it.
> +
> + /* The entry may have changed before the lock was taken */
> + if (hlist_unhashed(&f->fdb_node))
> + return SKB_NOT_DROPPED_YET;
> +
> + if (rcu_access_pointer(f->nh) ||
> + (f->state & (NUD_PERMANENT | NUD_NOARP)))
> + return SKB_DROP_REASON_VXLAN_ENTRY_EXISTS;
> +
> + rdst = first_remote_rcu(f);
> + if (vxlan_snoop_same_remote(rdst, src_ip, ifindex))
> + return SKB_NOT_DROPPED_YET;
You factored out a shared helper, but the other checks
looks duplicate as well. Please de-duplicate all of them
moving in shared helper.
/P
next prev parent reply other threads:[~2026-11-26 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 9:52 [PATCH net v6 0/2] vxlan: reset the remote's dst cache when snooping moves a MAC Zhefu Peng
2026-11-19 9:52 ` [PATCH net v6 1/2] " Zhefu Peng
2026-11-23 10:19 ` netdev-bot+sashiko
2026-11-23 18:58 ` Zhefu Peng
2026-11-26 12:06 ` Paolo Abeni [this message]
2026-11-19 9:52 ` [PATCH net v6 2/2] selftests: net: add a test for vxlan snooping moving " Zhefu Peng
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=dddc8e30-73fa-4ac4-8467-ec39184a3fc6@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=ilskdw@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=mschiffer@universe-factory.net \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=shuah@kernel.org \
/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.