🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7092

[PATCH net 2/2] tools: ynl: generate code for rt-nexthop bucket notifications

#7092
From: Demos Ra via B4 Relay
Date: Sat, 24 Oct 2026 17:13
58 lines
12856 bytes
From: Demos Ra <demosthenes.ra@gmail.com>

The kernel sends RTM_NEWNEXTHOPBUCKET to RTNLGRP_NEXTHOP when the
upkeep of a resilient nexthop group migrates a bucket. With
newnexthopbucket-ntf excluded from the code generation, the
notification table of the generated rt-nexthop code ends at
RTM_DELNEXTHOP. On a socket subscribed to the group, ynl_ntf_parse()
rejects the bucket notification without setting an error message, so
ynl_ntf_check() fails, and so does a request in flight when the
notification arrives, as ynl_check_alien() passes it to
ynl_ntf_parse() too.

ynl-gen can now generate the notification, so drop the exclusion.

Reproduced in a network namespace, with traffic through a resilient
group so that a weight change defers the bucket migrations to the
upkeep work:

  ip link add dummy0 type dummy && ip link set dummy0 up
  ip addr add 192.0.2.1/24 dev dummy0
  ip nexthop add id 1 via 192.0.2.2 dev dummy0
  ip nexthop add id 2 via 192.0.2.3 dev dummy0
  ip nexthop add id 10 group 1/2 type resilient buckets 8 idle_timer 1
  ip route add 198.51.100.0/24 nhid 10
  for i in $(seq 64); do echo > /dev/udp/198.51.100.$i/9; done
  ip nexthop replace id 10 group 1,3/2 type resilient

A C program that joins RTNLGRP_NEXTHOP by hand and then calls
ynl_ntf_check() or rt_nexthop_getnexthop() fails with an empty error
message before this patch, and parses the two bucket notifications
after it. The program is available on request. Reproducing it needed
no kernel changes. Tested on 7.0 with the reproducer and the YNL
selftests, which all pass.

Fixes: 457dc9fefe9a ("netlink: specs: Add a spec for nexthops in rtnetlink")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261019-rt-nexthop-spec-v1-1-9c586edf86ab%40gmail.com
Signed-off-by: Demos Ra <demosthenes.ra@gmail.com>
---
 tools/net/ynl/generated/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/net/ynl/generated/Makefile b/tools/net/ynl/generated/Makefile
index d76d4ca94629..5a186349b5a8 100644
--- a/tools/net/ynl/generated/Makefile
+++ b/tools/net/ynl/generated/Makefile
@@ -18,7 +18,6 @@ include ../Makefile.deps
 
 YNL_GEN_ARG_ethtool:=--user-header linux/ethtool_netlink.h \
 	--exclude-op stats-get
-YNL_GEN_ARG_rt-nexthop:=--exclude-op newnexthopbucket-ntf
 
 TOOL:=../pyynl/ynl_gen_c.py
 TOOL_RST:=../pyynl/ynl_gen_rst.py

-- 
2.53.0
Technical Details
Message-ID: <20261025-ynl-ntf-bucket-v1-2-65aef308d62c@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351426-linux-kernel-netdev=dewy.ru
References: <20261025-ynl-ntf-bucket-v1-0-65aef308d62c@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351426-linux-kernel-netdev=dewy.ru
From: devnull+demosthenes.ra.gmail.com@kernel.org (Demos Ra via B4 Relay)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 2/2] tools: ynl: generate code for rt-nexthop bucket
 notifications
Date: Sun, 25 Oct 2026 00:13:56 +0700
Organization: Usenet Network
Message-ID: <20261025-ynl-ntf-bucket-v1-2-65aef308d62c@gmail.com>
References: <20261025-ynl-ntf-bucket-v1-0-65aef308d62c@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="814982"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:APE65QaRFNFwU0Bkrn/QHF6K+Hs= sha256:ktXbzrsCdXzo0bpmE706u0OaQRG3f4WWLIf19TG0HsM=
	sha1:GfeP06N1XIq6pKfTZCV2qiv0AtM= sha256:aQLBn+JLf1DmNEjwCPMqWbNzsVR+PkeAZqtU3Lcy9kk=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4B006111688; Sat, 24 Oct 2026 20:15:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.839
X-Spam-Status: No, score=-3.839 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 4W5izekckyem;
	Sat, 24 Oct 2026 20:15:28 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-351426-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 752F6111685; Sat, 24 Oct 2026 20:15:19 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 3190F603DAD; Sat, 24 Oct 2026 17:15:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792862117;
	b=ZMjyg8+z8S2yqb+aSeJShAJvI/iaoOG8gefqoQR8uGquVBQKT2A/U5DLBp2s1fXFSySR
	 jtRPWSHoHh1WL3sCVeK0hQE6WpsJXf53llAzaeCKye8YSKt/fWR7JZ67zoCZtxgmHRwD+
	 t1UqKeDy0gJYQGcI9IQS9TQ+F3V5L/qe3Hvx5fRnVbk3CxY/WljPwUnAWmZkL4mTfbIp2
	 KbDvo5mKaCqo1XBbPBmxmGAhlF20bgQcLYDpEjImjdffc3C/AvY6rFZIGf5n+/x5IsA1y
	 stDFrZx6frehixW/YUsjUyRdya9gA1hH/1vjFHVZPbQfXOAUu90dnAlaq++tfy0ZluQ==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792862117;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date:
	 Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Message-Id:References:In-Reply-To:To:Cc:X-Mailer:
	 X-Developer-Signature:X-Developer-Key:X-Endpoint-Received:
	 X-Original-From:Reply-To:Content-Transfer-Encoding;
	bh=1KqSa6aGjzQht+7aFFinvBHJH0XqPDZCmVDcbROTz3A=;
	b=01EDAQTzKcNJDe32g4g6UVZQ9BEGRbdW5uYOWTAj/kzViybGwJ2cKA9n91uBsqUU4nLo
	 I7IWydJoFSlpR9+aS1PlOp40EC1FLza4qvVWblLnNKXWDBfCX6mMnuPoa7UC32Qy6uOyt
	 UFypJl/fjRALzUpedIjHNm9CW1Ay1NE8KLm/YXbxEoN8bJbbbbCwkpbu2609OSTpnKj++
	 Q4Gfz62aZpcZn9PFNZ2T/L1i2Fm6SU3AK9huyxe/sVp3cdwqzxt69akjcY9q0Lr8Wdu7Y
	 pnD70ksuOcmc9XS5kEPKcZRlxInKgxeky24dKPLVZYm3Dm8VG4KbgP2kiSq+vvcW5tQ==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bArDxfwz;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FBDB606A31A;
	Sat, 24 Oct 2026 17:15:17 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bArDxfwz
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792862116;
	b=RVDFvZBb2GOXCSKTZqenzhpKHdHeMWv6ED4GqXoWqE5pt3W0SLfOBl3ihYRPdW4JWZIr
	 rR6FMLCsNYQmlki0fRpBL4eimqTYRxNY8JAq8Y6k8GucQYQkZXcc2UZ/mJ+b9o0APjH/Z
	 PzkI2WD4x7zw/4aKyzIseQO6jwVoUxiPaNk5m5CMUFGCJFIXmQ6W7TYyqMGnEVcxFfD8V
	 tb0CIwhHIFaNk3MgOuAFsmb5OkwtKLOJKHKYc4ndZK7tzmLYRuGRhDd4YmR5KIzR+0b/C
	 crcFFCWfd5Y96opySbG2z98ERy7Uk7cIb8xrY4hzmnyc+I9yz48OUDEiKw/NOYb9yBQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792862116;
	h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version:
	 Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer:
	 X-Developer-Signature:X-Developer-Key:X-Endpoint-Received:
	 X-Original-From:Reply-To:Content-Transfer-Encoding;
	bh=1KqSa6aGjzQht+7aFFinvBHJH0XqPDZCmVDcbROTz3A=;
	b=aYtqlIYTSS1Lu33UGYBAs4elVxqFGI3jooLOHIUirCahuVO0/HclfvsWr55mtJtlGIns
	 976aiL1xkGPJb2/mftAfKWwRb3/F3Z8LrqVKTQ7jer6sHnnvvhl1Q803Y0d/OELXXMV4l
	 Tkwz4UUqcGLbErFVTJfZk3wzv8GL9StRnn7v2uxW77KTJHjMNvNwcsYx03ciYhegslEzk
	 wBZ751zkl9D2hEQeyQt4MMZ58+NHqM0GxxPcdmSlZ3KZxt0rvLqjEdFqBIEd1dm7Dj5i9
	 2qgSQOoqHZVurJhPKre5GxLueCpUMjbvOvKqRe/DqUpCDU+Hq1Z0fsP0mp5Z3+I97UQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bArDxfwz;
	arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-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 F28BD606A31F
	for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 17:15:15 +0000 (UTC)
X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77
X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none;
	t=1792862115;
	b=Q63forncUQyW6AWBruKd4lLGUZWhJ+pPzLSWWH9ShSSA/T5SnH21xTiGfBvfSF9B8Kye
	 2HSe6IOsEmSxPrArNxCb7rvvyoO5MNRbwHpuRTk474gU+IMPp4msNTv/GMVRr4Mzj+qLC
	 u7JmavMWYfyC6UcwEufemCZtfifawAXE+T+agjbvP0GXYyIlQQ4KOeMsoVbZEmMMaF88G
	 SZ1lX9GhDe+PIKNaqKs8nRdSdxj57ukzrPBao70W7rTtw6Woz4VgyU/uCQILZf8KPi7+k
	 a7yd4ArftWSlynctzeeeUMqvXAiHFnUTKZkRyDAh5vU5fTgHHBwbFX7T4zLIEZIhEYQ==
X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256;
	c=relaxed/relaxed; t=1792862115;
	h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type:
	 Message-Id:References:In-Reply-To:To:Cc:X-Mailer:
	 X-Developer-Signature:X-Developer-Key:X-Endpoint-Received:
	 X-Original-From:Reply-To:Content-Transfer-Encoding;
	bh=1KqSa6aGjzQht+7aFFinvBHJH0XqPDZCmVDcbROTz3A=;
	b=0mF7DJyxynuG/GMWxFI8MajqdSMyNgefOcCD+rXJZ0lcKTeCEuJ3bF9ikcHPaIJihE1e
	 YEYcGc7bvA5HIUSh7fnYh9IYJFfQBya2aDwzmuU7QTUVCiKsQxBCWtQmyz9POA1vbUrfu
	 Fj135sAEJb4MjYpQT4rniM+vvyayRod0LQv4LIGXyfpcco4pnyyYjFOpJH7s8cvqjKkZd
	 aqTerQN4jvorKWqJpUwx2Bhn76jfnxqdOCEVNR19un3ioNFx45jh0yo6AEU7G2and/tKM
	 IGnpwROy80wlyceXUuD6M32DHICmu6mHSAn7HvOni9P4x1SBTFxe9UF0d54VVyGC2Mw==
X-ARC-Authentication-Results: i=1; smtp.kernel.org; 
	arc=none smtp.remote-ip=100.80.115.77
X-Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.kernel.org (Postfix) with ESMTPS id CE0681F01829;
	Sat, 24 Oct 2026 17:15:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792862115;
	bh=1KqSa6aGjzQht+7aFFinvBHJH0XqPDZCmVDcbROTz3A=;
	h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To;
	b=bArDxfwzcFHY9zFZ5ZhVDsok508TXNQU6u0zmj0O7SLsdd011TzQJnRa2ZCaikqI3
	 1Yk+1yJQg9rHKLHuP7kc/H3LTx0BYVpStEPwV4EAPeYM4ZF3ZckiwoFE8Gfdiore08
	 aq2nVk246RQ/eIq69gG2qn40VsqF6awmhK8qR4sZpz07PxarWi2DDRTDa4mzBCHyYs
	 Qgs7daR+JVHFC0E+oqjXXMoSWHFOnNu1PE8ICt7ndD5qHzz+YSCCg8Sd/Vj5YNYMul
	 9KBqn+R2Znb8+u6p4P0WcVd/L9xXvZeEDn8h01GrlqRB1muaRI4+Ocs7IeXFJHEKPZ
	 y2oSrldQcWkEQ==
X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1])
	by lkml.kernel.org (Postfix) with ESMTP id 3C7074484E;
	Sat, 24 Oct 2026 17:15:14 +0000 (UTC)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261025-ynl-ntf-bucket-v1-0-65aef308d62c@gmail.com>
X-Cc: Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>, 
 Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org, 
 Sashiko <sashiko-bot@kernel.org>, Demos Ra <demosthenes.ra@gmail.com>
X-Mailer: b4 0.14.3
X-Developer-Signature: v=1; a=ed25519-sha256; t=1792862112; l=2406;
 i=demosthenes.ra@gmail.com; s=20261019; h=from:subject:message-id;
 bh=f9ZeZy+zDvDO+mRHxxqISmOxmWt4JRL0xxqUpwYYolE=;
 b=l1WcbvkG7HReRqUj4ESOIOZ0uD7zLVaEkRfCWkaD+a+ClbLZwSMqP3eNuiKF+BP4N1IiOPKxa
 U62kgpzh9vjBBeSNQx1vzvjHNxyUQc7t4vF6SXh8Njtgtn3aAV5otOV
X-Developer-Key: i=demosthenes.ra@gmail.com; a=ed25519;
 pk=sDKS9AI9zxhWgOqkhc9EOIo6cky+anqccB3VGtDvzCc=
X-Endpoint-Received: by B4 Relay for demosthenes.ra@gmail.com/20261019 with
 auth_id=1235
X-Original-From: Demos Ra <demosthenes.ra@gmail.com>
X-Reply-To: demosthenes.ra@gmail.com