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
4545 MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
4646 MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
4747 MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
48+ MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */
4849 __MACSEC_ATTR_END,
4950 NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
5051 MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
@@ -97,6 +98,15 @@ enum macsec_sa_attrs { · 46 unmodified lines
9798 MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
9899 };
99100
101+enum 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+
100110 enum macsec_nl_commands {
101111 MACSEC_CMD_GET_TXSC,
102112 MACSEC_CMD_ADD_RXSC,
@@ -108,6 +118,7 @@ enum macsec_nl_commands { · 5 unmodified lines
108118 MACSEC_CMD_ADD_RXSA,
109119 MACSEC_CMD_DEL_RXSA,
110120 MACSEC_CMD_UPD_RXSA,
121+ MACSEC_CMD_UPD_OFFLOAD,
111122 };
112123
113124 /* 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