net/mlx5e: Disable IPsec offload support if not FW steering
authorChris Mi <cmi@nvidia.com>
Mon, 30 Oct 2023 13:44:47 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:44 +0000 (17:01 +0100)
commit7e46db5e2a311ff4b28d8a4e0a3f23d9cdf3e78b
tree749583779d1b59141c5c3e240e64f706ddb43a49
parentfdd350fe5e1a8a87b3bda46792a72980b93e72ab
net/mlx5e: Disable IPsec offload support if not FW steering

[ Upstream commit 762a55a54eec4217e4cec9265ab6e5d4c11b61bd ]

IPsec FDB offload can only work with FW steering as of now,
disable the cap upon non FW steering.

And since the IPSec cap is dynamic now based on steering mode.
Cleanup the resources if they exist instead of checking the
IPsec cap again.

Fixes: edd8b295f9e2 ("Merge branch 'mlx5-ipsec-packet-offload-support-in-eswitch-mode'")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c