blob: 1681b745b99e70d23ddef6d300084e2a91076e7e [file] [log] [blame]
developer7e32f7e2022-05-18 21:10:08 +08001From 0830e20b62ad156f7df5ff5b9c4cea280ebe8fef Mon Sep 17 00:00:00 2001
2From: Antoine Tenart <antoine.tenart@bootlin.com>
3Date: Mon, 13 Jan 2020 23:31:41 +0100
4Subject: net: macsec: introduce MACsec ops
5
6This patch introduces MACsec ops for drivers to support offloading
7MACsec operations.
8
9Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
10Signed-off-by: David S. Miller <davem@davemloft.net>
11---
12 include/net/macsec.h | 24 ++++++++++++++++++++++++
13 1 file changed, 24 insertions(+)
14
15diff --git a/include/net/macsec.h b/include/net/macsec.h
16index 0b98803f92ec1..16e7e5061178e 100644
17--- a/include/net/macsec.h
18+++ b/include/net/macsec.h
19@@ -195,4 +195,28 @@ struct macsec_context {
20 u8 prepare:1;
21 };
22
23+/**
24+ * struct macsec_ops - MACsec offloading operations
25+ */
26+struct macsec_ops {
27+ /* Device wide */
28+ int (*mdo_dev_open)(struct macsec_context *ctx);
29+ int (*mdo_dev_stop)(struct macsec_context *ctx);
30+ /* SecY */
31+ int (*mdo_add_secy)(struct macsec_context *ctx);
32+ int (*mdo_upd_secy)(struct macsec_context *ctx);
33+ int (*mdo_del_secy)(struct macsec_context *ctx);
34+ /* Security channels */
35+ int (*mdo_add_rxsc)(struct macsec_context *ctx);
36+ int (*mdo_upd_rxsc)(struct macsec_context *ctx);
37+ int (*mdo_del_rxsc)(struct macsec_context *ctx);
38+ /* Security associations */
39+ int (*mdo_add_rxsa)(struct macsec_context *ctx);
40+ int (*mdo_upd_rxsa)(struct macsec_context *ctx);
41+ int (*mdo_del_rxsa)(struct macsec_context *ctx);
42+ int (*mdo_add_txsa)(struct macsec_context *ctx);
43+ int (*mdo_upd_txsa)(struct macsec_context *ctx);
44+ int (*mdo_del_txsa)(struct macsec_context *ctx);
45+};
46+
47 #endif /* _NET_MACSEC_H_ */
48--
49cgit 1.2.3-1.el7
50