From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.40 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796085311; b=pQZQstnRavJVhRhTEIKd75+Em59gvvCr5IPIEc8w89+pvsyX1XPHhgKZDt8JaLjrMvWZ MtVvmM/SQVgWXOJ5oMYphJhXcmAMmBCMDtR+tMqjiitcxWvCaQHIpNU9K8diOws48PXhz N11Ay3TgLNlamhs/OHaZHYyV/6TPGeA9AnZYjA1sKjKSx8qoPLvPIfiiSrx+Gbo+jMwJa JRmzNTC2R7tcDz7LrcUvAouUglUtX+fXXHLoDgOnW+1MYvEStOTzuJ9dWKffECTrdEAP+ CsMU0Y/TTbrr2pfl2LHKlQP3Itpb4MISX4lW0FWi70odQ38zQnw0uHmcLi9q4nOX1oQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796085311; 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=bxMItI+pnc+Qx9pUzWVIooOD4FdCdL85Yydk279dOqc=; b=cpknX2OXka0LbML3UAcU6QRFSgAve2hqLyZidJywD0H/uL0WVXf5p4J2m9HWMPaftEyx sv7a6X7FWAuN2tLzYtE2bbDOONJkL4DerSeCiC9lQUUR5Yv+dzGZX8n9OH0oifOq12yD4 zRcBtUcgk9hZ7QH4tk+WNaAcsLOa641GBwXdBxMlvUm/AcAajPlJdPFd0tnaREYhvztvH kIY8zJ2YRoTJooudKVOeB5ip2sILkMj17s8n8s/9dyFt3oy9Ytna2TaZPEaIoBIv4MiQU rJzxuUBnOUSI5vwMPR1vx1PB9bGBz217VcVUyiegWdphW1zCLQbms8JPR9q9zEDG6kQ== 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="RvebpbA/"; arc=none smtp.remote-ip=195.10.208.40 Received: from mout-b-210.mailbox.org (mout-b-210.mailbox.org [195.10.208.40]) (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 BEB33606A325; Tue, 1 Dec 2026 00:35:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BEB33606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com 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=RvebpbA/ 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-210.mailbox.org (Postfix) with ESMTPS id 4jdhk12jMDzFqXl; Tue, 01 Dec 2026 01:35:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796085305; 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=bxMItI+pnc+Qx9pUzWVIooOD4FdCdL85Yydk279dOqc=; b=RvebpbA/Vs1AewWdK0NYTCqSr+219PqgEeciHaujqxShXeGsi5MS27DWUDUx97z0TAb3gY 4GV3Yo8M2my2fIj/seLWDTzhzEzxIBKk96hdCRFXIMk/ufraE+qPSI3gxndOvoWBVuPGOB QIDZMPWDDLcB6IIyW3v2LCWFN7YZ6Z+BVgRvoY1FQNVqOzdosPPvXOowGZfbkq2eLXU6R4 XKD/4zhUegHuG+jXNmvNYPXid0omWT+1pT0/nq1yhOHKS1/j4bBxSfsp2+JlM/phiXQx1d iz5/gigS+F9eWpD9fseWgj7pFlQ+xcnWLSttppIVwtNBl3M3qJrvYntinQaQgQ== 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 From: Antonio Quartulli To: Omar Ramadan Cc: Antonio Quartulli , Taehee Yoo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , 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 , Satish Kharat , Andrew Lunn , Simon Horman , Shuah Khan , Kees Cook , "Gustavo A. R. Silva" , linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [RFC PATCH net-next 0/9] amt: relay replication offload provider contract (RFC, not for merge, seeking a provider) Date: Tue, 1 Dec 2026 01:34:47 +0100 Message-ID: <20261201003458.3731956-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261107184437.2783174-1-omar@blockcast.net> References: <20261107184437.2783174-1-omar@blockcast.net> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4jdhk12jMDzFqXl Hi Omar,=0D =0D On Sat, Nov 07, 2026 at 06:44:28PM +0000, Omar Ramadan wrote:=0D > This is an RFC and is NOT for merge. We are posting it to find a=0D > provider: a Linux-attached device (DPU, SmartNIC, switch ASIC or P4=0D > target) whose driver would implement the contract below. We will not=0D > post a for-merge version until one in-tree driver with a named=0D > maintainer implements it, [...]=0D =0D Per-patch comments are in the replies to each patch. Summary here.=0D =0D I built your amt-offload-rfc-v1 branch: W=3D1 is clean, and the amt KUnit=0D suite passes 29/29 under KASAN and lockdep, with IPV6=3Dy and =3Dn.=0D amt_offload.sh was not run, because it needs your unreleased iproute2 (?)=0D patch.=0D =0D Series-level points:=0D =0D - The series does not apply to net-next, so it got no automated review:=0D Sashiko skipped it [1], and NIPA can't build or test it. Reviewers=0D have to rebuild your base by hand. Could you please post the prerequisite= s=0D first, or rebase onto net-next?=0D =0D - The contract fixes a lot of policy in the core for an interface with=0D no users: per-packet generations, epochs, an op budget, ENOSPC=0D hysteresis, timeout/flush/replay, and an unimplemented ingress path.=0D Most of the bugs below live in that policy. I'd shrink it to=0D "member added/removed" notifications plus an offloaded state, and=0D leave retry and capacity decisions to the driver...if that makes=0D sense.=0D =0D - The performance section measures an unposted change on a 6.18=0D out-of-tree driver...Technically it tells us nothing about this series,=0D so it can probably go.=0D =0D > 1. This RFC registers providers in a registry keyed by the lower=0D > netdev and adds nothing to struct net_device or net_device_ops.=0D > Once a real driver exists, would you rather see a struct net_device=0D > field or an ndo instead?=0D =0D I think an ops pointer in struct net_device under IS_ENABLED(CONFIG_AMT),=0D like macsec_ops, xfrmdev_ops and tlsdev_ops, would do.=0D That removes the registry, the -EEXIST case, the registration lost on a=0D netns move (see 1/9 and 2/9), and the provider's link dependency on amt.ko.= =0D =0D > 2. Is netdevsim the right home for the reference provider, given it=0D > has no ingress classifier to simulate and so can only exercise the=0D > TX path?=0D =0D As a test vehicle next to a real driver, yes - it makes ense, and opt-in=0D per device (see 7/9). On its own it only validates a contract shaped around= it.=0D =0D > 3. Is an in-kernel provider contract for a single tunnel driver=0D > acceptable at all, or would you want it expressed through an=0D > existing offload framework? We did not find one that models=0D > one-to-N unicast replication with per-destination encapsulation.=0D =0D TC flower with N tunnel_key + mirred actions is one-to-N replication=0D with per-destination encap, and it is offloaded through flow_offload=0D today.=0D VXLAN head-end replication with MDB offload via switchdev is=0D another "close" model.=0D =0D Please explain in the cover letter why neither fits.=0D =0D The possible gap I see is that AMT tunnels aren't netdevs and AMT isn't=0D a known encap type, but that should be argued, not assumed?=0D =0D > 4. The per-relay offload state and counters are exposed in a sysfs=0D > offload/ group on the amt device for this RFC. We expect to move=0D > them to netlink (link xstats) for a for-merge version, and would=0D > like guidance on that.=0D =0D As per your statement, I agree you should go netlink only:=0D - the mode as an attribute with a policy range;=0D - bound state and path as read-only attributes in fill_info;=0D - counters through IFLA_STATS_LINK_XSTATS;=0D - hardware counters through IFLA_STATS_LINK_OFFLOAD_XSTATS;=0D - provider health and capacity through the driver's own devlink.=0D =0D No sysfs group and no module parameters should be required at that=0D point.=0D =0D Please also describe the attributes in=0D Documentation/netlink/specs/rt-link.yaml: a linkinfo-amt-attrs set and=0D an "amt" entry in linkinfo-data-msg, as ovpn and the other link kinds=0D have. amt has no entry there today, while with one, YNL can create and=0D inspect relays, and the selftest doesn't have to wait for iproute2=0D (see 5/9 and 8/9).=0D =0D [1] https://sashiko.dev/#/patchset/20261107184437.2783174-1-omar%40blockcas= t.net=0D =0D Best Regards,=0D Antonio=0D