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.