public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] psp: add crypt-offset and spi-threshold attributes
@ 2026-04-06 22:23 Akhilesh Samineni
  2026-04-06 22:23 ` [PATCH net-next 1/3] psp: add crypt-offset and spi-threshold get/set attributes Akhilesh Samineni
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Akhilesh Samineni @ 2026-04-06 22:23 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, andrew+netdev, horms, willemb,
	daniel.zahka
  Cc: netdev, linux-kernel, jayakrishnan.udayavarma, ajit.khaparde,
	kiran.kella, akhilesh.samineni, sachin.suman

This series introduces two new configurable per-device attributes to
the PSP (PSP Security Protocol) subsystem: crypt-offset and spi-threshold.

crypt-offset (Crypt Offset)
----------------------------------
The crypt-offset attribute specifies the byte offset within a packet from
which encryption begins. A non-zero value allows a fixed-size portion of
the packet header to remain in plaintext, which is useful where
intermediate network nodes need to inspect a well-known header before the
encrypted region. The default value is 0, meaning encryption starts
immediately after the PSP header.

spi-threshold (SPI Threshold)
-------------------------------
SPI values are allocated monotonically from a 32-bit per-device space.
The spi-threshold attribute lets userspace configure the SPI value at
which rotation should be triggered before the space is exhausted.

A named constant PSP_SPI_THRESHOLD_DEFAULT (~90% of 0x7FFFFFFF) is
introduced in include/net/psp/types.h as the single authoritative
definition, used by both the PSP core (psp_main.c) and the netdevsim
driver (psp.c). This avoids scattering the magic value across drivers.

A follow-up series will add netlink notification support to alert
subscribed listeners when the configured spi-threshold is reached,
enabling timely SPI rotation.

Akhilesh Samineni (3):
  psp: add crypt-offset and spi-threshold get/set attributes
  netdevsim: psp: handle the new crypt-offset and spi-threshold get/set operations
  selftests: net: psp: add crypt-offset and spi-threshold test cases

 Documentation/netlink/specs/psp.yaml       | 13 +++++++++
 drivers/net/netdevsim/netdevsim.h          |  2 ++
 drivers/net/netdevsim/psp.c                |  6 ++++
 include/net/psp/types.h                    |  7 +++++
 include/uapi/linux/psp.h                   |  2 ++
 net/psp/psp-nl-gen.c                       |  6 ++--
 net/psp/psp_main.c                         |  3 ++
 net/psp/psp_nl.c                           | 27 +++++++++++++++---
 tools/testing/selftests/drivers/net/psp.py | 32 +++++++++++++++++++++++
 9 files changed, 92 insertions(+), 6 deletions(-)

-- 
2.45.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-04-07 21:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 22:23 [PATCH net-next 0/3] psp: add crypt-offset and spi-threshold attributes Akhilesh Samineni
2026-04-06 22:23 ` [PATCH net-next 1/3] psp: add crypt-offset and spi-threshold get/set attributes Akhilesh Samineni
2026-04-07 21:37   ` Willem de Bruijn
2026-04-06 22:23 ` [PATCH net-next 2/3] netdevsim: psp: handle the new crypt-offset and spi-threshold get/set operations Akhilesh Samineni
2026-04-07 21:43   ` Willem de Bruijn
2026-04-07 21:49   ` Willem de Bruijn
2026-04-06 22:23 ` [PATCH net-next 3/3] selftests: net: psp: add crypt-offset and spi-threshold test cases Akhilesh Samineni
2026-04-07 21:52   ` Willem de Bruijn
2026-04-07  1:14 ` [PATCH net-next 0/3] psp: add crypt-offset and spi-threshold attributes Jakub Kicinski
2026-04-07 15:39   ` Akhilesh Samineni
2026-04-07 18:07     ` Daniel Zahka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox