From: Jakub Kicinski <kuba@kernel.org>
To: Juanlu Herrero <juanlu@fastmail.com>
Cc: David Wei <dw@davidwei.uk>,
netdev@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH net-next v3 5/6] selftests: net: add multithread server support to iou-zcrx
Date: Mon, 27 Jul 2026 18:36:13 -0700 [thread overview]
Message-ID: <20260727183613.2775fc23@kernel.org> (raw)
In-Reply-To: <20260722203950.58550-6-juanlu@fastmail.com>
On Wed, 22 Jul 2026 15:39:49 -0500 Juanlu Herrero wrote:
> Run the iou-zcrx server as N worker threads, each owning one receive
> queue with its own io_uring and zero-copy receive (zcrx) ifq, so the
> test can exercise multi-queue zero-copy receive.
>
> The main thread owns the listening socket, accepts connections, and
> dispatches each to the worker owning the queue it landed on by matching
> SO_INCOMING_NAPI_ID against per-queue NAPI IDs.
>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Juanlu Herrero <juanlu@fastmail.com>
> ---
> .../testing/selftests/drivers/net/hw/Makefile | 8 +-
> .../selftests/drivers/net/hw/iou-zcrx.c | 297 ++++++++++++++----
> 2 files changed, 237 insertions(+), 68 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile
> index 3cab3b4adbb2e..946938371c763 100644
> --- a/tools/testing/selftests/drivers/net/hw/Makefile
> +++ b/tools/testing/selftests/drivers/net/hw/Makefile
> @@ -7,14 +7,11 @@ HAS_IOURING_ZCRX := $(shell \
> 'int main() {return 0;}' | \
> $(CC) -luring -x c - -o /dev/null 2>&1 && echo y)
>
> -ifeq ($(HAS_IOURING_ZCRX),y)
> -COND_GEN_FILES += iou-zcrx
> -else
> +ifneq ($(HAS_IOURING_ZCRX),y)
> $(warning excluding iouring tests, liburing not installed or too old)
> endif
why not move this down together with the if condition?
> TEST_GEN_FILES := \
> - $(COND_GEN_FILES) \
> # end of TEST_GEN_FILES
This is now empty, why keep it?
> TEST_PROGS = \
> @@ -72,6 +69,9 @@ YNL_GEN_FILES := \
> ncdevmem \
> toeplitz \
> # end of YNL_GEN_FILES
> +ifeq ($(HAS_IOURING_ZCRX),y)
> +YNL_GEN_FILES += iou-zcrx
Follow the
BLA := \
something \
# end of BLA
formatting for the variables, please
> +endif
> TEST_GEN_FILES += $(YNL_GEN_FILES)
> TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
>
> + {
> + int conns_per_thread = cfg_num_threads > 1 ?
> + CONNS_PER_THREAD : 1;
> + int total_conns = conns_per_thread * cfg_num_threads;
> + int accepted = 0;
> + int connfd;
Floating code blocks like this are considered poor coding style in the
kernel.
next prev parent reply other threads:[~2026-07-28 1:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 20:39 [PATCH net-next v3 0/6] selftests: net: multithreaded multiqueue iou-zcrx Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 1/6] selftests: net: fix get_refill_ring_size() to use its local variable Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 2/6] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 3/6] selftests: net: refactor server state into struct thread_ctx Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 4/6] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 5/6] selftests: net: add multithread server " Juanlu Herrero
2026-07-28 1:36 ` Jakub Kicinski [this message]
2026-07-28 21:26 ` Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 6/6] selftests: net: add rss_multiqueue test variant " Juanlu Herrero
2026-07-28 1:37 ` Jakub Kicinski
2026-07-28 21:27 ` Juanlu Herrero
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=20260727183613.2775fc23@kernel.org \
--to=kuba@kernel.org \
--cc=asml.silence@gmail.com \
--cc=dw@davidwei.uk \
--cc=juanlu@fastmail.com \
--cc=netdev@vger.kernel.org \
/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