From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
<magnus.karlsson@intel.com>, <stfomichev@gmail.com>,
<kuba@kernel.org>, <pabeni@redhat.com>,
<tushar.vyavahare@intel.com>, <kerneljasonxing@gmail.com>
Subject: Re: [PATCH v3 net-next 11/15] selftests: xsk: add a hardware mode to xskxceiver
Date: Thu, 15 Oct 2026 12:55:11 +0200 [thread overview]
Message-ID: <atCxD0EJHCRBR+pI@boxer> (raw)
In-Reply-To: <87tsmn5mg4.fsf@all.your.base.are.belong.to.us>
On Thu, Oct 15, 2026 at 11:42:51AM +0200, Björn Töpel wrote:
> Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:
>
> > drivers/net/hw/xsk.py, added later in this series, runs each hardware
> > AF_XDP case as a zero-copy DUT endpoint and an SKB-mode remote endpoint
> > over a physical link, without negotiating capabilities between them.
> > Add what such a run needs to xskxceiver:
> >
> > - --hw sends UDP/IPv4 test packets (--udp-src, --udp-dst, --udp-port)
> > between the real interface MACs (--peer-mac); XDP_SHARED_UMEM, whose
> > program picks the socket by a synthetic destination MAC, skips
>
> This reads weird to me.
>
> I wonder if we can avoid introducing a separate "hardware" mode here? It
> seems to bundle packet format, link handling, and assumptions about the
> endpoint modes. Those are separate concerns, and much of this should
> work with veth too, no?
>
> Could we first make the real MAC addresses and IPv4/UDP format common to
> both veth and physical-device runs?
I must admit I have not tried that and --hw introduction feels like veth
approach is still a first-class citizen here. Aligning both test runners
would simplify stuff I assume, will look at it.
>
> Then --listen could work independently, timeouts could be configurable,
> and test selection could reflect the actual endpoint modes and
> capabilities.
You select cases based on DUT's endpoint and its capabilities. Regarding
timeouts, we can add a knob for it, sure.
> For example, skipping TX_QUEUE_CONSUMER because hw_test
> implies mixed ZC/SKB endpoints seems to encode the launcher's current
> configuration into the test itself. "Real" endpoints could also run the
> same mode.
This test has nothing to do with ZC at all, Jason added this during one of
the many xsk_generic_xmit() bugfixes.
https://lore.kernel.org/bpf/20250703141712.33190-3-kerneljasonxing@gmail.com/
Remote endpoint's role is rather limited and I wanted to be sure that we
cover both tx and rx sides from particular test cases, that's the purpose
behind --direction and storing test cases within 'hw_group's.
>
> If we need to keep both packet formats, something like
> --packet-format=udp would maybe describe it better. I'd prefer keeping
> these behaviors independent rather than giving the combined mode another
> name.
Nah, let's make veth runner use what currently 'hw' side does.
>
> Also, we need IPv6 support here in addition to IPv4. You can't assume
> that the DUT is onlink or IPv4.
Is that currently a show-stopper? That is another left-over from old
architecture where data path was rather on a local and isolated
environment... /me finding excuses ;)
>
>
> Björn
next prev parent reply other threads:[~2026-10-15 10:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 18:45 [PATCH v3 net-next 00/15] selftests: net: migrate AF_XDP test suite over to net Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 01/15] selftests: xsk: factor endpoint work out of pthread wrappers Maciej Fijalkowski
2026-10-15 8:14 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 02/15] selftests: xsk: size the TX UMEM in HW_SW_MAX_RING_SIZE Maciej Fijalkowski
2026-10-15 8:15 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 03/15] selftests: xsk: drop the single-interface loopback mode Maciej Fijalkowski
2026-10-15 8:17 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 04/15] selftests/bpf: drop the test_progs AF_XDP wrapper Maciej Fijalkowski
2026-10-15 8:18 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 05/15] selftests: net: add a generic rule for BPF skeletons Maciej Fijalkowski
2026-10-15 8:20 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 06/15] selftests: xsk: move the AF_XDP test suite to selftests/net Maciej Fijalkowski
2026-10-15 8:22 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 07/15] selftests: xsk: collect interface capabilities in struct xsk_caps Maciej Fijalkowski
2026-10-15 8:27 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 08/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup Maciej Fijalkowski
2026-10-15 8:29 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation Maciej Fijalkowski
2026-10-15 8:34 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 10/15] selftests: xsk: run the RX and TX endpoints in separate processes Maciej Fijalkowski
2026-10-15 9:04 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 11/15] selftests: xsk: add a hardware mode to xskxceiver Maciej Fijalkowski
2026-10-15 9:42 ` Björn Töpel
2026-10-15 10:55 ` Maciej Fijalkowski [this message]
2026-10-14 18:45 ` [PATCH v3 net-next 12/15] selftests: xsk: pass non-test traffic to the stack in hardware mode Maciej Fijalkowski
2026-10-15 10:05 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 13/15] selftests: xsk: list the hardware test cases Maciej Fijalkowski
2026-10-14 18:45 ` [PATCH v3 net-next 14/15] selftests: drv-net: test AF_XDP zero-copy with an SKB peer Maciej Fijalkowski
2026-10-15 10:29 ` Björn Töpel
2026-10-14 18:45 ` [PATCH v3 net-next 15/15] 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=atCxD0EJHCRBR+pI@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--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