🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6638

Re: [PATCH v4 net-next 09/15] selftests: xsk: run one test case per xskxceiver invocation

#6638
From: Jakub Kicinski
Date: Fri, 23 Oct 2026 01:24
47 lines
9993 bytes
On Thu, 22 Oct 2026 17:44:14 +0200 Maciej Fijalkowski wrote:
> > Really not loving the amount of "library" code added here.
> > Do you need this just to run it over veth in net/ and over
> > real HW in drivers/net/ ? Are the test cases very different?  
> 
> Now that you bring this up, would be good to clarify expectations of this
> work. The lib input is what veth and hw runners share to avoid code
> repetition. The separation comes from a fact that we still want to cover
> SKB and DRV modes (via veth at net/test_xsk.py) and ZC mode is covered by
> drivers/net/hw/xsk.py.
> 
> My assumption was that would not hurt much to carry common code within lib
> file. I might have been wrong tho.

We should try to avoid pushing things into lib whenever possible.

> > I wonder if we could solve this by parameterizing the env
> > class to use veth instead of netdevsim and then have unified tests?  
> 
> Tell me more regarding the unified tests. Is that okay'ish to run
> veth-based tests from drivers/net/hw ? I thought it was not and I shared
> my insights on similar work which does the same kind of migration
> (xdp_features bpf->drivers/net/hw) and it seemed to be heavily veth
> dedicated - the bpf sh runner was basically veth based, but so does the
> xskxceiver and I moved away from this after Bjorn's input (turned out to
> be a good thing).

The other way around. We can add mixed HW and non-HW tests in
drivers/net When run against non-HW we need to be careful to XFail
instead of failing or Skipping, so that SW CI "is green".

> each runner can have single ksft_run() call, right? So, do you think
> separate files for veth and hw runners is still okay?

SW and HW testing are done by separate executors. We'd have some
trouble (read: we'd need extra wrapping) if we we needed multiple 
envs for SW testing, but SW vs HW is easy. Executor will either
run with no env exports and get the SW test, or it will be exporting
$NETIF etc and test will run against $NETIF.

> In veth runner I don't even instantiate NetDrvEpEnv as I have veth pair
> being created 'manually', however having a param similar to existing
> netdevsim one would be nice and xdp-features set could benefit from that
> as well. 

Yup!
Technical Details
Message-ID: <20261022182446.64516c7f@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350862-linux-kernel-netdev=dewy.ru
References: <20261016174338.787135-1-maciej.fijalkowski@intel.com> <20261016174338.787135-10-maciej.fijalkowski@intel.com> <20261021150145.65a22a61@kernel.org> <atovTlRGERDYjB4q@boxer>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350862-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v4 net-next 09/15] selftests: xsk: run one test case per
 xskxceiver invocation
Date: Thu, 22 Oct 2026 18:24:46 -0700
Organization: Usenet Network
Message-ID: <20261022182446.64516c7f@kernel.org>
References: <20261016174338.787135-1-maciej.fijalkowski@intel.com>
	<20261016174338.787135-10-maciej.fijalkowski@intel.com>
	<20261021150145.65a22a61@kernel.org>
	<atovTlRGERDYjB4q@boxer>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="381692"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:j3uO1LnBCkpznm0U4qQ6oIpVhu4= sha256:k7eHg29BLEFemnMdGOKf3F3bq/uLQdnQO0aTwZ1VuF0=
	sha1:5uHYihtOzXn1/u+frD76cE5HT4I= sha256:R1hvy7xuQDfE+8Ov38KeDmV6Emy83F7dc7HcwrfV0Zs=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 856601113AF; Fri, 23 Oct 2026 04:25:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.839
X-Spam-Status: No, score=-3.839 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id X4w2NpsQ6Cwy;
	Fri, 23 Oct 2026 04:25:07 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-350862-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 5B32C111371; Fri, 23 Oct 2026 04:24:58 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 1A9F2605ACF; Fri, 23 Oct 2026 01:24:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792718694;
	b=n++3QOYP8O+URT0YSLkJoY/DjAHsWLqj17+6NNh4gDp5+fpjDY96MbBk7EkzcFYg3aEa
	 5xD6OX0rD1icvkYkFgbZHd16L/AGXQe2MxTQikdnfY7bqk9S8lLfe6UlhaOu1tSE7Moml
	 oNyQRU0Gh7d26yTNOdcK4XRDWhhYkrT8KirtILZBmIndaZVB0sOxuTWnnzWPMhNLXtZtM
	 l5WTpglPWPHimOVYXqchYJdWY+4y1CwaXiTefSOrCs/5JLqoF6QMf2dUdpJsxzd4Pp/50
	 7dcWxgxMG+5me++aPAZrt7RZnxpUoeRWESgfqb4ycgVdZDZJBFKKVnfO72sBcIc1gQA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792718694;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=QfwiiMEIJLM6wtWCzdveJsVg3jUOpd7xifwJvw6jT6c=;
	b=scLx1luj1Z336SeNE+AftTnAeh3sXrAkVvMt3RHHHPd4MMLbgNrVetDfC9Vd78ywEsEr
	 137M30MU/q3e5tEOp1O2uLRR/vLGwKOFSNicFuGZLEiE0RT+0/4tIpD2DYeK+0IJS+JzJ
	 7gN/PkWJ3cON3hEQLRrauhWiC5ZIv+Ct5VBCrO/byoxI3w8mkFrLyPr5miXfOYq3OQPF6
	 SGlPu5eDM/Zy6JlLx9GcX/42V0MyOE8onXiDkKT0bRn7IWKBayWd5OmuY+F8bDk1evobc
	 5+TzL7ROURa06hTeaod2c9icEr6EKqqVtoV4T0ndDVVoRB+zBtlbqhHHF+050xuZozg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZQSpi8UE;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BC7E606A31F;
	Fri, 23 Oct 2026 01:24:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZQSpi8UE
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792718688;
	b=Gzqy+zxjSO2mezMLphWuP3ngk4nK6PFUWJr2QLencsAGWjyF062P9UEMLxiiIfwgPDb2
	 4HxCvo0FSDyV3XvI9+cewbk84bV9JdHGUyCHqJMnlT1ZtMlA5H5eQmnbHo5FFR/szdHAZ
	 zHml4nfhXdOEL8AUDLR6eZlKUKndVZ6wI6kC1cyAun7DaNa/WiJJJZUafES7ARN7pn1jn
	 0kutKgI5XABkANWNoVWFd5yGGn/LtvPVbtXbn3ZE5NG25TvpDqERE+DtCJVpbUEZg1kIQ
	 oGWj2gEIZ8LWCP6aqcFh6Amln9lXKiY+pvHVq7Z1C6Jxh1rg7gYsru/Vk/gWp+gR4Bw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792718688;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=QfwiiMEIJLM6wtWCzdveJsVg3jUOpd7xifwJvw6jT6c=;
	b=OPklP/18XdlscOgHI7ALnCxXAE1hMCCHh++ZLm5CldnQcnQGBOIdf6/1cdxOfTbdzsE8
	 MFFqsUkfzmtv5Ko9A37m9xdjVGQYJMPlmBcEfxk/pL4BNrsn3Q43z1cbXNGoiDR8ZF+W8
	 Xuw7WYkFiSgdylKx+x4hQ+nFL/Yc9O6M64PqigviZ12pwNzU6FfyMh+/GfuwPh6pAN6iN
	 mgsUunm+CaYwAGzca+O3qsS22Ul5UGNwVFoYCXRpIBlMVt3iz/3o4pULd0YWcJCfOoPMp
	 fUyEd+qPzE7J5utML2SO9vczQuG8ndFNNHBbrQY295uSzDo5yLGdzL99fHTFsZE2MUA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZQSpi8UE;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65AC6606A319;
	Fri, 23 Oct 2026 01:24:48 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BAE81F01825;
	Fri, 23 Oct 2026 01:24:47 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792718687;
	bh=QfwiiMEIJLM6wtWCzdveJsVg3jUOpd7xifwJvw6jT6c=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=ZQSpi8UEwcsqoxxHVT+yb48q4b9dZZ0j0njxnfkUMKcSvlhmo6JNd3ndN19Ubbu/C
	 fscbYwACtSeoXhplh0vPRdE7V+SZ8SBzp+mJlj5EvY7BbUawZjZWTNzH3ssQ3qaO+t
	 0b4JoQoW80ib2f3Bs/NMT3ASfa8N+uqSf1J+yJK5O8I6eafnocI8k4McDiLi5E2a2j
	 uloHDf+uXhuepSzQ6uNKaIj7kVTZFGFa/5nOAS9ke5JzlrwDttY9KcQmrF6RkCAEFE
	 EAXScGwIJnyjEOBnfVgw6MFNws2W9QtG1+SEOeersyFXmQTcZX3UlfYmkcxoIDr+HE
	 JukHHoNpAsOIA==
X-Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
 <magnus.karlsson@intel.com>, <stfomichev@gmail.com>, <pabeni@redhat.com>,
 <tushar.vyavahare@intel.com>, <kerneljasonxing@gmail.com>,
 <bjorn@kernel.org>
X-In-Reply-To: <atovTlRGERDYjB4q@boxer>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list