All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bobby Eshleman" <bobbyeshleman@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v2 4/6] selftests: drv-net: refactor devmem command builders into lib module
Date: Wed, 06 May 2026 00:29:06 +0000	[thread overview]
Message-ID: <20260506002906.91F3EC2BCB4@smtp.kernel.org> (raw)
In-Reply-To: <20260504-tcp-dm-netkit-v2-4-56d52ac72fd4@meta.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The refactored `run_rx` and `run_rx_hds` helpers drop the flow steering and client port binding arguments, silently disabling flow steering for standard physical NIC devmem tests.
--

commit 0ae7610db2ce14629da2e4367ef33db95c059f70
Author: Bobby Eshleman <bobbyeshleman@meta.com>

selftests: drv-net: refactor devmem command builders into lib module

This commit refactors the devmem netkit tests to use helper builders in a
library module. It breaks out the rx/tx functions into a shared lib to be
used by both plain and netkit environments.

> diff --git a/tools/testing/selftests/drivers/net/hw/lib/py/devmem.py b/tools/testing/selftests/drivers/net/hw/lib/py/devmem.py
> new file mode 100644
> index 000000000000..6f8a3f5aae14
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/hw/lib/py/devmem.py

[ ... ]

> +def run_rx(cfg):
> +    require_devmem(cfg)
> +    if hasattr(cfg, 'netns'):
> +        configure_nic(cfg)
> +    port = rand_port()
> +    socat = socat_send(cfg, port)
> +    data_pipe = (f"yes $(echo -e \x01\x02\x03\x04\x05\x06) | head -c 1K"
> +                 f" | {socat}")
> +    ns = getattr(cfg, "netns", None)
> +
> +    listen_cmd = ncdevmem_rx(cfg, port)

Does this drop the flow steering and client port binding arguments for standard
physical NIC devmem tests?

In the original code, socat was invoked with bind={cfg.remote_baddr}:{port}
and ncdevmem was invoked with -c {cfg.remote_addr}. The -c flag instructs
ncdevmem to install a 5-tuple hardware flow rule via ethtool to steer
traffic strictly to the specific RX queue bound to the devmem memory provider.

Since run_rx() and run_rx_hds() call socat_send() and ncdevmem_rx() without
overriding their default arguments (bind=False and flow_steer=False), no flow
rule is installed for non-netkit environments, and packets are distributed via
standard RSS hashing.

If packets bypass the devmem-bound queue, they are processed by standard
TCP host-copy paths. Could this cause the test to silently pass while
failing to actually exercise the devmem zero-copy feature?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260504-tcp-dm-netkit-v2-0-56d52ac72fd4@meta.com?part=4

  reply	other threads:[~2026-05-06  0:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  0:27 [PATCH net-next v2 0/6] net: devmem: support devmem with netkit devices Bobby Eshleman
2026-05-05  0:27 ` [PATCH net-next v2 1/6] net: add netmem_tx modes that indicate dma capability Bobby Eshleman
2026-05-05 17:41   ` Harshitha Ramamurthy
2026-05-07  2:30   ` Jakub Kicinski
2026-05-05  0:27 ` [PATCH net-next v2 2/6] net: devmem: support TX over NETMEM_TX_NO_DMA devices Bobby Eshleman
2026-05-06  0:29   ` sashiko-bot
2026-05-06  1:18     ` Bobby Eshleman
2026-05-06 15:00       ` Bobby Eshleman
2026-05-07  2:34   ` Jakub Kicinski
2026-05-07 15:38     ` Bobby Eshleman
2026-05-05  0:27 ` [PATCH net-next v2 3/6] selftests: drv-net: ncdevmem: add -n flag to skip NIC configuration Bobby Eshleman
2026-05-05  0:27 ` [PATCH net-next v2 4/6] selftests: drv-net: refactor devmem command builders into lib module Bobby Eshleman
2026-05-06  0:29   ` sashiko-bot [this message]
2026-05-05  0:27 ` [PATCH net-next v2 5/6] selftests: drv-net: add primary_rx_redirect support to NetDrvContEnv Bobby Eshleman
2026-05-06  0:29   ` sashiko-bot
2026-05-05  0:27 ` [PATCH net-next v2 6/6] selftests: drv-net: add netkit devmem tests Bobby Eshleman
2026-05-06  0:29   ` sashiko-bot

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=20260506002906.91F3EC2BCB4@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bobbyeshleman@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    /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.