From: "Björn Töpel" <bjorn@kernel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
netdev-bot+sashiko@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 14/15] selftests: drv-net: test AF_XDP zero-copy with an SKB peer
Date: Sun, 18 Oct 2026 17:51:25 +0200 [thread overview]
Message-ID: <87wlrf2eiq.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <atPDf2DpOfWLt9cT@boxer>
Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:
>> [Severity: Medium]
>> On NICs that steer flows based on TX, is taking the queue out of RSS
>> enough to keep the TCP control connection off it?
>>
>> Flow Director ATR is on by default on i40e. i40e_atr() samples TCP TX
>> packets, including the SYN. It then programs an FD filter that steers the
>> flow's RX to the queue of the TX ring:
>>
>> drivers/net/ethernet/intel/i40e/i40e_txrx.c:i40e_atr() {
>> ...
>> flex_ptype = FIELD_PREP(I40E_TXD_FLTR_QW0_QINDEX_MASK,
>> tx_ring->queue_index);
>> ...
>> }
>
> SO CLOSE! This one has to be addressed as atr is turned on by default and
> this could cause i40e runs being stochastic. I must admit I did not have
> i40e setup on my side, but it has full AF_XDP feature support (including
> mbuf zc) so its coverage matters.
>
> Fix would be:
>
> diff --git a/tools/testing/selftests/drivers/net/hw/xsk.py b/tools/testing/selftests/drivers/net/hw/xsk.py
> --- a/tools/testing/selftests/drivers/net/hw/xsk.py
> +++ b/tools/testing/selftests/drivers/net/hw/xsk.py
> @@ -115,6 +115,16 @@ def _reserve_queue(cfg, undo):
> return queue
>
>
> +def _disable_atr(cfg, undo):
> + """i40e ATR steers what a TCP connection receives to the queue that it
> + sends from, which can be the zero-copy one, so turn it off until undo."""
> + flags = cmd(f"ethtool --show-priv-flags {cfg.ifname}", fail=False).stdout
> + if re.search(r"^flow-director-atr\s*: on$", flags, re.MULTILINE):
> + priv = f"--set-priv-flags {cfg.ifname} flow-director-atr"
> + ethtool(f"{priv} off")
> + undo.callback(ethtool, f"{priv} on")
> +
> +
> def _steer_udp(cfg, undo, ifname, queue, host=None):
> """Steer the test flow to queue until undo, return False if ifname
> cannot."""
> @@ -313,6 +323,7 @@ def main():
> cfg.queue = _reserve_queue(cfg, undo)
> if cfg.queue is None:
> sys.exit(SKIP_CODE)
> + _disable_atr(cfg, undo)
>
> cfg.udp_port = rand_port()
> steered = (_steer_udp(cfg, undo, cfg.ifname, cfg.queue) and
Sneaky ATR. Is i40e run in the HW selftests? Could this be a follow-up?
Björn
next prev parent reply other threads:[~2026-10-18 15:51 UTC|newest]
Thread overview: 51+ 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-15 18:46 ` sashiko-bot
2026-10-17 3:06 ` netdev-bot+sashiko
2026-10-17 14:40 ` Maciej Fijalkowski
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-17 3:06 ` netdev-bot+sashiko
2026-10-17 14:50 ` Maciej Fijalkowski
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-17 3:06 ` netdev-bot+sashiko
2026-10-17 15:31 ` Maciej Fijalkowski
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-17 3:06 ` netdev-bot+sashiko
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-15 18:46 ` sashiko-bot
2026-10-17 3:06 ` netdev-bot+sashiko
2026-10-17 16:04 ` Maciej Fijalkowski
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
2026-10-15 16:03 ` Björn Töpel
2026-10-17 3:06 ` netdev-bot+sashiko
2026-10-17 17:40 ` Maciej Fijalkowski
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-17 3:06 ` netdev-bot+sashiko
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-15 12:52 ` Maciej Fijalkowski
2026-10-15 18:46 ` sashiko-bot
2026-10-17 3:06 ` netdev-bot+sashiko
2026-10-17 18:50 ` Maciej Fijalkowski
2026-10-18 15:51 ` Björn Töpel [this message]
2026-10-14 18:45 ` [PATCH v3 net-next 15/15] selftests: xsk: document generic and hardware endpoint runs Maciej Fijalkowski
2026-10-17 3:06 ` 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=87wlrf2eiq.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev-bot+sashiko@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.