History

net: macsec: add nla support for changing the offloading selection

MACsec offloading to underlying hardware devices is disabled by default (the software implementation is used). This patch adds support for changing this setting through the MACsec netlink interface. Many checks are done when enabling offloading on a given MACsec interface as there are limitations (it must be supported by the hardware, only a single interface can be offloaded on a given physical device at a time, rules can't be moved for now).

Antoine Tenart committed 6 years ago

Commit dcb780f1 parent 3cf32272 files · +153 −3Browse files

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

Unified · Split

include/uapi/linux/if_macsec.h+11−0
@@ -45,6 +45,7 @@ enum macsec_attrs { · 44 unmodified lines
45 MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */45 MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
46 MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */46 MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
47 MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */47 MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
48 MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */
48 __MACSEC_ATTR_END,49 __MACSEC_ATTR_END,
49 NUM_MACSEC_ATTR = __MACSEC_ATTR_END,50 NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
50 MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,51 MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
@@ -97,6 +98,15 @@ enum macsec_sa_attrs { · 46 unmodified lines
97 MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,98 MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
98};99};
99 100
101enum macsec_offload_attrs {
102 MACSEC_OFFLOAD_ATTR_UNSPEC,
103 MACSEC_OFFLOAD_ATTR_TYPE, /* config/dump, u8 0..2 */
104 MACSEC_OFFLOAD_ATTR_PAD,
105 __MACSEC_OFFLOAD_ATTR_END,
106 NUM_MACSEC_OFFLOAD_ATTR = __MACSEC_OFFLOAD_ATTR_END,
107 MACSEC_OFFLOAD_ATTR_MAX = __MACSEC_OFFLOAD_ATTR_END - 1,
108};
109
100enum macsec_nl_commands {110enum macsec_nl_commands {
101 MACSEC_CMD_GET_TXSC,111 MACSEC_CMD_GET_TXSC,
102 MACSEC_CMD_ADD_RXSC,112 MACSEC_CMD_ADD_RXSC,
@@ -108,6 +118,7 @@ enum macsec_nl_commands { · 5 unmodified lines
108 MACSEC_CMD_ADD_RXSA,118 MACSEC_CMD_ADD_RXSA,
109 MACSEC_CMD_DEL_RXSA,119 MACSEC_CMD_DEL_RXSA,
110 MACSEC_CMD_UPD_RXSA,120 MACSEC_CMD_UPD_RXSA,
121 MACSEC_CMD_UPD_OFFLOAD,
111};122};
112 123
113/* u64 per-RXSC stats */124/* u64 per-RXSC stats */

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