Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: kuba@kernel.org
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
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	[thread overview]
Message-ID: <179461399762.2199510.9496726183772456630@kernel.org> (raw)
In-Reply-To: <20261112235027.4072149-6-kuba@kernel.org>

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

  reply	other threads:[~2026-11-13 23:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 23:50 [PATCH net-next 0/5] net: make xdp config checks effective vs netif_xdp_propagate() Jakub Kicinski
2026-11-12 23:50 ` [PATCH net-next 1/5] net: don't safety-check device features for XDP uninstall Jakub Kicinski
2026-11-13 23:53   ` netdev-bot+sashiko
2026-11-14  0:07     ` Jakub Kicinski
2026-11-12 23:50 ` [PATCH net-next 2/5] net: move dev_xdp_set_link() and dev_xdp_set_prog() up Jakub Kicinski
2026-11-12 23:50 ` [PATCH net-next 3/5] net: record XDP programs propagated to lower devices Jakub Kicinski
2026-11-13 23:53   ` netdev-bot+sashiko
2026-11-14  0:16     ` Jakub Kicinski
2026-11-12 23:50 ` [PATCH net-next 4/5] selftests/bpf: check XDP attach on a nested bond slave Jakub Kicinski
2026-11-12 23:50 ` [PATCH net-next 5/5] selftests/bpf: check replacing and detaching XDP on a bond through a link Jakub Kicinski
2026-11-13 23:53   ` netdev-bot+sashiko [this message]
2026-11-13 22:22 ` [PATCH net-next 0/5] net: make xdp config checks effective vs netif_xdp_propagate() Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179461399762.2199510.9496726183772456630@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox