🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23142

Re: [PATCH net-next v3 04/12] psp: add support for socket-less psp associations

#23142
From: Björn Töpel
Date: Thu, 26 Nov 2026 15:07
46 lines
11024 bytes
Todd Freed <toddfreed@meta.com> writes:

> Currently, a PSP association is bound to a TCP socket when it is
> created, and can hold both an Rx and a Tx key.
>
> Add Tx associations which are not bound to a socket, and are referenced
> by an ID, so that other parts of the stack can attach them to packets.
> See the subsequent patches, where the tc psp action does just this.
>
> Socket-less Rx does not need an association, and the kernel does not
> keep anything for this case. For Rx, userspace calls the rx-spi-alloc
> operation, and then uses tc filters that match the corresponding SPI,
> version, and PSP device. The flower matches for these fields are added
> in a subsequent patch.
>
> Add the following new netlink commands. They are admin-only, and
> restricted to the netns of the PSP device.
>
>   rx-spi-alloc  allocate an Rx SPI and derived key, without a socket.
>                 The key is delivered to the peer out of band. Also
>                 returns the number of key rotations of the PSP device
>                 so far (key-rotations)
>   assoc-add     create a Tx association and install the peer's key,
>                 returns its ID
>   assoc-del     delete a Tx association
>   assoc-get     get / dump Tx associations; only the SPI is reported
>
> Socket associations are not addressed by these commands, so for example
> assoc-get does not list them.
>
> The kernel doesn't enforce key rotation for socket-less Rx the way it
> does for socket associations. A tc filter which matches a SPI of one
> generation will also match that SPI if subsequently re-used in another
> generation. It is up to userspace to deal with this eventuality by
> removing such rules in time. Userspace may subscribe to rotation
> notifications for this purpose.

Could you talk about the rationale here? rx-spi-alloc returns the key
rotations, why not make the generation part of the flower match?

Probably missing something, but seems like natural for the kernel to
ensure that stale rules wont match reused SPIs?


Björn
Technical Details
Message-ID: <87cxrriqcl.fsf@all.your.base.are.belong.to.us>
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-372188-linux-kernel-netdev=dewy.ru
References: <20261124221758.3230929-1-toddfreed@meta.com> <20261124221758.3230929-5-toddfreed@meta.com>

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-372188-linux-kernel-netdev=dewy.ru
From: bjorn@kernel.org (Björn Töpel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 04/12] psp: add support for socket-less psp
 associations
Date: Thu, 26 Nov 2026 16:07:06 +0100
Organization: Usenet Network
Message-ID: <87cxrriqcl.fsf@all.your.base.are.belong.to.us>
References: <20261124221758.3230929-1-toddfreed@meta.com>
 <20261124221758.3230929-5-toddfreed@meta.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="493612"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:99GcE9gdB59Z5W4WMfbNJk86spA= sha256:rW22FgWA0Xt264TMh31QhdiAPF0QO4IDQWvqWec3Ot4=
	sha1:xlRxSj65mLenogvVen/Z/Z1sk54= sha256:q+rg4tr6Gqjhh2R2Ro0BfERftQfG+446FyrpeTCGST8=
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 0CB06125EE1; Thu, 26 Nov 2026 18:08:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, 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 LpxSjyKpROWq;
	Thu, 26 Nov 2026 18:08:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372188-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 16396125EE0; Thu, 26 Nov 2026 18:08:15 +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 04B5D6425B; Thu, 26 Nov 2026 15:07:24 +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=1795705641;
	b=UtkzuPESYUMoMoqHPvdg2dlWi2cBwTHT5+WZQCcgpduCg7WM80nN5MqH5xxERha+y4eA
	 LRccWX9GX28jBq/rGDx3XtE8escodw3oZmCpTPwuFwfx1/nF/4x81kl5zYaELZ9YqEZ+k
	 0nlYo7ExFIRtDp6Gog3GV9ktsKg/uQRIVT1KYYdWpr9t7+bOKHmscv1PWT7RhN0QP2/+u
	 W36BK0FFtIH1hUYncXCq0j7QUXH+d3QMh0nUBArTt0w5i7JC1j32yJ3XHVhG88kF1ng+c
	 4wpdzJoxpgc1dk5P3SDB3Z7PMq+AHHO7oqBlYlbgER2K0pueexDoLDIySNUwnRbAKSQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795705641;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 In-Reply-To:References:Date:Message-ID:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=vsjnvGGljX9pov+p77+0fvVdhwRr+JXPFgWF2Ng3Rww=;
	b=EXO28UwXMmiFLylsEge6/PXl0HaNh1Z2N6DtAy8A1OV7ElLibfARbaRXhQ77zkG3+C9H
	 qFnBDje8m8txhC1kV70fyepF7yEwWsprsA/uttfGDWFdwriWhAzvfJ7OzBy4B7NOsaqov
	 cxMne3QHBjLk8bdX+c8l9yRSOROxmpAnnwtSRXEUNSdnZas5odCUifDa4ZtJRMWNEJ2eF
	 XBKTIgfZThiNAAC3OX5LNXZwEs/HlxBAmAqNU8k3XIGxiaOTqRmUT8RWCXs0dB2W1n5I8
	 E1XlFczb1NHCc7r9nPP0gMV78DHaSj6PGRP5uRLhvXwgTnZtVSymkot0u/++DWHX4HQ==
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=LoTa01m1;
	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 6E065606A333;
	Thu, 26 Nov 2026 15:07:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LoTa01m1
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=1795705630;
	b=WQj4Vsl50ecdjlvdnuXacfOWzLX2hFIn97yV4UOxswtGesRCLk/CeblWu21F0zy9C6vM
	 fJ0UEnAOuyRH9OXDtF5kuux2sRWyUdAO4aoae5eJSN6tNHlZudjbA4xTfc9fQaAqneKVT
	 j2t+X/0lyZNa6bMpaZyt75Yqe5uwZZLBNrWtM7Ys3MPTqoFoSZaNT9x5OggTfm8Ux/dA7
	 QbNPBocGxGAVFcG11LZlMlxcm/IyE22PhKyMYZ8apAktLqZB6tF989G8EYW4YL5V4S5VR
	 zdCmKKFYYFBw9R/nTzEU4uQt3Zp9WuhS9iPwmduZQAJT7/EnAntwQNQFN897/wgHc5A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795705630;
	h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References:
	 Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=vsjnvGGljX9pov+p77+0fvVdhwRr+JXPFgWF2Ng3Rww=;
	b=ZjCIvPuvQIoXaspL3raCWYl82gvHVBdc7ldqNegpG8HZ9riCxx2SU95coo+lJuyc+59B
	 0GocDoppJYkyQfC/eUbXuThXbXoAFR+t/Kj+aTwWYZS+c3UiEg/ZSefUni9hVckdiHxW4
	 TsWp+duv7kfW2JOTgLqEFHYEvIpj5ggVjSKykE9wlbEv8XW6VVXQN4Wyz936OBYqz5bfJ
	 ZlmwTzpKjcjcIDg7BMF43x6NYmLDjy7wS6ffm7sDoRyL5bj3WPj1mTlW6heBBo0kYfHLB
	 lbetjdRcAYwzDK8+chPzRDbEyqcJ5mDSeYowYcKaLAOnS0IRiUMwEVhN/AuACoAxhdA==
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=LoTa01m1;
	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 8AE81606A32A;
	Thu, 26 Nov 2026 15:07:10 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D74891F000D3;
	Thu, 26 Nov 2026 15:07:08 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795705630;
	bh=vsjnvGGljX9pov+p77+0fvVdhwRr+JXPFgWF2Ng3Rww=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date;
	b=LoTa01m10c/DFZtn0E18pWQOzi4WRWeXm/PToA80poqv9rMEQN4wOov6H0/4L7lJe
	 uc0iMxmwFZ54pWHI8X2OCZH2jKBPIEEND4+WwURhtUrClzewlh0L3aaAjS+rVRecj8
	 XDsXgFdK4MM9rLbT8hrf9ackhQi0GjFkweNgeGkr1XlGwCD7HUyhRrNLK+LNLIezHc
	 MidXYkkfw1prDM8i0QXxEx6X2HNntFP+90SzmYy7rafHgJf5yiBoXzk6VDE6pvcsJ7
	 78sYnYQl5CRACUTGxXyboRSwKWtxZoqco/WJHBkuZI/EfdeMp6Iv/cJWLs4SV1gw4z
	 QhZfukUObWyEQ==
X-Cc: "David S. Miller" <davem@davemloft.net>, Andrew Lunn
 <andrew+netdev@lunn.ch>, Boris Pismenny <borisp@nvidia.com>, Cosmin Ratiu
 <cratiu@nvidia.com>, Daniel Zahka <daniel.zahka@gmail.com>, Donald Hunter
 <donald.hunter@gmail.com>, Dragos Tatulea <dtatulea@nvidia.com>, Eric
 Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Jamal
 Hadi Salim <jhs@mojatatu.com>, Jiri Pirko <jiri@resnulli.us>, Leon
 Romanovsky <leon@kernel.org>, linux-doc@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
 linux-rdma@vger.kernel.org, Mark Bloch <mbloch@nvidia.com>, Paolo Abeni
 <pabeni@redhat.com>, Pedro Tammela <pctammela@mojatatu.com>, Saeed
 Mahameed <saeedm@nvidia.com>, Simon Horman <horms@kernel.org>, Tariq
 Toukan <tariqt@nvidia.com>, Wei Wang <weiwan@google.com>, Willem de Bruijn
 <willemdebruijn.kernel@gmail.com>, Kuniyuki Iwashima <kuniyu@google.com>,
 bpf@vger.kernel.org, Asbjørn Sloth Tønnesen <ast@fiberby.net>, Qingfang
 Deng <qingfang.deng@linux.dev>, Toke Høiland-Jørgensen <toke@redhat.com>,
 Shuah Khan <shuah@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Shuah
 Khan <skhan@linuxfoundation.org>, Randy Dunlap <rdunlap@infradead.org>,
 Matthieu
 Baerts <matttbe@kernel.org>, David Ahern <dsahern@kernel.org>, Jonas
 Köppeler <j.koeppeler@tu-berlin.de>, Hangbin Liu
 <hangbin.liu@linux.dev>
X-In-Reply-To: <20261124221758.3230929-5-toddfreed@meta.com>
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