From: Juanlu Herrero <juanlu@fastmail.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Tue, 28 Jul 2026 16:26:13 -0500 [thread overview]
Message-ID: <amkdIB64aOXbSCzy@jlhe0197-mac> (raw)
In-Reply-To: <20260727183613.2775fc23@kernel.org>
On Mon, Jul 27, 2026 at 06:36:13PM -0600, Jakub Kicinski wrote:
> 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.
Thanks for the review and makes sense. I will fix these things in v4.
next prev parent reply other threads:[~2026-07-28 21:26 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
2026-07-28 21:26 ` Juanlu Herrero [this message]
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=amkdIB64aOXbSCzy@jlhe0197-mac \
--to=juanlu@fastmail.com \
--cc=asml.silence@gmail.com \
--cc=dw@davidwei.uk \
--cc=kuba@kernel.org \
--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 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.