🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24869

Re: [RFC PATCH net-next 7/9] netdevsim: add a TX reference provider for AMT relay offload

#24869
From: Antonio Quartulli
Date: Tue, 01 Dec 2026 00:34
36 lines
10849 bytes
On Sat, Nov 07, 2026 at 06:44:28PM +0000, Omar Ramadan wrote:
> +	depends on AMT || AMT=n

> +ifneq ($(CONFIG_AMT),)
> +netdevsim-objs += amt.o
> +endif

Whenever CONFIG_AMT is set, this changes netdevsim for everyone:
- netdevsim.ko links against amt.ko, so every netdevsim selftest loads
  amt;
- every PF port registers a provider and gets an amt/ debugfs
  directory;
- every device gains five devlink resources and an "amt" health
  reporter, which changes the "devlink resource show" and health output
  that existing tests see.

Please make it opt-in, for example a per-device debugfs knob that
creates the provider on demand (?)

> +static u64 nsim_dev_amt_cmdq_occ_get(void *priv)
> +{
> +	return atomic_read(&((struct nsim_dev *)priv)->amt.cmdq);
> +}

Command-queue occupancy isn't a resource with a size. Also, these
counters are per device while the tables they count are per port and
per binding.

The copies are built by amt_offload_encap_xmit(), i.e. by amt itself,
so this provider validates the bookkeeping, not anything hardware would
do (see 4/9).


Regards,
Antonio
Technical Details
Message-ID: <20261201003458.3731956-8-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374561-linux-kernel-netdev=dewy.ru
References: <20261107184437.2783174-1-omar@blockcast.net> <20261107184437.2783174-8-omar@blockcast.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374561-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
Subject: Re: [RFC PATCH net-next 7/9] netdevsim: add a TX reference provider for AMT relay offload
Date: Tue,  1 Dec 2026 01:34:54 +0100
Organization: Usenet Network
Message-ID: <20261201003458.3731956-8-antonio@mandelbit.com>
References: <20261107184437.2783174-1-omar@blockcast.net> <20261107184437.2783174-8-omar@blockcast.net>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1576225"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:OxR5R/FdNBCIPV9GNa54mybYmds= sha256:LimAbuF0Wg4n8kDeXY0XWfo9IbIJfZuKZBDi7Ha9RDM=
	sha1:mwwKfT492o19kjPgZm2xwWL9ToM= sha256:JDnlxnXNWB/rGvhM6yHPIePX8IAjmEaxOc/tk0+FN64=
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 C7CEC126019; Tue,  1 Dec 2026 03:35:56 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.05
X-Spam-Status: No, score=-2.05 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=mandelbit.com
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 3oDsUWwC1BLS;
	Tue,  1 Dec 2026 03:35:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374561-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 42568126015; Tue,  1 Dec 2026 03:35:44 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4DFBE25DC6; Tue,  1 Dec 2026 00:35:38 +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=1796085332;
	b=w1qcUxCKAtAvxlqmUGzF2R789RigfjXfsKpbIUBdRHHLx7ahYbd89eEkYkx8IiUI4EjG
	 CAazmWQ0fwX9hAxTeUfo6KGtVQdmEH3mmd2Byt4g90j3yNVFuSzbptX2t38g3VHTiUDkz
	 hjU09qN6sYcAgJ6GO4TQpTezdTAG+uBTXJolFYoC5T8rnEh35oMk4pTRtnBYSUhjhmrFD
	 Wol/EQ/sWMMAITn6OHPwxU3WRLMtoGsuwdveXbYut1DDXLsQU5ocvBjLynQ0V/zvUkU+F
	 rCgAHE/TO0XjG8H4IC8NOA34ZqmQv1I936ml8sEa5gE+Jcz7f1d2fms4WoaDk5evxsA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796085332;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:X-Rspamd-Queue-Id;
	bh=FUQxDbh9Ia+vKi0brWf+mzkQWx/+aKTi8otapb+oK0Y=;
	b=EQKvuuhxQjaI/jcNUdbr2yRA44V9w6jg+IOX4yXORhvn+9Ba+yX4RQodJS/d72gOWbal
	 I150H7S5ylb/yTO7A7J2DYOVL9vgTE14HmPsGOL8Ac7r/NL1x37veAwG5rHCF56jh+N9T
	 aFDEWBoRHLh3ViUS4AfHBf+Ni4ptLUoxISu4yfVy9dOuWOiCUFbzb7wwnq6akuaLw7as/
	 qiqY+BgvfijUFX7jLYfX6fLLbA/2prfHkJ8RQ0+ZfxUOwJAhDjG0U+WJUfbcGdeAHGRv+
	 jQQFYqdbnOjJeuzfakFOW1H2NeXU85PGzK7XvA8bnMWvYXZ3CLgxjFcH/EAXuFKczTw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=06obWx+c;
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	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 DE816606A696;
	Tue,  1 Dec 2026 00:35:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=06obWx+c
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796085326;
	b=JHz+HWQgzdTTfyxgViFz00XatFCw9ybJiuLB1thLDa/5fHykEs/K6t5yVHDq+roGi+VA
	 PVe7ZZQd9GfVRBACgUBkXY7oLdROHrrhAA72BT2qw8usKy8lneawJaLTmVypLHpEP+hT5
	 L+io1iBk81VoIa8eAY5WqScfJGuyOOy/k1m4V4majnZukBrknkH+4a4ceqVCFMXxRGQ9V
	 2MJxGeMA+jlJRptvj/G3+xF5Cil0tCFJ3Aunqr8z//So5QewfO9/fOr/6H99GR1+jZh/7
	 Sb4bcWXNOhiS++wU8xJoRgLaa0w7edFPyKlTBEsf57PZrZAy8H84bVNT8JKQB9v0Ycw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796085326;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding:X-Rspamd-Queue-Id;
	bh=FUQxDbh9Ia+vKi0brWf+mzkQWx/+aKTi8otapb+oK0Y=;
	b=dDRMtJafX6wLJhqUw8CIzcVr8oD8WJp7qUxJgA5vhf4lM2bwaIsiFTrqp8kj99N109/V
	 ncYWYgYhFch4YofOpjd7RaWQAu/O5rNPB7m0tdJ+u+Ag/FtZo8RSCgRJEMMZbRBPIprGo
	 NW2Boax9SELoOAOCHetFIdYshrO/7kScYt/o7GgvJAjW2bHT4edrRIko3OhUFW9bh1Bn9
	 YsQunigC+Op0LYyihTQd1ppFNlKunEYK+ad/VGufvNR6M9mp73HOkDeWqemvHC8mxoQym
	 xp5n1KT8crkrnLli9lNFv+OwgxNRAHcJU6Rxgw8nqWoID9r1MDRN9Nqccv3Hwh3a5ww==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=06obWx+c;
	arc=none smtp.remote-ip=195.10.208.47
X-Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [195.10.208.47])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82D51606A6B4;
	Tue,  1 Dec 2026 00:35:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 82D51606A6B4
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com
X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mout-b-107.mailbox.org (Postfix) with ESMTPS id 4jdhkL2GT6z3xXq;
	Tue, 01 Dec 2026 01:35:22 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1796085322;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=FUQxDbh9Ia+vKi0brWf+mzkQWx/+aKTi8otapb+oK0Y=;
	b=06obWx+cwmg46uvGgbtw8vXiPEful06YD7GF8Pc7pZQtfX/H+5J4O0Bc9q84qU28gquOgx
	6MRrKmakaLcqq8JwT/JENZLrHPiQA2kkG4ONZ8qJVaubdNk6NQsxbfy36vDcfEuXK9zJIo
	0WQpzaDPXx6khmtPSbq3jFdv7NjDuNqxkNcF1wZxZVlAc105yD3FIvwifpiqaRgg0UDgj5
	sK61aLKI1km1FJBVvPHKH+yIn+IIqP0WHT3bX3qHpC4HSgHLosHn00ZZaI0uPNtAiaHC7W
	c5pa+liliV2LZqQY2qvUjWUVaSbV6To1lyFPBX49/cFWzbAK2tgh7RYNLYqCJA==
X-Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=antonio@mandelbit.com
X-Cc: Antonio Quartulli <antonio@mandelbit.com>,
	Taehee Yoo <ap420073@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com,
	saeedm@nvidia.com,
	leon@kernel.org,
	tariqt@nvidia.com,
	mbloch@nvidia.com,
	brett.creeley@amd.com,
	sgoutham@marvell.com,
	anthony.l.nguyen@intel.com,
	przemyslaw.kitszel@intel.com,
	intel-wired-lan@lists.osuosl.org,
	Ido Schimmel <idosch@nvidia.com>,
	Satish Kharat <satishkh@cisco.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-kselftest@vger.kernel.org,
	linux-hardening@vger.kernel.org
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <20261107184437.2783174-8-omar@blockcast.net>
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
X-Rspamd-Queue-Id: 4jdhkL2GT6z3xXq