Ethernet Bridge development
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: petrm@nvidia.com
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org,
	andrew+netdev@lunn.ch, razor@blackwall.org,
	bridge@lists.linux.dev, idosch@nvidia.com, aroulin@nvidia.com,
	mlxsw@nvidia.com, shuah@kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 06/13] net: vxlan: Pass portid through FDB notifications
Date: Tue, 01 Dec 2026 13:10:30 +0000	[thread overview]
Message-ID: <179613063063.3146.13945368265097568130@kernel.org> (raw)
In-Reply-To: <af8d0ed64ebffc05ed2d247dafd7a0adc2458f5f.1796041491.git.petrm@nvidia.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This concern does not hold up for the reviewed patch, commit
  "net: vxlan: Pass portid through FDB notifications".

--

net: vxlan: Pass portid through FDB notifications

This commit threads a portid argument through the VXLAN FDB notify,
update, delete, destroy and flush helpers. The value is used as the
netlink port ID of the RTM_NEWNEIGH / RTM_DELNEIGH notifications.
vxlan_fdb_add() and vxlan_fdb_delete() pass parms->portid, and all other
callers pass zero.

> diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
> index c014307a693b9..9df9f7a8cde70 100644
> --- a/drivers/net/vxlan/vxlan_core.c
> +++ b/drivers/net/vxlan/vxlan_core.c

[ ... ]

> @@ -1276,7 +1279,7 @@ static int vxlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
>  			       parms->flags,
>  			       port, src_vni, vni, ifindex,
>  			       ndm->ndm_flags | NTF_VXLAN_ADDED_BY_USER,
> -			       nhid, true, extack);
> +			       nhid, parms->portid, true, extack);
>  	spin_unlock_bh(&vxlan->hash_lock);
>  
>  	if (!err)

[ ... ]

> @@ -1337,7 +1340,7 @@ static int vxlan_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
>  
>  	spin_lock_bh(&vxlan->hash_lock);
>  	err = __vxlan_fdb_delete(vxlan, parms->addr, ip, port, src_vni, vni,
> -				 ifindex, true);
> +				 ifindex, parms->portid, true);
>  	spin_unlock_bh(&vxlan->hash_lock);
>  
>  	if (!err)

[Severity: Low]
This isn't a bug, just a note on parms->portid. At this commit,
rtnl_fdb_add() and rtnl_fdb_del() in net/core/rtnetlink.c don't fill in
.portid:

net/core/rtnetlink.c:rtnl_fdb_add() {
    ...
	parms = (struct ndo_fdb_parms) {
		.dev = dev,
		.addr = addr,
		.vid = vid,
		.flags = nlh->nlmsg_flags,
	};
    ...
}

As a result, vxlan_fdb_add() and vxlan_fdb_delete() always read 0 here,
even though the struct ndo_fdb_parms kernel-doc says "@portid: netlink
port ID of the requester".

The commit message already covers this:

  "As rtnl_fdb_add() and rtnl_fdb_del() do not yet fill in the port ID in
  struct ndo_fdb_parms, all notifications are still sent with zero."

The later patch "net: rtnetlink: Report port ID in bridge and VXLAN FDB
notifications" sets .portid in both functions, so nothing visible changes
at this commit.

Separately, rtnl_fdb_del() also never sets .flags, and it still doesn't at
the end of the series. No ndo_fdb_del implementation reads parms->flags,
and the compound literal zeroes the field. That wording goes back to the
patch that added struct ndo_fdb_parms, not this one.

Would it make sense to adjust the kernel-doc so it doesn't suggest that
flags is filled in for deletes?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796041491.git.petrm%40nvidia.com

  reply	other threads:[~2026-12-01 13:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 13:03 [PATCH net-next v2 00/13] net: Report requester's port ID in FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 01/13] net: Introduce struct ndo_fdb_parms Petr Machata
2026-12-01 13:10   ` netdev-bot+sashiko
2026-11-30 13:03 ` [PATCH net-next v2 02/13] net: Pass struct ndo_fdb_parms to ndo_dflt_fdb_{add, del}() Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 03/13] net: Pass portid to ndo_fdb_get through the structure Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 04/13] net: bridge: Pass struct ndo_fdb_parms a bit further Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 05/13] net: bridge: Pass portid through FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 06/13] net: vxlan: " Petr Machata
2026-12-01 13:10   ` netdev-bot+sashiko [this message]
2026-11-30 13:03 ` [PATCH net-next v2 07/13] net: rtnetlink: Report port ID in bridge and VXLAN " Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 08/13] net: rtnetlink: Report port ID in bulk FDB delete notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 09/13] net: rtnetlink: Report port ID in fallback FDB notifications Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes Petr Machata
2026-12-01 13:10   ` netdev-bot+sashiko
2026-11-30 13:03 ` [PATCH net-next v2 11/13] tools: ynl: Add NLM_F_BULK Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 12/13] selftests: net: lib: py: Add RtnlNeighFamily Petr Machata
2026-11-30 13:03 ` [PATCH net-next v2 13/13] selftests: net: Add a test for port ID in FDB notifications Petr Machata
2026-12-01 13:10   ` netdev-bot+sashiko
2026-11-30 13:24 ` [PATCH net-next v2 00/13] net: Report requester's " Przemek Kitszel

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=179613063063.3146.13945368265097568130@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=aroulin@nvidia.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox