From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 1262333BBC0 for ; Mon, 13 Apr 2026 15:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776095052; cv=none; b=AzSCq+QU3XpvqV19J4KCJWd4gkdn21x9Y+PBWhmjugsBq+zNHzx6+/84lUZHFixeH5fX1bWI2+aNLWFGTdN+cSIbjJ1e8DBRLlU1c57/pPTHA7gvYPhJ4r40uZ3PO6cHrKVHxRZpLVNizA0PEObAv3PzFFf4VTk8ekL0YSARDHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776095052; c=relaxed/simple; bh=9EMtwqos+FIiIgC/F3GXYF1cGB/vfxsxJwMIKMhr0LU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fne/BeNld0JVo6aUgBEavDoEe9OPDFjhlKR6m/00azJgoO8o1XLCkR7TUIyYhdMTGUR6JY6mTiZ28mIdyYF9uGJz8Wfccl9dYubtvYpgrptidY5D9iTddYGVCFsogfArWhYZ6EkOqmoPcnuSxl2Q2QupK6UsWq6fwMeNlGEEjcw= 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=C5Tveq/d; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=mUnTItxC; arc=none smtp.client-ip=103.168.172.151 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="C5Tveq/d"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mUnTItxC" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 57CA8EC04C8; Mon, 13 Apr 2026 11:44:10 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 13 Apr 2026 11:44:10 -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=1776095050; x=1776181450; bh=ZHx7TCAl/W LLIv8TtRiCidOASw4KzjcYT43W+XCaG6c=; b=C5Tveq/dbRJ4dHRT0uP2vEFMAg oRG7zRIUOanlJaQuuy1uh9n8KBAXlNB9A1d8KmQ3f2ojgYO7f/rzJaqHavxNOUfT 0x3q4OwkmYLI+T55TAoibeSeWuMplU+bsi5azaAZTauQ80RUOSnnaeDS/G4vjIjc upYr/UDK0OLGMS3+YdWm2D3znSM8Th4+HxFcrSpRAyIu9DVJBDiOq9O3wmDL+zwx aUC1VjL+ZznrinpMtJK1lXTYfduDWO2XLkAP39RwUllQfX9lGmXQ3l91xDOhaO9k MqH93a8c+JnMj2pEneMmttfWrCeSWMJ//x29ee8tPGjX++Zh/J/p0zM5Zlzw== 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= 1776095050; x=1776181450; bh=ZHx7TCAl/WLLIv8TtRiCidOASw4KzjcYT43 W+XCaG6c=; b=mUnTItxCrWfIlbF/NVaZgV8GQBFWCknqrYP3R3cG4NEuTv9C1cr rJjf5ueN/5sBweEreiP+OxwlWgBG8rceWHid2Fdk4yff+ihQebIqnk3x7V6gYmJa AUZW4b/ewi1nF3iyjPNGMJPHsK7U6Mv+N4nQlf0yWOW/76974WveGCviBc3GQ99q z8PnSCHtDpcED/g72mHmrrE8XX9feSrDeadAGAReP4bTL2chcOvRNQxYSksRIt8z pCNqgiWSLmzwHiKrJ4tAqQkLFuGlohPwjDGmM6IFUTDNCfeG9Pb75DsYd5j41IXK C2V/+62Cl7vGdLHRncfMPE76fv/DdZSPAfA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefkeeivdcutefuodetggdotefrod 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:44:09 -0400 (EDT) Date: Mon, 13 Apr 2026 10:44:09 -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 in v2.