mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
psp: add new netlink cmd for dev-assoc and dev-disassoc
The main purpose of this cmd is to be able to associate a non-psp-capable device (e.g. veth or netkit) with a psp device. One use case is if we create a pair of veth/netkit, and assign 1 end inside a netns, while leaving the other end within the default netns, with a real PSP device, e.g. netdevsim or a physical PSP-capable NIC. With this command, we could associate the veth/netkit inside the netns with PSP device, so the virtual device could act as PSP-capable device to initiate PSP connections, and performs PSP encryption/decryption on the real PSP device. Signed-off-by: Wei Wang <weibunny@fb.com> Reviewed-by: Daniel Zahka <daniel.zahka@gmail.com> Link: https://patch.msgid.link/20260608233118.2694144-3-weibunny.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -17,11 +17,22 @@ enum psp_version {
|
||||
PSP_VERSION_HDR0_AES_GMAC_256,
|
||||
};
|
||||
|
||||
enum {
|
||||
PSP_A_ASSOC_DEV_INFO_IFINDEX = 1,
|
||||
PSP_A_ASSOC_DEV_INFO_NSID,
|
||||
|
||||
__PSP_A_ASSOC_DEV_INFO_MAX,
|
||||
PSP_A_ASSOC_DEV_INFO_MAX = (__PSP_A_ASSOC_DEV_INFO_MAX - 1)
|
||||
};
|
||||
|
||||
enum {
|
||||
PSP_A_DEV_ID = 1,
|
||||
PSP_A_DEV_IFINDEX,
|
||||
PSP_A_DEV_PSP_VERSIONS_CAP,
|
||||
PSP_A_DEV_PSP_VERSIONS_ENA,
|
||||
PSP_A_DEV_ASSOC_LIST,
|
||||
PSP_A_DEV_NSID,
|
||||
PSP_A_DEV_BY_ASSOCIATION,
|
||||
|
||||
__PSP_A_DEV_MAX,
|
||||
PSP_A_DEV_MAX = (__PSP_A_DEV_MAX - 1)
|
||||
@@ -74,6 +85,8 @@ enum {
|
||||
PSP_CMD_RX_ASSOC,
|
||||
PSP_CMD_TX_ASSOC,
|
||||
PSP_CMD_GET_STATS,
|
||||
PSP_CMD_DEV_ASSOC,
|
||||
PSP_CMD_DEV_DISASSOC,
|
||||
|
||||
__PSP_CMD_MAX,
|
||||
PSP_CMD_MAX = (__PSP_CMD_MAX - 1)
|
||||
|
||||
Reference in New Issue
Block a user