net/mlx5e: Protect global IPsec ASO
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 9 Jan 2023 08:34:25 +0000 (10:34 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 18 Jan 2023 08:01:39 +0000 (00:01 -0800)
commite4d38c454ae57e649f09a354d5a9dae063a26ee3
tree3ea4fd702121d44894841e278f77933619396623
parent16bccbaa00b6127ed0ebfd77bd1f10341df8d498
net/mlx5e: Protect global IPsec ASO

ASO operations are global to whole IPsec as they share one DMA address
for all operations. As such all WQE operations need to be protected with
lock. In this case, it must be spinlock to allow mlx5e_ipsec_aso_query()
operate in atomic context.

Fixes: 1ed78fc03307 ("net/mlx5e: Update IPsec soft and hard limits")
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c