Article View: linux.kernel.netdev
Article #24864Re: [RFC PATCH net-next 0/9] amt: relay replication offload provider contract (RFC, not for merge, seeking a provider)
From: Antonio Quartulli
Date: Tue, 01 Dec 2026 00:34
Date: Tue, 01 Dec 2026 00:34
99 lines
14147 bytes
14147 bytes
Hi Omar, On Sat, Nov 07, 2026 at 06:44:28PM +0000, Omar Ramadan wrote: > This is an RFC and is NOT for merge. We are posting it to find a > provider: a Linux-attached device (DPU, SmartNIC, switch ASIC or P4 > target) whose driver would implement the contract below. We will not > post a for-merge version until one in-tree driver with a named > maintainer implements it, [...] Per-patch comments are in the replies to each patch. Summary here. I built your amt-offload-rfc-v1 branch: W=1 is clean, and the amt KUnit suite passes 29/29 under KASAN and lockdep, with IPV6=y and =n. amt_offload.sh was not run, because it needs your unreleased iproute2 (?) patch. Series-level points: - The series does not apply to net-next, so it got no automated review: Sashiko skipped it [1], and NIPA can't build or test it. Reviewers have to rebuild your base by hand. Could you please post the prerequisites first, or rebase onto net-next? - The contract fixes a lot of policy in the core for an interface with no users: per-packet generations, epochs, an op budget, ENOSPC hysteresis, timeout/flush/replay, and an unimplemented ingress path. Most of the bugs below live in that policy. I'd shrink it to "member added/removed" notifications plus an offloaded state, and leave retry and capacity decisions to the driver...if that makes sense. - The performance section measures an unposted change on a 6.18 out-of-tree driver...Technically it tells us nothing about this series, so it can probably go. > 1. This RFC registers providers in a registry keyed by the lower > netdev and adds nothing to struct net_device or net_device_ops. > Once a real driver exists, would you rather see a struct net_device > field or an ndo instead? I think an ops pointer in struct net_device under IS_ENABLED(CONFIG_AMT), like macsec_ops, xfrmdev_ops and tlsdev_ops, would do. That removes the registry, the -EEXIST case, the registration lost on a netns move (see 1/9 and 2/9), and the provider's link dependency on amt.ko. > 2. Is netdevsim the right home for the reference provider, given it > has no ingress classifier to simulate and so can only exercise the > TX path? As a test vehicle next to a real driver, yes - it makes ense, and opt-in per device (see 7/9). On its own it only validates a contract shaped around it. > 3. Is an in-kernel provider contract for a single tunnel driver > acceptable at all, or would you want it expressed through an > existing offload framework? We did not find one that models > one-to-N unicast replication with per-destination encapsulation. TC flower with N tunnel_key + mirred actions is one-to-N replication with per-destination encap, and it is offloaded through flow_offload today. VXLAN head-end replication with MDB offload via switchdev is another "close" model. Please explain in the cover letter why neither fits. The possible gap I see is that AMT tunnels aren't netdevs and AMT isn't a known encap type, but that should be argued, not assumed? > 4. The per-relay offload state and counters are exposed in a sysfs > offload/ group on the amt device for this RFC. We expect to move > them to netlink (link xstats) for a for-merge version, and would > like guidance on that. As per your statement, I agree you should go netlink only: - the mode as an attribute with a policy range; - bound state and path as read-only attributes in fill_info; - counters through IFLA_STATS_LINK_XSTATS; - hardware counters through IFLA_STATS_LINK_OFFLOAD_XSTATS; - provider health and capacity through the driver's own devlink. No sysfs group and no module parameters should be required at that point. Please also describe the attributes in Documentation/netlink/specs/rt-link.yaml: a linkinfo-amt-attrs set and an "amt" entry in linkinfo-data-msg, as ovpn and the other link kinds have. amt has no entry there today, while with one, YNL can create and inspect relays, and the selftest doesn't have to wait for iproute2 (see 5/9 and 8/9). [1] https://sashiko.dev/#/patchset/20261107184437.2783174-1-omar%40blockcast.net Best Regards, Antonio
Technical Details
Message-ID:
<20261201003458.3731956-1-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374554-linux-kernel-netdev=dewy.ruReferences:
<20261107184437.2783174-1-omar@blockcast.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374554-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <20261201003458.3731956-1-antonio@mandelbit.com> References: <20261107184437.2783174-1-omar@blockcast.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1575968"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:w6IBSU07v2O47k7WfwaqTjYrt5M= sha256:nZQcta5OmfKKvsdGBA78IQ9iHaRmEJ5TawhF4chEcOo= sha1:Dt7Z8zf8z6A2grqlb7FQW2l1H4Y= sha256:SrO6pKUCsOMlqvN5oB6H527OPFVDbepVa3k/pAi4njs= 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 00D4112601B; Tue, 1 Dec 2026 03:35:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.95 X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.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 ome8BfFqRi7T; Tue, 1 Dec 2026 03:35:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374554-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 0160F126017; Tue, 1 Dec 2026 03:35:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id BCDC52C168; Tue, 1 Dec 2026 00:35:18 +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=1796085317; b=R+zA1hyHLNIEOlzL/3V5fIEbqehJFsRQpYL0iC/JXG/bvMDy93ewyCrFpZ2nB/H05DRM 1qqnPTG9/M9AWsiOPDzkUdjIG6rgJXfBciuuQhT9FHhQn2ud1q9scyJo584XxSRJWLKIG wlhY4o+lYDGS2UZOhTjICi0VLvLFbJyB286c/mg9wZbMSaM2vKTr+yMh17JJcPoVHiGFW OX9yVNQXevU9J96dSFsLily9eQ/6iPbDuLts0bi6s+vnZwt61FK8NVTpxLip2iIhsQJb0 vzHps93+g9cY/CSaGvb0tuMlYVr456YMUsGxGGTCYjF+G8iYmji6OVC3AEe7vVtMT1g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796085317; 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=bxMItI+pnc+Qx9pUzWVIooOD4FdCdL85Yydk279dOqc=; b=XAM5yU0oBQBgV15CJUD/bAxAR5EQgmHcgNvdo3Z9v3e8zCgiNnSXHojgygLG6dVYuPp3 miUrk3X8PWpHbi1RMjdmAW8/SFilWkeCxeM32SRXA9cGOKIrNT5Te0s1iddpMnVEPaXMZ E0TYCtJximWNQ0l+pfCdOY5TL8JrerJ/d/fqIvB5SK5gxg27ljY/Nm26IH/AEYjs4B/jS RCIE80k7fnGGbqJxMQnI457tyDtDQD1eSE2O5aQmi+3ijoAL3Zw1tN+ESIOuQL5pnL6Z6 rPm2nGLF2jNs2zAPmExqWWZL2N3BD3VAMt9updWvaDVAye9bTLMr6bKtl5fohmaFKGQ== 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="RvebpbA/"; 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 933DD606A68B; Tue, 1 Dec 2026 00:35:17 +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=RvebpbA/ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.40 X-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== X-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== 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="RvebpbA/"; arc=none smtp.remote-ip=195.10.208.40 X-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) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BEB33606A325 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-210.mailbox.org (Postfix) with ESMTPS id 4jdhk12jMDzFqXl; Tue, 01 Dec 2026 01:35:05 +0100 (CET) X-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== 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-1-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: 4jdhk12jMDzFqXl