Skip to content

Commit 8ff0ac5

Browse files
Lior Nahmansondavem330
Lior Nahmanson
authored andcommitted
net/mlx5: Add MACsec offload Tx command support
This patch adds support for Connect-X MACsec offload Tx SA commands: add, update and delete. In Connect-X MACsec, a Security Association (SA) is added or deleted via allocating a HW context of an encryption/decryption key and a HW context of a matching SA (MACsec object). When new SA is added: - Use a separate crypto key HW context. - Create a separate MACsec context in HW to include the SA properties. Introduce a new compilation flag MLX5_EN_MACSEC for it. Follow-up patches will implement the Tx steering. Signed-off-by: Lior Nahmanson <[email protected]> Reviewed-by: Raed Salem <[email protected]> Signed-off-by: Raed Salem <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8385c51 commit 8ff0ac5

File tree

9 files changed

+440
-0
lines changed

9 files changed

+440
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ config MLX5_CORE_IPOIB
139139
help
140140
MLX5 IPoIB offloads & acceleration support.
141141

142+
config MLX5_EN_MACSEC
143+
bool "Connect-X support for MACSec offload"
144+
depends on MLX5_CORE_EN
145+
depends on MACSEC
146+
default n
147+
help
148+
Build support for MACsec cryptography-offload acceleration in the NIC.
149+
142150
config MLX5_EN_IPSEC
143151
bool "Mellanox Technologies IPsec Connect-X support"
144152
depends on MLX5_CORE_EN

drivers/net/ethernet/mellanox/mlx5/core/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ mlx5_core-$(CONFIG_MLX5_CORE_IPOIB) += ipoib/ipoib.o ipoib/ethtool.o ipoib/ipoib
9292
#
9393
mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o
9494

95+
mlx5_core-$(CONFIG_MLX5_EN_MACSEC) += en_accel/macsec.o
96+
9597
mlx5_core-$(CONFIG_MLX5_EN_IPSEC) += en_accel/ipsec.o en_accel/ipsec_rxtx.o \
9698
en_accel/ipsec_stats.o en_accel/ipsec_fs.o \
9799
en_accel/ipsec_offload.o

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,9 @@ struct mlx5e_priv {
954954

955955
const struct mlx5e_profile *profile;
956956
void *ppriv;
957+
#ifdef CONFIG_MLX5_EN_MACSEC
958+
struct mlx5e_macsec *macsec;
959+
#endif
957960
#ifdef CONFIG_MLX5_EN_IPSEC
958961
struct mlx5e_ipsec *ipsec;
959962
#endif

0 commit comments

Comments
 (0)