]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
psp: provide encapsulation helper for drivers
authorRaed Salem <raeds@nvidia.com>
Wed, 17 Sep 2025 00:09:40 +0000 (17:09 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 18 Sep 2025 10:32:07 +0000 (12:32 +0200)
commitfc724515741a1b86ca0457825fdb784ab038e92c
tree7ecbe2c1cc6fc824800874c2c2ca124228bd99a1
parentaf2196f494808e236362b3b126e8b09489093102
psp: provide encapsulation helper for drivers

Create a new function psp_encapsulate(), which takes a TCP packet and
PSP encapsulates it according to the "Transport Mode Packet Format"
section of the PSP Architecture Specification.

psp_encapsulate() does not push a PSP trailer onto the skb. Both IPv6
and IPv4 are supported. Virtualization cookie is not included.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Co-developed-by: Daniel Zahka <daniel.zahka@gmail.com>
Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250917000954.859376-14-daniel.zahka@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/psp/functions.h
include/net/psp/types.h
net/psp/psp_main.c