net/mlx5: Allow blocking encap changes in eswitch
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 13 Apr 2023 12:29:26 +0000 (15:29 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 18 Apr 2023 01:55:25 +0000 (18:55 -0700)
commitacc109291a028a9d9880dd44a9df8e79f2fb854c
tree0be057507c4e81c5966cb1b2f9159665e98b2fa2
parent4c24272b4e2befca6ad1409c3c9aaa16c24b1099
net/mlx5: Allow blocking encap changes in eswitch

Existing eswitch encap option enables header encapsulation. Unfortunately
currently available hardware isn't able to perform double encapsulation,
which can happen once IPsec packet offload tunnel mode is used together
with encap mode set to BASIC.

So as a solution for misconfiguration, provide an option to block encap
changes, which will be used for IPsec packet offload.

Reviewed-by: Emeel Hakim <ehakim@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c