mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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>
This commit is contained in:
committed by
David S. Miller
parent
c0e4eadfb8
commit
76564261a7
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user