]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: Support setting port function ipsec_packet cap
authorDima Chumak <dchumak@nvidia.com>
Mon, 2 Oct 2023 10:43:49 +0000 (13:43 +0300)
committerDavid Ahern <dsahern@kernel.org>
Wed, 4 Oct 2023 15:23:11 +0000 (09:23 -0600)
commit994e80e9c9fb22ae69817892af844c06a6bf928a
treee524e88ae819d748a3b7fb045824bd464f8ed08a
parent27fd1bfa1b5f1f4ec004b2647d269f6c3e66c8f8
devlink: Support setting port function ipsec_packet cap

Support port function commands to enable / disable IPsec packet
offloads, this is used to control the port IPsec device capabilities.

When IPsec packet capability is disabled for a function of the port
(default), function cannot offload IPsec operation. When enabled, IPsec
operation can be offloaded by the function of the port.

Enabling IPsec packet offloads lets the kernel to delegate
encrypt/decrypt operations, as well as encapsulation and SA/policy and
state to the device hardware.

Example of a PCI VF port which supports IPsec packet offloads:

$ devlink port show pci/0000:06:00.0/1
    pci/0000:06:00.0/1: type eth netdev enp6s0pf0vf0 flavour pcivf pfnum 0 vfnum 0
function:
hw_addr 00:00:00:00:00:00 roce enable ipsec_crypto disable ipsec_packet disable

$ devlink port function set pci/0000:06:00.0/1 ipsec_packet enable

$ devlink port show pci/0000:06:00.0/1
    pci/0000:06:00.0/1: type eth netdev enp6s0pf0vf0 flavour pcivf pfnum 0 vfnum 0
function:
hw_addr 00:00:00:00:00:00 roce enable ipsec_crypto disable ipsec_packet enable

Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
devlink/devlink.c
man/man8/devlink-port.8