From: Antonio Quartulli <antonio@mandelbit.com>
To: Omar Ramadan <omar@blockcast.net>
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
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 [thread overview]
Message-ID: <20261201003458.3731956-1-antonio@mandelbit.com> (raw)
In-Reply-To: <20261107184437.2783174-1-omar@blockcast.net>
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
prev parent reply other threads:[~2026-12-01 0:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 18:44 Omar Ramadan
2026-11-07 18:44 ` [RFC PATCH net-next 1/9] amt: add the relay replication offload provider header Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 2/9] amt: offload provider registry and lower-device lifecycle Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 3/9] amt: offload group object, desired state and reconciler Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 4/9] amt: offload TX handoff, ingress punt rule and counters Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 5/9] amt: add IFLA_AMT_OFFLOAD_MODE Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 6/9] amt: KUnit cases for the offload contract Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 7/9] netdevsim: add a TX reference provider for AMT relay offload Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 8/9] selftests: net: add amt_offload.sh " Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-11-07 18:44 ` [RFC PATCH net-next 9/9] MAINTAINERS: amt: cover the offload header and netdevsim provider Omar Ramadan
2026-12-01 0:34 ` Antonio Quartulli
2026-12-01 0:34 ` Antonio Quartulli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201003458.3731956-1-antonio@mandelbit.com \
--to=antonio@mandelbit.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=ap420073@gmail.com \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavoars@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=omar@blockcast.net \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=saeedm@nvidia.com \
--cc=satishkh@cisco.com \
--cc=sgoutham@marvell.com \
--cc=shuah@kernel.org \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®