diff mbox series

[net-next,6/7] net/mlx5e: macsec: remove checks on the prepare phase

Message ID 20220921135118.968595-7-atenart@kernel.org (mailing list archive)
State Accepted
Commit 36c2ebced3a808d6fa3cc2847a4f20ef7c5d5b5b
Delegated to: Netdev Maintainers
Headers show
Series net: macsec: remove the preparation phase when offloading operations | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/cc_maintainers warning 5 maintainers not CCed: linux-rdma@vger.kernel.org leon@kernel.org borisp@nvidia.com raeds@nvidia.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 108 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Antoine Tenart Sept. 21, 2022, 1:51 p.m. UTC
Remove checks on the prepare phase as it is now unused by the MACsec
core implementation.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
 .../mellanox/mlx5/core/en_accel/macsec.c      | 36 -------------------
 1 file changed, 36 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
index ea362072a984..c33e9ffe8b57 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
@@ -321,9 +321,6 @@  static int mlx5e_macsec_add_txsa(struct macsec_context *ctx)
 	struct mlx5e_macsec *macsec;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -393,9 +390,6 @@  static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx)
 	struct net_device *netdev;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -456,9 +450,6 @@  static int mlx5e_macsec_del_txsa(struct macsec_context *ctx)
 	struct mlx5e_macsec *macsec;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 	macsec = priv->macsec;
 	macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);
@@ -511,9 +502,6 @@  static int mlx5e_macsec_add_rxsc(struct macsec_context *ctx)
 	struct mlx5e_macsec *macsec;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 	macsec = priv->macsec;
 	macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);
@@ -591,9 +579,6 @@  static int mlx5e_macsec_upd_rxsc(struct macsec_context *ctx)
 	int i;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -642,9 +627,6 @@  static int mlx5e_macsec_del_rxsc(struct macsec_context *ctx)
 	int err = 0;
 	int i;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -710,9 +692,6 @@  static int mlx5e_macsec_add_rxsa(struct macsec_context *ctx)
 	struct list_head *list;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -794,9 +773,6 @@  static int mlx5e_macsec_upd_rxsa(struct macsec_context *ctx)
 	struct list_head *list;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -853,9 +829,6 @@  static int mlx5e_macsec_del_rxsa(struct macsec_context *ctx)
 	struct list_head *list;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 
 	macsec = priv->macsec;
@@ -905,9 +878,6 @@  static int mlx5e_macsec_add_secy(struct macsec_context *ctx)
 	struct mlx5e_macsec *macsec;
 	int err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	if (!mlx5e_macsec_secy_features_validate(ctx))
 		return -EINVAL;
 
@@ -1008,9 +978,6 @@  static int mlx5e_macsec_upd_secy(struct macsec_context *ctx)
 	struct mlx5e_macsec *macsec;
 	int i, err = 0;
 
-	if (ctx->prepare)
-		return 0;
-
 	if (!mlx5e_macsec_secy_features_validate(ctx))
 		return -EINVAL;
 
@@ -1069,9 +1036,6 @@  static int mlx5e_macsec_del_secy(struct macsec_context *ctx)
 	int err = 0;
 	int i;
 
-	if (ctx->prepare)
-		return 0;
-
 	mutex_lock(&priv->macsec->lock);
 	macsec = priv->macsec;
 	macsec_device = mlx5e_macsec_get_macsec_device_context(macsec, ctx);