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/cove…%40nvidia.com