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 v5 net-next 07/13] selftests: xsk: run the RX and TX endpoints in separate processes
Date: Mon, 23 Nov 2026 18:46:37 +0000 [thread overview]
Message-ID: <179545959702.3135.5397532567873926560@kernel.org> (raw)
In-Reply-To: <20261119164636.1071385-8-maciej.fijalkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In this commit, a skip decision is not passed between the two
endpoint processes, so they can report different verdicts for one case.
--
selftests: xsk: run the RX and TX endpoints in separate processes
This splits xskxceiver so that each process runs one endpoint, RX or TX,
on one interface. A shadow ifobject stands in for the other side. The
pthreads and the barrier are replaced by a TCP control channel that
carries READY, PROGRESS and ABORT messages between the two processes.
> diff --git a/tools/testing/selftests/net/lib/xsk/test_xsk.c b/tools/testing/selftests/net/lib/xsk/test_xsk.c
> index e0f413ee17ab7..fdf449822f026 100644
> --- a/tools/testing/selftests/net/lib/xsk/test_xsk.c
> +++ b/tools/testing/selftests/net/lib/xsk/test_xsk.c
[ ... ]
> @@ -1622,36 +1663,57 @@ static int testapp_validate_rx_endpoint(struct test_spec *test,
> return err;
> }
>
> -void *worker_testapp_validate_tx(void *arg)
> +static int sync_endpoints(struct test_spec *test)
> +{
> + int err = xsk_peer_ready(ctrl_peer);
> +
> + if (err)
> + ksft_print_msg("Endpoint synchronization failed at step %u: %d (%s)\n",
> + test->current_step, err, strerror(-err));
> + return err;
> +}
[Severity: Medium]
Can a legitimate skip on one endpoint be reported as a fail on the other
one?
The control protocol in xsk_peer.c has only these message types:
enum xsk_peer_msg_type {
XSK_PEER_READY = 1,
XSK_PEER_PROGRESS,
XSK_PEER_ABORT,
};
So a peer that skipped looks the same as a peer that went away.
For example, main() in xskxceiver.c skips an unsupported mode after
setup_peer() has already connected:
if (setup_peer(local_ifobj, shadow_ifobj, &peer))
goto out;
if (!mode_supported(opt_mode, caps)) {
...
ret = TEST_SKIP;
goto out;
}
At the out: label, xsk_peer_close() closes the socket without telling the
peer. The multi-buffer TEST_SKIP in __testapp_validate_traffic() does the
same thing.
The other endpoint is blocked in xsk_peer_ready() and reads EOF. That
gives this chain:
xsk_peer_ready()->peer_recv_one()->io_full() returns -EPIPE
sync_endpoints() prints "Endpoint synchronization failed"
__testapp_validate_traffic() returns TEST_FAILURE
setup_peer() copies local->caps into the shadow. Each endpoint therefore
makes its capability-based skip decisions from its own NIC, and the two
can disagree when the NICs differ.
ADJUST_TAIL splits in a similar way. testapp_validate_rx_endpoint() clears
test->adjust_tail_support only in the RX process:
if (!supported) {
test->adjust_tail_support = false;
return TEST_PASS;
}
As a result, testapp_adjust_tail() returns TEST_SKIP on RX. The TX copy
stays true, and TX reports PASS.
No in-tree launcher runs xskxceiver at this commit. Later in the series,
"selftests: xsk: prepare xskxceiver for endpoints on two hosts" adds
XSK_PEER_SKIP and xsk_peer_skip(), and sync_endpoints() then returns
TEST_SKIP when the peer skipped. After that, "selftests: drv-net: run the
AF_XDP tests over veth or a NIC" adds xsk.py, which reports the RX SKIP /
TX PASS combination as a skip.
Would it make sense to send the skip notification to the peer in this
patch, so the verdicts also match at this point in the series?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119164636.1071385-1-maciej.fijalkowski%40intel.com
next prev parent reply other threads:[~2026-11-23 18:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 16:46 [PATCH v5 net-next 00/13] selftests: net: adjust xskxceiver to drv-net Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 01/13] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 02/13] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-19 16:46 ` [PATCH v5 net-next 03/13] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 04/13] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 05/13] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-19 16:46 ` [PATCH v5 net-next 06/13] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-19 16:46 ` [PATCH v5 net-next 07/13] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko [this message]
2026-11-19 16:46 ` [PATCH v5 net-next 08/13] selftests: xsk: send UDP over IPv4 or IPv6 between the interface MACs Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-23 19:08 ` Björn Töpel
2026-11-19 16:46 ` [PATCH v5 net-next 09/13] selftests: xsk: prepare xskxceiver for endpoints on two hosts Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-19 16:46 ` [PATCH v5 net-next 10/13] selftests: xsk: list the endpoint roles of the test cases Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 11/13] selftests: drv-net: decouple local link setup from netdevsim Maciej Fijalkowski
2026-11-19 16:46 ` [PATCH v5 net-next 12/13] selftests: drv-net: run the AF_XDP tests over veth or a NIC Maciej Fijalkowski
2026-11-23 18:46 ` netdev-bot+sashiko
2026-11-19 16:46 ` [PATCH v5 net-next 13/13] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
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=179545959702.3135.5397532567873926560@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