From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796130633; b=yiqekPfF5H8UD2mKVlkuweATnbInpOVQ2MaiM8nUDVeg+n8Bl/V/KJQnTzXwSqP9rh1t j73YlsObIkdYpNj0xAlx0hwIKioAPbNpiFxAX66LKEusvdCFlCSOck8vCX1yOvUHgxxbw 0NpdswaoEtnLF3Pfrw2dyWtcVlsWQ8cXsLkHRqAzP49cCDn4zS0GEkHZkhpHa0qSQLo2H qOaDRrGyVPSDjfN0Obmik/4mtm6PGMt4OXRlBknGtXVaxIllAn96TKRnl4imR+f829rtg +ImzqtlUrnorawSiaWZX5fcaXpFMweKYmFG8NCks/1vTldczMHol9bzNHeT6S7iK0VA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796130633; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=tome0tFTmwRJ86X+f+530HCXuubx7Ea02O3+p38DRpo=; b=JTKNlg425b9ScxRDkXHdtbBXZa0UXRL/a0w3jb7MkOL1gn3nDyEvoDpqnGQVe1E+Za86 n/T6qIkop3ddGLsWEff4tEFhnv29HXIgJ83HLbbH46iEyR/I2VYoQwBfjGLqOFu9kWcZV L4f+ZhWdfE9kAZMo0PjOnLYdRQ9oFptY+u56cJaIexrsEME2AVBXZCzFVCPe5zbXld9oH LqsiKaNJ0XlIWSeGmEuqV9eGCx2JyNLj9Ck8KOhh3Q90QNEkEwDj15HhHEMXnDpriGRJc TAhkpalJoHlDTmxg+2K2ZJVER8EZ2XgfMek8aF5ESHMo8aNAlGzHOCH0BDEs5JzYRmg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="hIS/u1Dk"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA24F606A33D; Tue, 1 Dec 2026 13:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hIS/u1Dk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 983DB1F00932; Tue, 1 Dec 2026 13:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796130633; bh=tome0tFTmwRJ86X+f+530HCXuubx7Ea02O3+p38DRpo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=hIS/u1Dk+zxY8b3oKvnd+LJe//6Z4XZnjgPp0+FenhT8psK+G+Q151Ipp726i1Oir n8CYphaSqyM9CDy+d3MumcYjXlyXM3Tp+wulvtke7pKf3cPFkbFq73Hox1zrIqlQPz lIe7JwC0cgmJr+lGP9dtqrSpqNq/xEnmMUT4u0/f9oXUBuyPNBdrGWxI1zjfJV2T7V vOC3ABqYGBBXlvH0jzoBYuoPuuh0IL5a/k8l01Ucu0QULnmHvpKZsEklWHZCJEWkQj L592MeF5M7ekSZh2rWWahHX/iezp4w8PsBQq6XC2I6aKjEIpe+XE45uOOvonqyZiZ9 yvnHNRkIit4Uw== Subject: Re: [PATCH net-next v2 10/13] netlink: specs: rt-neigh: Extend the delneigh request attributes 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 Date: Tue, 01 Dec 2026 13:10:32 +0000 Message-ID: <179613063220.3146.17330272143922251200@kernel.org> In-Reply-To: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com> References: <7a506e52d16f9f27ccf76b58bdd0fdd4eacfc6b2.1796041491.git.petrm@nvidia.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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