Article View: linux.kernel.netdev
Article #25433Re: [PATCH net-next v3 04/12] psp: add support for socket-less psp associations
From: Björn Töpel
Date: Tue, 01 Dec 2026 19:10
Date: Tue, 01 Dec 2026 19:10
36 lines
10738 bytes
10738 bytes
Todd Bert Freed <toddfreed@meta.com> writes: >> > 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? > > Thanks for taking a look. The reason for doing it this way, is to enable > hardware offload. The device can check the psp spi, psp version > (packet fields), and psp device (it won't be seeing the packet otherwise). > > The rotations counter is stored on the psp device object (psd->stats). > The device would not be able to perform a check against that. Thanks, that makes sense... I was thinking of the generation as part of the rule's lifetime. Could flower remember the generation returned by rx-spi-alloc and still program just the SPI match on the PSP device? The rule would stay valid through the first rotation. On the second rotation, could the PSP core and the driver make sure the old rule is inactive in hardware before the device can hand out that SPI again? That would keep the generation check out of the packet path and avoid the window where userspace is reacting to a rotation but the stale rule can already match a new owner's packets. Is there a hardware or ordering constraint that makes that difficult? Björn
Technical Details
Message-ID:
<87qzg0olzj.fsf@all.your.base.are.belong.to.us>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375315-linux-kernel-netdev=dewy.ruReferences:
<20261124221758.3230929-1-toddfreed@meta.com> <20261124221758.3230929-5-toddfreed@meta.com> <87cxrriqcl.fsf@all.your.base.are.belong.to.us> <CADh2yMw_kqHtu_WFWFjT8LZr8_cNa2vC_qHGtbNMyYQfnAfS9A@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375315-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: Tue, 01 Dec 2026 20:10:40 +0100 Organization: Usenet Network Message-ID: <87qzg0olzj.fsf@all.your.base.are.belong.to.us> References: <20261124221758.3230929-1-toddfreed@meta.com> <20261124221758.3230929-5-toddfreed@meta.com> <87cxrriqcl.fsf@all.your.base.are.belong.to.us> <CADh2yMw_kqHtu_WFWFjT8LZr8_cNa2vC_qHGtbNMyYQfnAfS9A@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1798872"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:71jja7s3ZRdvxyKR01GT/mRdHsc= sha256:/6K5XNZEhLJaQi3VNI03sACEzX+jPJ8AiQNPN6DsEC0= sha1:XECHXcx3KaK3zA2T6rmEvBwYPPY= sha256:L8X/er3Un4Hr9f9Ja8+dbHSvwzyCEveObJKX23Jxfs4= 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 65378117473; Tue, 1 Dec 2026 22:11:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[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 SeLHnwjEQbnC; Tue, 1 Dec 2026 22:11:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375315-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 50C8F117400; Tue, 1 Dec 2026 22:10:52 +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 43F8E276F2; Tue, 1 Dec 2026 19:10:49 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1796152245; b=bgfcJkAjj5yt56guNHGu3s4NzKodUm6629SuRdObc9xBczXFgeTAdbxXjbr1gyWBO0Iy 3FWkb5yEQ2La71Mnvup2hM0hn2gTueLbpUVG1ncR81NBCzDdxYEu0PrcFzEI9fAc0jLQc ynQ8LGaBH8mkpGabLKjFgUN8QbDwx4mppg6mifkFPU3YwvYq1N1N3xnHqx7ohDDBAnqUV 117HPjDntVymCvrxhoc8APR4nU2ohV/BJsXrfFA7SxfNs5rL/nbG9GMd9UH/V3HZeM9QN 3dck6joOBqKFs+v7UhqfDUlr/8AoDcbre3PSlSZvaP75CPKf5ebp0LJDElkyb9feAsg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796152245; 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=C/i7i68MMCsNYsUfifHBGYOHF8vNdiMvjY2DXbIITfI=; b=l6r1iYd6M55zdQtxpporIyJXutl5W8PQQ2a3nMD+2m8gXi2wzYZpvhQSn806l4RdMFvG Dmom95ly+4OzRdEunlU2MDr0rSUsrEpFOZTjxmgXTOdd7iFV09J53xhJ4iLzQ/3Ag02N6 YVEsGZqmmRsJ2qhUb2URfeu+Z39hrQIvAQqNB5M1OxdJakp2OdFgdJnnVmKjR/CReoCZv zIUc42usEbexFjzfdz8/WXQ1v9vlPFc4IW2X/B+SnvSaPK4MLJ0TIAeEU0i0nd6rbDXCv ZRJAbhiNDL67GeffvdjKxLlM1G3gmtOJ3l6B9M9+L4eJJJeiYlOKGt4x6jc3YOLylKA== 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=MzC+J75E; arc=fail 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 15502606A33C; Tue, 1 Dec 2026 19:10:45 +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=MzC+J75E 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=1796152244; b=1s34HxQRNguQwzecvxvLr5dfpTWDuh0vlBjJE84/PakQb3sJSo6T7c5HuzwpIodeJ8eI 0Oc+PRF/BY8FslNxTUd49X2dU1OpNlZvNM4bY15hFbrqFJhFtdzscgUTj9AQkb8Oe2/ed gQs8uFWdQIv31B21R1rtayaycb+toaZ3CUY+JlagNyRgWpA+wafheMoDyuh+AgmjfULal 7WaZz/amd2SwWJybCXvGLtx9JyjzHEtkZAxytFJcJ8BDGKnJB7hsrORQ6MYZnFdH6v/52 gO7/uQUxDJWoclmQvqvrJ8g7JmqBb8HjSGowaFsupCG5HEPTBN2v2v56AJpO47me7iA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796152244; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=C/i7i68MMCsNYsUfifHBGYOHF8vNdiMvjY2DXbIITfI=; b=owZ9g527561tl5adc7u0z2A5Kr6+DJJz4a8K+NopItO7zDF2fbMXS0yRrDbVSr+lUOPH HYvDSVOwjembz4vBDXhOi1dbeuy/puaP+PVBYMBknPoaDyZZP9X8s4ipy2ln2Icn6e39F iVs3gCM46W6fLCKdxOVJgqg2qTzgxasJ+cq3YJGde6swho1JIRrbqQJTuS97VA0vk0N5n CCUv40t796nsbRV/dEYpltMSWv3PL8hHoM7pbjVHf251V6is6qU53oOF710MDLMnFGdKb GzZLcuFJkduRguSWaZr/y/XV3TEyCxnmyq9g+9x0vsIW9umDb0iWsRqd54acJ0oxHRg== 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=MzC+J75E; 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 31E25606A31A; Tue, 1 Dec 2026 19:10:44 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52B121F000C1; Tue, 1 Dec 2026 19:10:43 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796152244; bh=C/i7i68MMCsNYsUfifHBGYOHF8vNdiMvjY2DXbIITfI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=MzC+J75EtTQWvx+3CGBoQf56MAJ+sGbKmI5mZm3dDco0eFbaaGBT9z2c1HQOSEznG OoyEMF5q7RTIxe/XMqn1n/bRG0DeH6uxjlaAgJQcYr2V4oE8ogA36Nasj3vyK9HEpE zfbiLyg7yB6IoGiQCRR4Gc3/EKn8Lssr4jXadLfUdv6SIKwquhNk9IBSXL96LDOE2b J8ft403PLMNKsAn8iHEB+BYnCWcaF+bTcANm3B3ntFwFkgOwMMFC5/r3P/fG+Gkjfm 51heuH2XoGU2pBR5hdgnj22cNqGe/ONlcaBthwnrIbsVBobhC2fRlBsfvEr44n572O ufiBTMoMlcVeg== X-Cc: netdev@vger.kernel.org, "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: <CADh2yMw_kqHtu_WFWFjT8LZr8_cNa2vC_qHGtbNMyYQfnAfS9A@mail.gmail.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