From: Juanlu Herrero <juanlu@fastmail.com>
To: David Wei <dw@davidwei.uk>
Cc: netdev@vger.kernel.org, io-uring@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
kuba@kernel.org, asml.silence@gmail.com, pabeni@redhat.com,
shuah@kernel.org
Subject: Re: [PATCH net-next v5 5/6] selftests: net: add multithread server support to iou-zcrx
Date: Mon, 17 Aug 2026 09:09:54 -0500 [thread overview]
Message-ID: <aoMWDiA1NnyqxoB7@jlhe0197-mac> (raw)
In-Reply-To: <34915029-869a-4a5a-9bde-060a9a6eec20@davidwei.uk>
On Fri, Aug 14, 2026 at 08:50:29AM -0600, David Wei wrote:
> On 2026-08-13 18:23, 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 | 5 +-
> > .../selftests/drivers/net/hw/iou-zcrx.c | 262 +++++++++++++-----
> > 2 files changed, 195 insertions(+), 72 deletions(-)
> >
> [...]
> > diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> > index f793a6c04e412..008d3f4b76263 100644
> > --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> > +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> [...]
> > @@ -289,12 +279,13 @@ static void process_recvzc(struct thread_ctx *ctx, struct io_uring_cqe *cqe)
> > error(1, 0, "recvzc(): %d", cqe->res);
> > if (cfg_oneshot) {
> > - if (cqe->res == 0 && cqe->flags == 0 && cfg_oneshot_recvs) {
> > - add_recvzc_oneshot(ctx, ctx->connfd, page_size);
> > - cfg_oneshot_recvs--;
> > + if (cqe->res == 0 && cqe->flags == 0 &&
> > + ctx->oneshot_recvs[conn_idx]) {
> > + add_recvzc_oneshot(ctx, conn_idx, page_size);
> > + ctx->oneshot_recvs[conn_idx]--;
>
> This needs an early return. Sorry the bug was pre-existing but I just
> noticed it.
ack, I will fix that in v6.
Best,
Juanlu
next prev parent reply other threads:[~2026-08-17 14:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 1:23 [PATCH net-next v5 0/6] selftests: net: multithreaded multiqueue iou-zcrx Juanlu Herrero
2026-08-14 1:23 ` [PATCH net-next v5 1/6] selftests: net: fix get_refill_ring_size() to use its local variable Juanlu Herrero
2026-08-14 1:23 ` [PATCH net-next v5 2/6] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-08-14 1:23 ` [PATCH net-next v5 3/6] selftests: net: refactor server state into struct thread_ctx Juanlu Herrero
2026-08-14 16:06 ` David Wei
2026-08-14 1:23 ` [PATCH net-next v5 4/6] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-08-14 16:04 ` David Wei
2026-08-14 1:23 ` [PATCH net-next v5 5/6] selftests: net: add multithread server " Juanlu Herrero
2026-08-14 15:50 ` David Wei
2026-08-17 14:09 ` Juanlu Herrero [this message]
2026-08-14 1:23 ` [PATCH net-next v5 6/6] selftests: net: add rss_multiqueue test variant " Juanlu Herrero
2026-08-14 16:01 ` David Wei
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=aoMWDiA1NnyqxoB7@jlhe0197-mac \
--to=juanlu@fastmail.com \
--cc=asml.silence@gmail.com \
--cc=dw@davidwei.uk \
--cc=io-uring@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@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