developer | 655d8f0 | 2024-01-11 13:37:13 +0800 | [diff] [blame] | 1 | From 0830e20b62ad156f7df5ff5b9c4cea280ebe8fef Mon Sep 17 00:00:00 2001 |
| 2 | From: Antoine Tenart <antoine.tenart@bootlin.com> |
| 3 | Date: Mon, 13 Jan 2020 23:31:41 +0100 |
| 4 | Subject: net: macsec: introduce MACsec ops |
| 5 | |
| 6 | This patch introduces MACsec ops for drivers to support offloading |
| 7 | MACsec operations. |
| 8 | |
| 9 | Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> |
| 10 | Signed-off-by: David S. Miller <davem@davemloft.net> |
| 11 | --- |
| 12 | include/net/macsec.h | 24 ++++++++++++++++++++++++ |
| 13 | 1 file changed, 24 insertions(+) |
| 14 | |
| 15 | diff --git a/include/net/macsec.h b/include/net/macsec.h |
| 16 | index 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 | -- |
| 49 | cgit 1.2.3-1.el7 |
| 50 | |