mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Wei <dw@davidwei.uk>
To: Juanlu Herrero <juanlu@fastmail.com>, netdev@vger.kernel.org
Cc: 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: Fri, 14 Aug 2026 08:50:29 -0700	[thread overview]
Message-ID: <34915029-869a-4a5a-9bde-060a9a6eec20@davidwei.uk> (raw)
In-Reply-To: <20260814012348.46958-6-juanlu@fastmail.com>

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.

  reply	other threads:[~2026-08-14 15:50 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 [this message]
2026-08-17 14:09     ` Juanlu Herrero
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=34915029-869a-4a5a-9bde-060a9a6eec20@davidwei.uk \
    --to=dw@davidwei.uk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=juanlu@fastmail.com \
    --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

all inboxes | Powered by JetHome®