History

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

Dima Chumak committed 3 years ago

Commit 390a24c1 parent 62b64424 files · +97 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/devlink.h+2−0
@@ -662,6 +662,7 @@ enum devlink_port_fn_attr_cap { · 661 unmodified lines
662 DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT,662 DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT,
663 DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT,663 DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT,
664 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT,664 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT,
665 DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT,
665 666
666 /* Add new caps above */667 /* Add new caps above */
667 __DEVLINK_PORT_FN_ATTR_CAPS_MAX,668 __DEVLINK_PORT_FN_ATTR_CAPS_MAX,
@@ -671,6 +672,7 @@ enum devlink_port_fn_attr_cap { · 3 unmodified lines
671#define DEVLINK_PORT_FN_CAP_MIGRATABLE \672#define DEVLINK_PORT_FN_CAP_MIGRATABLE \
672 _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT)673 _BITUL(DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT)
673#define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT)674#define DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_CRYPTO_BIT)
675#define DEVLINK_PORT_FN_CAP_IPSEC_PACKET _BITUL(DEVLINK_PORT_FN_ATTR_CAP_IPSEC_PACKET_BIT)
674 676
675enum devlink_port_function_attr {677enum devlink_port_function_attr {
676 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC,678 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t