diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2020-01-13 23:31:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-14 11:31:41 -0800 |
commit | 76564261a7db80c5f5c624e0122a28787f266bdf (patch) | |
tree | 343eaf87371c290bb1143ecd871e50eade1950f6 /include/net/macsec.h | |
parent | c0e4eadfb8daf2e9557c7450f9b237c08b404419 (diff) | |
download | linux-rpi-76564261a7db80c5f5c624e0122a28787f266bdf.tar.gz linux-rpi-76564261a7db80c5f5c624e0122a28787f266bdf.tar.bz2 linux-rpi-76564261a7db80c5f5c624e0122a28787f266bdf.zip |
net: macsec: introduce the macsec_context structure
This patch introduces the macsec_context structure. It will be used
in the kernel to exchange information between the common MACsec
implementation (macsec.c) and the MACsec hardware offloading
implementations. This structure contains pointers to MACsec specific
structures which contain the actual MACsec configuration, and to the
underlying device (phydev for now).
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/macsec.h')
-rw-r--r-- | include/net/macsec.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/net/macsec.h b/include/net/macsec.h index e7b41c1043f6..0b98803f92ec 100644 --- a/include/net/macsec.h +++ b/include/net/macsec.h @@ -174,4 +174,25 @@ struct macsec_secy { struct macsec_rx_sc __rcu *rx_sc; }; +/** + * struct macsec_context - MACsec context for hardware offloading + */ +struct macsec_context { + struct phy_device *phydev; + enum macsec_offload offload; + + struct macsec_secy *secy; + struct macsec_rx_sc *rx_sc; + struct { + unsigned char assoc_num; + u8 key[MACSEC_KEYID_LEN]; + union { + struct macsec_rx_sa *rx_sa; + struct macsec_tx_sa *tx_sa; + }; + } sa; + + u8 prepare:1; +}; + #endif /* _NET_MACSEC_H_ */ |