* Re: [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes
[not found] <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>
@ 2026-12-01 13:10 ` netdev-bot+sashiko
2026-12-01 18:12 ` Petr Machata
0 siblings, 1 reply; 2+ messages in thread
From: netdev-bot+sashiko @ 2026-12-01 13:10 UTC (permalink / raw)
To: petrm
Cc: davem, edumazet, kuba, pabeni, horms, netdev, andrew+netdev,
razor, bridge, idosch, aroulin, mlxsw, shuah, linux-kselftest
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes
2026-12-01 13:10 ` [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes netdev-bot+sashiko
@ 2026-12-01 18:12 ` Petr Machata
0 siblings, 0 replies; 2+ messages in thread
From: Petr Machata @ 2026-12-01 18:12 UTC (permalink / raw)
To: netdev-bot+sashiko
Cc: petrm, davem, edumazet, kuba, pabeni, horms, netdev,
andrew+netdev, razor, bridge, idosch, aroulin, mlxsw, shuah,
linux-kselftest
netdev-bot+sashiko@kernel.org writes:
>> 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.
I don't need those attributes, so I didn't add them. Usually unnecessary
interfaces are not added.
> 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 first C YNL user can add the attributes they are missing.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-01 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com>
2026-12-01 13:10 ` [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes netdev-bot+sashiko
2026-12-01 18:12 ` Petr Machata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox