From: Stan Iliev <stani@google.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
David Decotigny <decot@google.com>,
Madhu Chittim <madhu.chittim@intel.com>,
Emil Tantilov <emil.s.tantilov@intel.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Brian Vazquez <brianvv@google.com>, Li Li <boolli@google.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Daniel Zahka <daniel.zahka@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-hardening@vger.kernel.org
Subject: [PATCH iwl-next 00/15] idpf: add PSP offload support, part 1
Date: Tue, 17 Nov 2026 14:55:06 +0000 [thread overview]
Message-ID: <20261117145522.1910636-1-stani@google.com> (raw)
This series adds PSP (PSP Security Protocol) [1] inline crypto offload
to idpf, through the PSP device API of the PSP core [2]. It comes in two
parts. This is part 1, which adds the control path.
The device encrypts and decrypts the PSP packets. Its control plane
(CP) holds the master keys and the security association database
(SADB) of the TX keys. idpf manages them with new virtchnl2 commands
over the mailbox:
- the CP derives an RX key from a master key and the SPI it allocates,
one synchronous request per rx_spi_alloc;
- the TX keys are inserted into the SADB asynchronously, in batches of
up to 101 keys. The SA index that the CP returns for a key goes into
a TX context descriptor of each of its packets (part 2);
- the SA indexes of the released associations are deleted in batches.
Part 1:
- patches 1-2 wipe the mailbox send buffers on release, as some of the
messages carry keys;
- patch 3 makes the mailbox workqueue visible in sysfs, like the PSP
workqueue added later;
- patches 4-7 add the PSP initialization and negotiate the crypto
offload capabilities, the PSP capabilities and the FIPS compliance
status;
- patches 8-10 implement the rx_spi_alloc, key_rotate and get_stats
PSP device ops;
- patches 11-15 add the TX key state, and the insertion of the TX keys
into the SADB and their deletion.
Part 2 makes idpf_tso() run after the splitq TX resource check,
implements the tx_key_add and tx_key_del PSP device ops and the TX and
RX datapath, and registers the PSP device. Until then, the only change
visible on a device with the crypto offload is the capability
negotiation, which also logs the FIPS compliance status.
PSP is only enabled if the CP grants the new VIRTCHNL2_CAP_CRYPTO
capability, idpf works as before otherwise. The crypto offload API of
the CP uses the virtchnl2 opcodes 560 to 567, the
VIRTCHNL2_EVENT_PSP_ROTATE_KEY event and the VIRTCHNL2_PROTO_HDR_PSP
protocol ID.
Limitations:
- PSP version 0 (AES-GCM-128) and the splitq queue model only;
- the RX datapath only recognizes the IPv6 PSP packet type;
- master key rotations started by the CP itself can't be reported to
the PSP core, as in mlx5;
- the PSP state doesn't survive a hard reset: the PSP device is
unregistered at the start of the reset and registered again once the
reset is done, as in mlx5.
Testing, of both parts on next-queue/dev-queue:
- each patch built with W=1 (allmodconfig) with gcc 15 and clang 21, and
with gcc without CONFIG_INET_PSP: no warnings in idpf, libie and ixd,
and no new kernel-doc warnings. checkpatch --strict only asks for
blank lines between the new virtchnl2.h structures and their
VIRTCHNL2_CHECK_STRUCT_LEN(), which would break the style of the file;
- tools/testing/selftests/drivers/net/psp.py between two hosts with
Intel IPU devices (idpf PF, PCI ID 8086:1452), in both directions,
plus a local case that checks that a connection keeps receiving after
one key rotation: pass:19 fail:1 xfail:2 skip:11. Same result with RX
checksum offload off on both hosts, without TCP checksum errors. The
skips are the IPv4 cases (no IPv4 on these hosts), PSP versions 1 to 3
and kTLS, the xfails need netdevsim. data_mss_adjust fails since
commit 3c6e29760c13 ("tcp: Subtract psp_sk_overhead() in
__tcp_mtu_to_mss() and tcp_mss_to_mtu()."): the routes between these
hosts have mtu 4220 and advmss 4108, so the PSP overhead no longer
reduces the 4096 byte MSS, as that commit intends, while the test
expects a 40 byte reduction. It passed on the same hosts without that
commit;
- after the tests, the TX keys inserted into the SADB were all deleted
once their sockets were gone;
- with part 1 only, the hosts boot, negotiate the crypto offload and
log the FIPS compliance status, without a PSP device.
An AI coding assistant was used to rework parts of the code and of the
commit messages of this series after an internal review, and an AI
code review tool (Sashiko) reviewed the series. I reviewed and tested
all the changes.
[1] https://raw.githubusercontent.com/google/psp/main/doc/PSP_Arch_Spec.pdf
[2] https://docs.kernel.org/networking/psp.html
Stan Iliev (15):
libie: wipe copied small send buffers on release
idpf: wipe mailbox send buffers on release
idpf: make the mailbox workqueue visible in sysfs
idpf: psp: add psp offload initialization
idpf: psp: add support for crypto capabilities
idpf: psp: add support for psp capabilities
idpf: psp: add support for fips compliance status
idpf: psp: add support for psp rx key allocation
idpf: psp: add support for psp key rotation
idpf: psp: add support for psp statistics
idpf: psp: add psp tx key state
idpf: psp: add support for psp tx key deletion
idpf: psp: add psp work and tx key insertion completion
idpf: psp: add support for psp tx key insertion
idpf: psp: add psp tx key registration
drivers/net/ethernet/intel/idpf/Makefile | 2 +
drivers/net/ethernet/intel/idpf/idpf.h | 15 +
drivers/net/ethernet/intel/idpf/idpf_lib.c | 16 +
drivers/net/ethernet/intel/idpf/idpf_main.c | 5 +-
drivers/net/ethernet/intel/idpf/idpf_psp.c | 738 +++++++++++++++
drivers/net/ethernet/intel/idpf/idpf_psp.h | 86 ++
.../net/ethernet/intel/idpf/idpf_psp_def.h | 190 ++++
.../ethernet/intel/idpf/idpf_psp_virtchnl.c | 841 ++++++++++++++++++
.../ethernet/intel/idpf/idpf_psp_virtchnl.h | 23 +
.../intel/idpf/idpf_psp_virtchnl_def.h | 24 +
.../net/ethernet/intel/idpf/idpf_virtchnl.c | 24 +-
drivers/net/ethernet/intel/libie/controlq.c | 28 +-
include/linux/net/intel/virtchnl2.h | 393 ++++++++
13 files changed, 2376 insertions(+), 9 deletions(-)
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp.c
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp.h
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp_def.h
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp_virtchnl.c
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp_virtchnl.h
create mode 100644 drivers/net/ethernet/intel/idpf/idpf_psp_virtchnl_def.h
base-commit: 4cd5d9c333fb45a4e70ad6a77c44f13bd7312afb
--
2.56.0.679.gc527c65306-goog
next reply other threads:[~2026-11-17 14:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 14:55 Stan Iliev [this message]
2026-11-17 14:55 ` [PATCH iwl-next 01/15] libie: wipe copied small send buffers on release Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 02/15] idpf: wipe mailbox " Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 03/15] idpf: make the mailbox workqueue visible in sysfs Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 04/15] idpf: psp: add psp offload initialization Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 05/15] idpf: psp: add support for crypto capabilities Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 06/15] idpf: psp: add support for psp capabilities Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 07/15] idpf: psp: add support for fips compliance status Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 08/15] idpf: psp: add support for psp rx key allocation Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 09/15] idpf: psp: add support for psp key rotation Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 10/15] idpf: psp: add support for psp statistics Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 11/15] idpf: psp: add psp tx key state Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 12/15] idpf: psp: add support for psp tx key deletion Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 13/15] idpf: psp: add psp work and tx key insertion completion Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 14/15] idpf: psp: add support for psp tx key insertion Stan Iliev
2026-11-17 14:55 ` [PATCH iwl-next 15/15] idpf: psp: add psp tx key registration Stan Iliev
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=20261117145522.1910636-1-stani@google.com \
--to=stani@google.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=boolli@google.com \
--cc=brianvv@google.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=edumazet@kernel.org \
--cc=emil.s.tantilov@intel.com \
--cc=gustavoars@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madhu.chittim@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sridhar.samudrala@intel.com \
--cc=willemdebruijn.kernel@gmail.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®