Commit 7390762a authored by Patrisious Haddad's avatar Patrisious Haddad Committed by Leon Romanovsky
Browse files

net/mlx5e: Move MACsec flow steering operations to be used as core library



Move MACsec flow steering operations(macsec_fs) from core/en_accel to
core/lib, this mandates moving MACsec statistics structure from the
general MACsec code header(en_accel/macsec.h) to macsec_fs header to
remove macsec_fs.h dependency over en_accel/macsec.h.

This to lay the ground for RoCE MACsec by moving all the data
that will need to be accessed by both ethernet MACsec and
RoCE MACsec to be shared at core.

Signed-off-by: default avatarPatrisious Haddad <phaddad@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent f132fdd9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ config MLX5_CORE_IPOIB
	help
	  MLX5 IPoIB offloads & acceleration support.

config MLX5_EN_MACSEC
config MLX5_MACSEC
	bool "Connect-X support for MACSec offload"
	depends on MLX5_CORE_EN
	depends on MACSEC
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ mlx5_core-$(CONFIG_MLX5_CORE_IPOIB) += ipoib/ipoib.o ipoib/ethtool.o ipoib/ipoib
#
mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o

mlx5_core-$(CONFIG_MLX5_EN_MACSEC) += en_accel/macsec.o en_accel/macsec_fs.o \
mlx5_core-$(CONFIG_MLX5_MACSEC) += en_accel/macsec.o lib/macsec_fs.o \
				      en_accel/macsec_stats.o

mlx5_core-$(CONFIG_MLX5_EN_IPSEC) += en_accel/ipsec.o en_accel/ipsec_rxtx.o \
+1 −1
Original line number Diff line number Diff line
@@ -917,7 +917,7 @@ struct mlx5e_priv {

	const struct mlx5e_profile *profile;
	void                      *ppriv;
#ifdef CONFIG_MLX5_EN_MACSEC
#ifdef CONFIG_MLX5_MACSEC
	struct mlx5e_macsec       *macsec;
#endif
#ifdef CONFIG_MLX5_EN_IPSEC
+2 −2
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ static inline bool mlx5e_accel_tx_begin(struct net_device *dev,
	}
#endif

#ifdef CONFIG_MLX5_EN_MACSEC
#ifdef CONFIG_MLX5_MACSEC
	if (unlikely(mlx5e_macsec_skb_is_offload(skb))) {
		struct mlx5e_priv *priv = netdev_priv(dev);

@@ -173,7 +173,7 @@ static inline void mlx5e_accel_tx_eseg(struct mlx5e_priv *priv,
		mlx5e_ipsec_tx_build_eseg(priv, skb, eseg);
#endif

#ifdef CONFIG_MLX5_EN_MACSEC
#ifdef CONFIG_MLX5_MACSEC
	if (unlikely(mlx5e_macsec_skb_is_offload(skb)))
		mlx5e_macsec_tx_build_eseg(priv->macsec, skb, eseg);
#endif
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
#include "lib/aso.h"
#include "lib/crypto.h"
#include "en_accel/macsec.h"
#include "en_accel/macsec_fs.h"

#define MLX5_MACSEC_EPN_SCOPE_MID 0x80000000L
#define MLX5E_MACSEC_ASO_CTX_SZ MLX5_ST_SZ_BYTES(macsec_aso)
Loading