Re: [PATCH net-next v6 3/5] selftests/bpf: Send XDP feature probes with AF_PACKET

From: netdev-bot+sashiko

Date: Mon Oct 19 2026 - 13:00:34 EST


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 hand-written usage line in argp_program_doc still reads
`USAGE: ./xdp-features [-vt] [-f <xdp-feature>] ...` and does not…

--

selftests/bpf: Send XDP feature probes with AF_PACKET

The tester now uses AF_PACKET to send echo probes and count the replies,
so it no longer needs XDP support. The DUT now attaches through an XDP
link, and the patch adds a -q option that queries native XDP support.
The network_helpers dependency is dropped and veth XDP_TX is skipped.

> diff --git a/tools/testing/selftests/bpf/xdp_features.c b/tools/testing/selftests/bpf/xdp_features.c
> index 97c0e871c5b65..be4acb768e0a2 100644
> --- a/tools/testing/selftests/bpf/xdp_features.c
> +++ b/tools/testing/selftests/bpf/xdp_features.c

[ ... ]

> @@ -78,6 +156,7 @@ const char argp_program_doc[] =
> static const struct argp_option opts[] = {
> { "verbose", 'v', NULL, 0, "Verbose debug output" },
> { "tester", 't', NULL, 0, "Tester mode" },
> + { "query", 'q', NULL, 0, "Check native XDP support without attaching" },

[Severity: Low]
This isn't a bug, but should the usage line in argp_program_doc also
list the new option? It still reads:

"USAGE: ./xdp-features [-vt] [-f <xdp-feature>] [-D <dut-data-ip>] [-T <tester-data-ip>] [-C <dut-ctrl-ip>] <iface-name>\n"

The -q, --query entry shows up in the argp-generated option list, but
the hand-written usage summary leaves it out. The usage line is still
unchanged at the end of the series.

> { "feature", 'f', "XDP-FEATURE", 0, "XDP feature to test" },
> { "dut_data_ip", 'D', "DUT-DATA-IP", 0, "DUT IP data channel" },
> { "dut_ctrl_ip", 'C', "DUT-CTRL-IP", 0, "DUT IP control channel" },

[ ... ]

> @@ -719,6 +969,20 @@ int main(int argc, char **argv)
> return -ENODEV;
> }
>
> + if (env.query_only) {
> + LIBBPF_OPTS(bpf_xdp_query_opts, opts);
> +
> + err = bpf_xdp_query(env.ifindex, XDP_FLAGS_DRV_MODE, &opts);
> + if (err)
> + return 1;
> + return opts.feature_flags & NETDEV_XDP_ACT_BASIC ? 0 : 4;
> + }

[Severity: Low]
Could the exit codes for query mode be documented somewhere, such as in
argp_program_doc or the -q help text?

Here 0 means NETDEV_XDP_ACT_BASIC is advertised, 4 means it is not, and
1 means bpf_xdp_query() failed. None of this is described in the tool.

Later in the series, run_feature() in drivers/net/hw/xdp_features.py
treats probe.ret == 4 as a skip, so the contract is already in use.

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261018-xdp-v5-send-20261008-v6-0-7336e1282ca3%40gmail.com