OpenCloudOS-Kernel/net/devlink
Dima Chumak 390a24cbc3 devlink: Expose port function commands to control IPsec packet offloads
Expose port function commands to enable / disable IPsec packet offloads,
this is used to control the port IPsec capabilities.

When IPsec packet is disabled for a function of the port (default),
function cannot offload IPsec packet operations (encapsulation and XFRM
policy offload). When enabled, IPsec packet operations can be offloaded
by the function of the port, which includes crypto operation
(Encrypt/Decrypt), IPsec encapsulation and XFRM state and policy
offload.

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_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_packet enable

Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230825062836.103744-3-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-27 17:08:45 -07:00
..
Makefile devlink: add split ops generated according to spec 2023-08-04 14:03:01 -07:00
core.c devlink: Fix crash with CONFIG_NET_NS=n 2023-05-16 19:57:52 -07:00
dev.c devlink: pass flags as an arg of dump_one() callback 2023-08-14 11:47:25 -07:00
devl_internal.h devlink: remove converted commands from small ops 2023-08-14 11:47:25 -07:00
health.c genetlink: use attrs from struct genl_info 2023-08-15 15:00:45 -07:00
leftover.c devlink: Expose port function commands to control IPsec packet offloads 2023-08-27 17:08:45 -07:00
netlink.c genetlink: use attrs from struct genl_info 2023-08-15 15:00:45 -07:00
netlink_gen.c netlink: specs: devlink: extend health reporter dump attributes by port index 2023-08-14 11:47:25 -07:00
netlink_gen.h netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00