From: David Wei <dw@davidwei.uk>
To: Juanlu Herrero <juanlu@fastmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 2/5] selftests: net: add multithread client support to iou-zcrx
Date: Thu, 9 Apr 2026 08:51:11 -0700 [thread overview]
Message-ID: <8fa08d73-28a3-4521-bcfb-ec81869c24f3@davidwei.uk> (raw)
In-Reply-To: <20260408163816.2760-3-juanlu@fastmail.com>
On 2026-04-08 09:38, Juanlu Herrero wrote:
> Add pthreads to the iou-zcrx client so that multiple connections can be
> established simultaneously. Each client thread connects to the server
> and sends its payload independently.
>
> Introduce struct thread_ctx and the -t option to control the number of
> threads (default 1), preserving backwards compatibility with existing
> tests.
>
> Signed-off-by: Juanlu Herrero <juanlu@fastmail.com>
> ---
> .../testing/selftests/drivers/net/hw/Makefile | 2 +-
> .../selftests/drivers/net/hw/iou-zcrx.c | 46 +++++++++++++++++--
> 2 files changed, 44 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile
> index deeca3f8d080..227adfec706c 100644
> --- a/tools/testing/selftests/drivers/net/hw/Makefile
> +++ b/tools/testing/selftests/drivers/net/hw/Makefile
> @@ -80,5 +80,5 @@ include ../../../net/ynl.mk
> include ../../../net/bpf.mk
>
> ifeq ($(HAS_IOURING_ZCRX),y)
> -$(OUTPUT)/iou-zcrx: LDLIBS += -luring
> +$(OUTPUT)/iou-zcrx: LDLIBS += -luring -lpthread
> endif
> diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> index 334985083f61..de2eea78a5b6 100644
> --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
> @@ -4,6 +4,7 @@
> #include <error.h>
> #include <fcntl.h>
> #include <limits.h>
> +#include <pthread.h>
> #include <stdbool.h>
> #include <stdint.h>
> #include <stdio.h>
> @@ -85,8 +86,14 @@ static int cfg_send_size = SEND_SIZE;
> static struct sockaddr_in6 cfg_addr;
> static unsigned int cfg_rx_buf_len;
> static bool cfg_dry_run;
> +static int cfg_num_threads = 1;
>
> static char *payload;
> +
> +struct thread_ctx {
> + int thread_id;
This is set here and in patch 4 but I don't see it being used.
next prev parent reply other threads:[~2026-04-09 15:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 16:38 [PATCH 0/5] selftests: net: add multithread and multiqueue support to iou-zcrx Juanlu Herrero
2026-04-08 16:38 ` [PATCH 1/5] selftests: net: fix get_refill_ring_size() to use its local variable Juanlu Herrero
2026-04-08 16:38 ` [PATCH 2/5] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-04-09 15:51 ` David Wei [this message]
2026-04-13 15:19 ` Juanlu Herrero
2026-04-13 15:44 ` Juanlu Herrero
2026-04-08 16:38 ` [PATCH 3/5] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-04-08 16:38 ` [PATCH 4/5] selftests: net: add multithread server support to iou-zcrx Juanlu Herrero
2026-04-08 16:38 ` [PATCH 5/5] selftests: net: add rss_multiqueue test variant " Juanlu Herrero
2026-04-10 22:26 ` David Wei
2026-04-13 16:01 ` Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 0/6] selftests: net: multithread + rss_multiqueue support for iou-zcrx Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 1/6] selftests: net: fix get_refill_ring_size() to use its local variable Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 2/6] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 3/6] selftests: net: refactor server state into struct thread_ctx Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 4/6] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 5/6] selftests: net: add multithread server " Juanlu Herrero
2026-04-17 16:49 ` [PATCH v2 6/6] selftests: net: add rss_multiqueue test variant " Juanlu Herrero
2026-04-18 16:49 ` [PATCH v2 0/6] selftests: net: multithread + rss_multiqueue support for iou-zcrx Jakub Kicinski
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=8fa08d73-28a3-4521-bcfb-ec81869c24f3@davidwei.uk \
--to=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