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 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes
Date: Tue, 01 Dec 2026 13:10:32 +0000 [thread overview]
Message-ID: <179613063220.3146.17330272143922251200@kernel.org> (raw)
In-Reply-To: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit says "The kernel accepts more attributes in an
RTM_DELNEIGH request than the spec lists", but the patch only closes…
--
netlink: specs: rt-neigh: Extend the delneigh request attributes
This patch adds lladdr, vlan, ndm-state-mask and ndm-flags-mask to the
delneigh request attributes in the rt-neigh spec. The kernel uses them
for FDB deletion and NLM_F_BULK filtering, and with them in the spec
these requests can be built through YNL.
> diff --git a/Documentation/netlink/specs/rt-neigh.yaml b/Documentation/netlink/specs/rt-neigh.yaml
> index 7929e667cc7a6..4dd4e3d997f09 100644
> --- a/Documentation/netlink/specs/rt-neigh.yaml
> +++ b/Documentation/netlink/specs/rt-neigh.yaml
> @@ -380,7 +380,11 @@ operations:
> value: 29
> attributes:
> - dst
> + - lladdr
> + - vlan
> - ifindex
> + - ndm-state-mask
> + - ndm-flags-mask
[Severity: Medium]
The commit message says:
"The kernel accepts more attributes in an RTM_DELNEIGH request than the
spec lists."
Should port, vni, src-vni and nh-id be added to this list too? This
patch covers what the bridge driver reads. The VXLAN driver, which
RTM_DELNEIGH also reaches, reads four more attributes from the delete
request.
For a single-entry delete, rtnl_fdb_del()->vxlan_fdb_delete()->
vxlan_fdb_parse() reads all four:
drivers/net/vxlan/vxlan_core.c:vxlan_fdb_parse() {
...
if (tb[NDA_NH_ID] &&
(tb[NDA_DST] || tb[NDA_VNI] || tb[NDA_IFINDEX] || tb[NDA_PORT])) {
...
if (tb[NDA_PORT]) {
if (nla_len(tb[NDA_PORT]) != sizeof(__be16)) {
...
*port = nla_get_be16(tb[NDA_PORT]);
...
if (tb[NDA_VNI]) {
...
if (tb[NDA_SRC_VNI]) {
...
*nhid = nla_get_u32_default(tb[NDA_NH_ID], 0);
...
}
For NLM_F_BULK, vxlan_del_bulk_policy accepts these four attributes
alongside the two mask attributes added here:
[NDA_SRC_VNI] = { .type = NLA_U32 },
[NDA_NH_ID] = { .type = NLA_U32 },
[NDA_VNI] = { .type = NLA_U32 },
[NDA_PORT] = { .type = NLA_U16 },
vxlan_fdb_delete_bulk() then uses all of them as flush filters:
drivers/net/vxlan/vxlan_core.c:vxlan_fdb_delete_bulk() {
...
if (tb[NDA_SRC_VNI])
desc.src_vni = cpu_to_be32(nla_get_u32(tb[NDA_SRC_VNI]));
if (tb[NDA_NH_ID])
desc.nhid = nla_get_u32(tb[NDA_NH_ID]);
if (tb[NDA_VNI])
desc.vni = cpu_to_be32(nla_get_u32(tb[NDA_VNI]));
if (tb[NDA_PORT])
desc.port = nla_get_be16(tb[NDA_PORT]);
...
}
rt-neigh is built by the C YNL code generator. Without these four
attributes in the list, the generated delneigh request has no fields
for them. That means a C YNL user can't build any of these requests:
- the equivalent of "bridge fdb del ... dev vxlan0 dst X port Y vni Z"
- a delete scoped to a src-vni
- a delete based on nh-id
- a VXLAN flush filtered by vni, port, src-vni or nh-id
Python YNL is not affected, because it encodes against the attribute
set rather than the per-op request list.
All four attributes are already defined in the attribute set. Note
that src-vni does not appear in any request list in the spec today.
When adding port, note that the kernel reads it with nla_get_be16(),
while the spec defines port as u16 with no byte-order: big-endian.
> -
> name: delneigh-ntf
> doc: Notify a neighbour deletion
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796041491.git.petrm%40nvidia.com
next prev parent 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
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 [this message]
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=179613063220.3146.17330272143922251200@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