Netdev List
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	netdev@vger.kernel.org
Cc: magnus.karlsson@intel.com, stfomichev@gmail.com, kuba@kernel.org,
	pabeni@redhat.com, tushar.vyavahare@intel.com,
	kerneljasonxing@gmail.com,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH v5 net-next 09/13] selftests: xsk: prepare xskxceiver for endpoints on two hosts
Date: Mon, 23 Nov 2026 20:10:23 +0100	[thread overview]
Message-ID: <87tsl7pdnk.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20261119164636.1071385-10-maciej.fijalkowski@intel.com>

Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:

> drivers/net/xsk.py, added later in this series, runs each hardware
> AF_XDP case on a NIC with a zero-copy endpoint on the device under test
> and an SKB-mode endpoint on a remote host, without negotiating
> capabilities between them. Add what such a pair needs:
>
> - --queue binds a queue other than 0
> - --max-frags, up to 0xffff as it sizes a packet array, hands both
>   endpoints the DUT limit for TOO_MANY_FRAGS, as each one builds the
>   packet stream from its own view of it
> - --timeout, 1 to 0xffff seconds as it is passed on in milliseconds as
>   an int, sets the RX and TX loop timeout, 3s by default, and once both
>   endpoints are ready, each waits up to as long while its link is down,
>   as an MTU or XDP program change on either host can reset a NIC
> - an endpoint probes only the mode it runs in, taking zero-copy support
>   from NETDEV_XDP_ACT_XSK_ZEROCOPY rather than from a probe bind; its
>   XDP_ZEROCOPY bind fails rather than falling back to copy mode, so a
>   false advertisement still fails the case
> - an endpoint that only transmits attaches the XDP program only in
>   zero-copy mode, where a driver can require one for TX wakeups
> - an RX endpoint fills its fill ring before the bind, as a zero-copy
>   driver posts its RX buffers then and would otherwise wait for the
>   first wakeup, which comes only after READY lets the peer send
> - an endpoint that skips a case sends SKIP on the control channel, so
>   that its peer skips too rather than failing on the closed connection;
>   this is how a TX endpoint learns that both XDP_ADJUST_TAIL_GROW cases
>   skip on an SKB-mode RX endpoint. It then reads until the peer closes,
>   for up to the timeout, as closing with unread data resets the
>   connection, which drops a SKIP that the peer has yet to acknowledge
>
> Cases now default to an MTU of 1500 (ETH_DATA_LEN) rather than the
> 1518 byte frame size: IFLA_MTU counts the L3 MTU, so the old default
> changed a standard MTU, which can reset a NIC, for every case. An
> SKB-mode endpoint raises its MTU only when a case needs a larger one,
> so a jumbo-MTU peer is not reset twice per case. cleanup_iface()
> restores the MTU that bind_iface() found once the XDP program, which
> can cap it, is detached, and fails the endpoint if it cannot, so the
> result is reported after cleanup_iface().
>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Reviewed-by: Björn Töpel <bjorn@kernel.org>

  parent reply	other threads:[~2026-11-23 19:10 UTC|newest]

Thread overview: 25+ 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
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-23 19:10   ` Björn Töpel [this message]
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-23 19:12   ` Björn Töpel
2026-11-19 16:46 ` [PATCH v5 net-next 11/13] selftests: drv-net: decouple local link setup from netdevsim Maciej Fijalkowski
2026-11-23 19:12   ` Björn Töpel
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=87tsl7pdnk.fsf@all.your.base.are.belong.to.us \
    --to=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