From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CAC118BBAE for ; Mon, 13 Apr 2026 15:19:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776093547; cv=none; b=L+cgPTDUVG4lkYzW48DDxh7YBnxuProC85p5qaQ3aqBDAOJwRPy5apnGwXIqkL0LAVgxjpbhOrp1v+4CfAJgbNsEno1cezP4zt7urk2zSOEMmi4WFaac9xX5MN+o1lwPxkiw3TSiwr9BesxY0eCVt6W/mRz5gtVtz5xgOaBMaLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776093547; c=relaxed/simple; bh=lRIbd2puX2Xuc7fn3NAe+LxWkJXncYFfffg0gBzQDG0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qs//+elJND3G84uihHvOBMiKJkCKd2USiHu9o0gTQ+ho+nC/vMlwjxl4K5YG4wvn+TVDgJLphACk45uh6UXqg53i3FWcuRzzeZglBgH09pGFEtbXrcIgrEjl66npwW85U0CFCPuqpEv7FBOZwWlFHcDUimW9c5PmW0A+R/pzDcA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=AgSbnkVQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=j1st82to; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="AgSbnkVQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="j1st82to" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id B778614001B2; Mon, 13 Apr 2026 11:19:04 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 13 Apr 2026 11:19:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1776093544; x=1776179944; bh=/WqfHvblM1 y635/VbSb5sAKg1ea+rwbeWWMFPMSkBUY=; b=AgSbnkVQCa0EjDAzYyM3ZforCB 8rkgy26edPkw4V9MthnkgOY6xq+un+c9Fz8gXdmngPiZsktYBeAJVIVulbgD/BZ/ p5AfSQmmhB8/qIXEbytrnJx4E0sg8N/IdS1nU+lfQpUB2JnE3mRC5mkQ7UGqVe8P XMRr3xrDV50IlUfcZ540zeACR4h28MVhWDSO9TOlZRHllcqi0fipzvideQdhQ2bL 250JNr/oEcK3GvGC8lhA5iewRGznl5R03aA2KGoVKQnrIUc6+TFUaFdeMnpX+LD1 r4+HxA99c2/nhT54uaG38mWJS9rEDbMGyf1opcW+pQEtnTYvYV40Zlj5K6Mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1776093544; x=1776179944; bh=/WqfHvblM1y635/VbSb5sAKg1ea+rwbeWWM FPMSkBUY=; b=j1st82togRCAgkfHrId8hOhS2KVNvwY0xHaYSOCKXSZRJpCCcXy E2d8Cqe3upOSYMwV7NURgDnkILqTy0c06y6C5Y7Z8ZlSSkNQ7lGS8RCIbK+godOd lej+BiomS53cB7tkBs0g+eeV/F616YZfL9Fm1BQ2ILTEdZCxWdZw0tR+6f3O6c3q XlNvxoNJVh3+opslvggo3E2bCToUwLv3gl2s3WmOfEJhpd+NKO1kSG6G7pzzGh2k FpRhDjk+fLzRMSrmIq6tHdZpZ+qEsmsr43gkGg4w26oLGhNyuRpbbjZ2FPYIyLMQ /UgK8KHahEq2V8oCyM9aR/XGOhBdj5jkSMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefkeehjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefluhgrnhhluhcu jfgvrhhrvghrohcuoehjuhgrnhhluhesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeeifeekhfeihedtgfeufeeivdelkeektedthfetgffhvdejgefhheduvdeu gfevtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hjuhgrnhhluhesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohgu vgepshhmthhpohhuthdprhgtphhtthhopegufiesuggrvhhiugifvghirdhukhdprhgtph htthhopehnvghtuggvvhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i80b64ba7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Apr 2026 11:19:04 -0400 (EDT) Date: Mon, 13 Apr 2026 10:19:03 -0500 From: Juanlu Herrero To: David Wei Cc: netdev@vger.kernel.org Subject: Re: [PATCH 2/5] selftests: net: add multithread client support to iou-zcrx Message-ID: References: <20260408163816.2760-1-juanlu@fastmail.com> <20260408163816.2760-3-juanlu@fastmail.com> <8fa08d73-28a3-4521-bcfb-ec81869c24f3@davidwei.uk> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fa08d73-28a3-4521-bcfb-ec81869c24f3@davidwei.uk> On Thu, Apr 09, 2026 at 08:51:11AM -0600, David Wei wrote: > 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 > > --- > > .../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 > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -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. Makes sense, will remove from v2.