Skip to content

Commit 20f5468

Browse files
rleonSaeed Mahameed
authored andcommitted
net/mlx5e: Allow software parsing when IPsec crypto is enabled
All ConnectX devices have software parsing capability enabled, but it is more correct to set allow_swp only if capability exists, which for IPsec means that crypto offload is supported. Fixes: 2451da0 ("net/mlx5: Unify device IPsec capabilities check") Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 20cbf8c commit 20f5468

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/params.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,8 @@ void mlx5e_build_sq_param(struct mlx5_core_dev *mdev,
10641064
void *wq = MLX5_ADDR_OF(sqc, sqc, wq);
10651065
bool allow_swp;
10661066

1067-
allow_swp =
1068-
mlx5_geneve_tx_allowed(mdev) || !!mlx5_ipsec_device_caps(mdev);
1067+
allow_swp = mlx5_geneve_tx_allowed(mdev) ||
1068+
(mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_CRYPTO);
10691069
mlx5e_build_sq_param_common(mdev, param);
10701070
MLX5_SET(wq, wq, log_wq_sz, params->log_sq_size);
10711071
MLX5_SET(sqc, sqc, allow_swp, allow_swp);

0 commit comments

Comments
 (0)