net/mlx5: Make sure that no dangling IPsec FS pointers exist
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 10 Mar 2022 18:48:03 +0000 (20:48 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 4 May 2022 05:59:17 +0000 (22:59 -0700)
commitb7242ffc562ccf26121c85beb58e9ad40157b6fe
treec9c7ee758fb73d042f7809bcae8ece384056e99b
parent82f7bdba377578e09935bff59157f7361ec6919c
net/mlx5: Make sure that no dangling IPsec FS pointers exist

The IPsec FS code was implemented with anti-pattern there failures
in create functions left the system with dangling pointers that were
cleaned in global routines.

The less error prone approach is to make sure that failed function
cleans everything internally.

As part of this change, we remove the batch of one liners and rewrite
get/put functions to remove ambiguity.

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_fs.c