Re: [PATCH net-next v2 06/13] net: vxlan: Pass portid through FDB notifications

From
Petr Machata <petrm@nvidia.com>
Date
2026-12-01 18:12:45
Also in
bridge, linux-kselftest
Reply to
netdev-bot+sashiko@kernel.org, 2026-12-01
netdev-bot+sashiko@kernel.org writes:
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.
This is just a remark, no change is being suggested.
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?
It could, but it seemed like overkill, which is why I didn't do it.
Thread (25 messages) 25 messages, 3 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help