Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: maciej.fijalkowski@intel.com
Cc: netdev@vger.kernel.org, magnus.karlsson@intel.com,
	stfomichev@gmail.com, kuba@kernel.org, pabeni@redhat.com,
	tushar.vyavahare@intel.com, kerneljasonxing@gmail.com,
	bjorn@kernel.org
Subject: Re: [PATCH v6 net-next 10/15] selftests: xsk: prepare xskxceiver for endpoints on two hosts
Date: Sat, 28 Nov 2026 15:08:40 +0000	[thread overview]
Message-ID: <179587852037.3135.13204692766762577033@kernel.org> (raw)
In-Reply-To: <20261127150527.1122049-11-maciej.fijalkowski@intel.com>

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 patch says the new SKIP message lets the peer of a skipping
  endpoint skip too.
- [Low] The commit message leaves out two behaviour changes that affect
  verdicts.

--

selftests: xsk: prepare xskxceiver for endpoints on two hosts

This commit prepares xskxceiver to run each case between a zero-copy
endpoint and an SKB-mode endpoint on two hosts. It adds --queue,
--max-frags and --timeout, a SKIP control message, and probing of only
the endpoint's own mode. It also changes the default case MTU to 1500,
and cleanup_iface() now restores the original MTU.

> Cases now default to an MTU of 1500 rather than 1518: IFLA_MTU is the
> L3 MTU, so the old default changed it for every case, which can reset a
> NIC. An SKB-mode endpoint raises
> its MTU only when a case needs more, and cleanup_iface() restores it
> after the XDP detach, retrying for up to --timeout, as a driver can
> refuse it while it holds the pool of a closed socket.

[Severity: Low]

This isn't a bug, but the commit message leaves out two changes that
affect verdicts.

testapp_adjust_tail_grow() and testapp_adjust_tail_grow_mb() used to skip
whenever test->mode == TEST_MODE_SKB. They now call
adjust_tail_grow_skip(), which also requires ifobj_is_local(test->ifobj_rx).
An SKB-mode TX endpoint now runs these cases and learns about a skip from
its peer.

The verdict is now reported from main() after cleanup_iface(). A failed
MTU restore turns a PASS or SKIP into TEST_FAILURE. Because ret is then no
longer TEST_SKIP, xsk_peer_skip() is not called. The peer gets EOF without
a SKIP and reports a sync failure.

The rule that a failed restore fails the case appears only in a code
comment. Could the commit message mention both changes?

> diff --git a/tools/testing/selftests/net/lib/xsk/xskxceiver.c b/tools/testing/selftests/net/lib/xsk/xskxceiver.c
> index f7fa9ab93512d..7ef6f08538bd7 100644
> --- a/tools/testing/selftests/net/lib/xsk/xskxceiver.c
> +++ b/tools/testing/selftests/net/lib/xsk/xskxceiver.c

[ ... ]

> @@ -558,8 +598,17 @@ int main(int argc, char **argv)
>
>  out:
>  	xsk_set_endpoint(NULL);
> -	cleanup_iface(ifobj_tx);
> -	cleanup_iface(ifobj_rx);
> +	err = cleanup_iface(ifobj_tx);
> +	err |= cleanup_iface(ifobj_rx);
> +	/* A passed or skipped case still fails if it cannot restore the MTU. */
> +	if (err)
> +		ret = TEST_FAILURE;
> +	/* After the cleanup, which can still fail a case that ran. */
> +	if (test.test_func)
> +		report_pkt_test(&test, ret);
> +	/* The peer skips the case too, rather than fail on the closed connection. */
> +	if (ret == TEST_SKIP)
> +		xsk_peer_skip(peer, opt_timeout * 1000);

[Severity: Low]

Does the peer really skip too in the XDP_ADJUST_TAIL_* cases when the
skip is decided after the traffic step?

Take an RX driver whose bpf_xdp_adjust_tail() returns -EOPNOTSUPP.
xsk_xdp_adjust_tail() redirects the packet unchanged, and __receive_pkts()
fails on the length. The RX side then does:

testapp_adjust_tail()
  testapp_xdp_adjust_tail()->...->testapp_validate_rx_endpoint()
      if (!is_adjust_tail_supported(ifobject->xdp_progs)) {
          test->adjust_tail_support = false;
          return TEST_PASS;
      }
  ...
  if (!test->adjust_tail_support)
      return TEST_SKIP;

No ABORT is sent, and the SKIP goes to the peer only from this point in
main(), after cleanup.

The TX process never clears its own copy of adjust_tail_support. It sends
DEFAULT_BATCH_SIZE packets, well below the in-flight limit, so it never
reaches the new xsk_peer_skipped() check in __send_pkts().

If the SKIP arrives during pacing_tx_sync(), peer_drain() treats it as a
closed peer and returns 0. This single-step case also never calls
sync_endpoints() again.

So TX's testapp_adjust_tail() returns 0. TX reports PASS while RX reports
SKIP for the same case.

The drivers/net/xsk.py harness later in the series still combines exit
codes of {0, SKIP} into a skip. However, this comment and the comment
above xsk_peer_skip() ("so that it skips too") do not hold on this path.
Should the comments say so, or should the TX side pick up a SKIP that
arrives after the traffic step?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127150527.1122049-1-maciej.fijalkowski%40intel.com

  reply	other threads:[~2026-11-28 15:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 15:05 [PATCH v6 net-next 00/15] selftests: net: adjust xskxceiver to drv-net Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 01/15] selftests: xsk: fix the stack overrun in is_adjust_tail_supported() Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 02/15] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 03/15] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 04/15] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 05/15] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 06/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-11-28 15:08   ` netdev-bot+sashiko
2026-11-27 15:05 ` [PATCH v6 net-next 07/15] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 08/15] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 09/15] selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs Maciej Fijalkowski
2026-11-28 15:08   ` netdev-bot+sashiko
2026-11-27 15:05 ` [PATCH v6 net-next 10/15] selftests: xsk: prepare xskxceiver for endpoints on two hosts Maciej Fijalkowski
2026-11-28 15:08   ` netdev-bot+sashiko [this message]
2026-11-27 15:05 ` [PATCH v6 net-next 11/15] selftests: xsk: wait up to --timeout for the RX stats and a busy bind Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 12/15] selftests: xsk: list the endpoint roles of the test cases Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 13/15] selftests: drv-net: rename nsim_test to sw_test Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 14/15] selftests: drv-net: decouple local link setup from netdevsim Maciej Fijalkowski
2026-11-27 15:05 ` [PATCH v6 net-next 15/15] selftests: drv-net: run the AF_XDP tests over veth or a NIC Maciej Fijalkowski
2026-11-28 15:08   ` netdev-bot+sashiko

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=179587852037.3135.13204692766762577033@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=kerneljasonxing@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stfomichev@gmail.com \
    --cc=tushar.vyavahare@intel.com \
    /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