🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16061

Re: [PATCH net-next 5/5] selftests/bpf: check replacing and detaching XDP on a bond through a link

#16061
From: netdev-bot+sashiko
Date: Fri, 13 Nov 2026 23:53
61 lines
10389 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message of "selftests/bpf: check replacing and
  detaching XDP on a bond through a link" leaves out two things a reader…

--

selftests/bpf: check replacing and detaching XDP on a bond through a link

This adds an xdp_bonding_link_update subtest. The subtest attaches a
program to a bond through a link, replaces it with bpf_link_update(), and
detaches it with bpf_link_detach(). It checks that the veth slave follows
each change and that the replaced program is released.

> Check that the slave follows the replacement and the detach, and that
> the program which got replaced is released - the bond used to leak it.

[Severity: Low]
This isn't a bug, but could the message name the fix this test guards?
The leak appears to have been fixed by commit 184b5ddf82d4 ("bonding: fix
the program leak when XDP is replaced"). That commit's message says the
selftest would come in the net-next series.

The message also leaves out that the slave-side assertions depend on
"net: record XDP programs propagated to lower devices", which is earlier
in this series. The previous patch, "selftests/bpf: check XDP attach on a
nested bond slave", does name that dependency.

bpf_xdp_query_id(veth, XDP_FLAGS_DRV_MODE, &id) reads
dev->xdp_state[XDP_MODE_DRV] through
rtnl_xdp_prog_drv()->dev_xdp_prog_id().

Before that patch, netif_xdp_propagate() only called ndo_bpf() and never
recorded the program on the lower device. A bond slave therefore always
reported id 0.

In test_xdp_bonding_link_update() in
tools/testing/selftests/bpf/prog_tests/xdp_bonding.c, the first slave
check jumps to out before the leak check runs:

	err = bpf_xdp_query_id(veth, XDP_FLAGS_DRV_MODE, &id);
	if (!ASSERT_OK(err, "query veth") ||
	    !ASSERT_EQ(id, old_id, "veth runs the old program"))
		goto out;
	...
	fd = bpf_prog_get_fd_by_id(old_id);
	if (!ASSERT_EQ(fd, -ENOENT, "old program released") && fd >= 0)
		close(fd);

On a kernel that has 184b5ddf82d4 but not the propagation change, the test
fails at the first veth query and the leak assertion never runs.

Could the commit message reference both of these changes?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112235027.4072149-1-kuba%40kernel.org
Technical Details
Message-ID: <179461399762.2199510.9496726183772456630@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362989-linux-kernel-netdev=dewy.ru
References: <20261112235027.4072149-6-kuba@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362989-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 5/5] selftests/bpf: check replacing and detaching
 XDP on a bond through a link
Date: Fri, 13 Nov 2026 23:53:17 +0000
Organization: Usenet Network
Message-ID: <179461399762.2199510.9496726183772456630@kernel.org>
References: <20261112235027.4072149-6-kuba@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1470112"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lHX5c3d6EBM/i0Isg2uNd15CaXE= sha256:0f3t5c+NV8uxChWTEB6RRXHsUgoolJy99EZIVvBzNhk=
	sha1:+Ylyuqw9BWDuMnzoHgQHy8kHZqk= sha256:CQipgOmeS4Qb7ewFex6MmqOf1ifrsZ/ywRapGjzZ0CY=
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 7FAB31146ED; Sat, 14 Nov 2026 02:53:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, 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, URIBL_BLOCKED=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 Gk5-JNe789mF;
	Sat, 14 Nov 2026 02:53:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362989-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 160E51146EC; Sat, 14 Nov 2026 02:53:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 38FEF622F8; Fri, 13 Nov 2026 23:53:27 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794614000;
	b=x5fJC9FaixDRdGbIRmw7L2HU40lDkNPLblwVqvZHf0a3V8NUDbDVPF0ddzg54UJAA5CK
	 gJlb0c7Fd+2AZL6q4S8r9v2eOngAmyKOpWVaAkKe4aN+lNWurRPT92f+uVXKh+XQ35Bje
	 5Pv8Nfgfeu/Q2Lfg/d9BccXLGYIeJIIzdPr9xr8Ei3RSmF0D2yq3EvDnbKe290Cvx/h3L
	 NQ9JFn2Y3ootwF+aaSBKAjaVAEFd1VJapMpqhv1xfIr38hZXGG4oo63jdJlRT/iqkh3SA
	 vqmlswUeVBchiiwbzyRwFrJpUx65EpLZlTVlEFo3i3Rdq1uedDC5QbqPFYpYLNJXUOQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794614000;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=UO7zCD/dIdmHwhrdXFwbWOIaFNY3ih4tudZtgmKXEUw=;
	b=snGkApJN10PnmDnldnBSFLHCq32uTBkc6kVdDI17Xf2Z3XzWZoIYzw9ga9HBY3XnHOEu
	 on0m2hsBFZIdXuMv/UzFJnwOH7hJ4WqOUO6ScaVu3+AcOSmc5XN3SH92dVeo3f361tcoB
	 9hj9pWOXElgCXECulWPtqkAvZ+cybIqMGdvcUYgwznt+vYHVZezaZSSRG3/tykM9Z8BIJ
	 5O0TQlfu8nDjNiO1HwKkzxTcqk97JtdIlz/fB27g1lGA2oMFCJPSGT1xuXtKSOvQSouHG
	 X8FZSJ13FgrZIHQ71Gh10tic8WkpfmO3BhdJdI8XLZgzKNPI9eBn6prf7WpmuzH4a6g==
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=cVNyIedS;
	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 04CD9606A8A5;
	Fri, 13 Nov 2026 23:53:20 +0000 (UTC)
X-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=cVNyIedS
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794613999;
	b=SR84U2ak6rgb/UYnndeO21YzXMO1xn0moK/EWG/EJxrP11h8pm3VOtJW5fCDdHHZHbSe
	 Zi5VjbWPzdC8+jlp31bSguTR5cummFOzANXzmib317G7pMxbzOuj6n0b9VT6DUzrIOITt
	 DxQRt6Z4HdB3TrRBjrJCcEuM52nViuJdxuzhXGuaxQLU5VRypFkabg5xiSksSXJ47huR6
	 nGn0xMs0NuXWFpJBasYjg2+F7FskzwHCsRcG9tW0uDHsot7bKzLKqhMct6rDQoaW8wsb0
	 w5+W7bRY6hjVQuGPn04FJPVhMI9qoNJhSt392O5JzOwTeIGiIii+kjYDUyq8k1fboKQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794613999;
	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=UO7zCD/dIdmHwhrdXFwbWOIaFNY3ih4tudZtgmKXEUw=;
	b=2st43GoksBDnxAQOJucKbjziICX65TX8mnngJjl9HYRp7XvluLwQ0l38L9H9Ufq3qvJg
	 FYxBsGMIOmO8cbFPw4gh49iwsefWQems8aZP2LqRqrgzj3KsghQ2j1SRt9CMvVJW3CVRP
	 vSPTU2zA18Pn52vxUbnZsYTVW0g6xgHupO7lE94qbJjl3s6ZT8q1s3SzWGPAdmpU85BUI
	 sR5uVwWuZWJL9YB1B5xJqA942AWIkW9MWqlr1JKyDqooHICEelq2WkMKNgQuhS0f4CeLM
	 l08UVd17p2VRPDEBF6kcTbVtTfgCysLm8cbWPw5NF7W4sDq2Y8ghCnoc/aemK1dxYmg==
X-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=cVNyIedS;
	arc=none 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 2708D606A891;
	Fri, 13 Nov 2026 23:53:18 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AB061F000C9;
	Fri, 13 Nov 2026 23:53:17 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794613998;
	bh=UO7zCD/dIdmHwhrdXFwbWOIaFNY3ih4tudZtgmKXEUw=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=cVNyIedSVPLpDQ0RaCVl3M62/3SASAjvCWdUk8cop69qQl+JHHn2m2oJPbA9BOLvs
	 PwuEkt/HAic9grpGOOkb2eMYzh+BY5xEhFFDHAqt7Xo/U5B7HsTgE5B84eapfxsaTQ
	 sauJmAl2vf7lHFdnsFWRkUoLsl8aTUXZIxwonPGZomLx42RdU8uhQfxPgS5mqx1OBO
	 YPopFb9x8lr/0WtghAGQPkf0BaRVeUc0jBdDBAyBEOToeSFdcOQt6Fq47czmQIamZW
	 p8k1V50AR+0GEdiPqqmuserdM42IQmd4lfPL45AtQ+mMjMn9/UxUSOC/WLWxvpXSkU
	 TU2p8eHRy1gyQ==
X-Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
 pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org, jv@jvosburgh.net,
 haiyangz@microsoft.com, ast@kernel.org, hawk@kernel.org,
 john.fastabend@gmail.com, sdf@fomichev.me, bpf@vger.kernel.org,
 linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
X-In-Reply-To: <20261112235027.4072149-6-kuba@kernel.org>
X-sashiko-severity: Low
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