net/mlx5: Store IPsec ESN update work in XFRM state
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 8 Mar 2022 18:36:15 +0000 (20:36 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 05:59:15 +0000 (22:59 -0700)
commitc674df973ad8af2074c834788e167332d81309fa
tree5a3b9b95acd877b000e1f1d7e190a24a2f33c8cb
parenta05a54694e409e8b1a3f0219a24d919cd9e445f3
net/mlx5: Store IPsec ESN update work in XFRM state

mlx5 IPsec code updated ESN through workqueue with allocation calls
in the data path, which can be saved easily if the work is created
during XFRM state initialization routine.

The locking used later in the work didn't protect from anything because
change of HW context is possible during XFRM state add or delete only,
which can cancel work and make sure that it is not running.

Reviewed-by: Raed Salem <raeds@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.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
include/linux/mlx5/accel.h