Skip to content

Commit 0830e20

Browse files
atenartdavem330
authored andcommitted
net: macsec: introduce MACsec ops
This patch introduces MACsec ops for drivers to support offloading MACsec operations. Signed-off-by: Antoine Tenart <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7656426 commit 0830e20

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

include/net/macsec.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,28 @@ struct macsec_context {
195195
u8 prepare:1;
196196
};
197197

198+
/**
199+
* struct macsec_ops - MACsec offloading operations
200+
*/
201+
struct macsec_ops {
202+
/* Device wide */
203+
int (*mdo_dev_open)(struct macsec_context *ctx);
204+
int (*mdo_dev_stop)(struct macsec_context *ctx);
205+
/* SecY */
206+
int (*mdo_add_secy)(struct macsec_context *ctx);
207+
int (*mdo_upd_secy)(struct macsec_context *ctx);
208+
int (*mdo_del_secy)(struct macsec_context *ctx);
209+
/* Security channels */
210+
int (*mdo_add_rxsc)(struct macsec_context *ctx);
211+
int (*mdo_upd_rxsc)(struct macsec_context *ctx);
212+
int (*mdo_del_rxsc)(struct macsec_context *ctx);
213+
/* Security associations */
214+
int (*mdo_add_rxsa)(struct macsec_context *ctx);
215+
int (*mdo_upd_rxsa)(struct macsec_context *ctx);
216+
int (*mdo_del_rxsa)(struct macsec_context *ctx);
217+
int (*mdo_add_txsa)(struct macsec_context *ctx);
218+
int (*mdo_upd_txsa)(struct macsec_context *ctx);
219+
int (*mdo_del_txsa)(struct macsec_context *ctx);
220+
};
221+
198222
#endif /* _NET_MACSEC_H_ */

0 commit comments

Comments
 (0)