net/mlx5e: Fix FW error while setting IPsec policy block action
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 20 Apr 2023 08:02:47 +0000 (11:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2023 10:49:47 +0000 (11:49 +0100)
commite239e31ae8026b85e225941eb3f2cd7deb24f0d1
tree59d59f977a1e5f47f3b63f9ff8508695cf352269
parent35226750f7ab9d49140d95bc7d38a2a9b0f4fdfc
net/mlx5e: Fix FW error while setting IPsec policy block action

When trying to set IPsec policy block action the following error is
generated:

 mlx5_cmd_out_err:803:(pid 3426): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed,
status bad parameter(0x3), syndrome (0x8708c3), err(-22)

This error means that drop action is not allowed when modify action is
set, so update the code to skip modify header for XFRM_POLICY_BLOCK action.

Fixes: 6721239672fe ("net/mlx5e: Skip IPsec encryption for TX path without matching policy")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c