net/mlx5e: Make TC and IPsec offloads mutually exclusive on a netdev
authorJianbo Liu <jianbol@nvidia.com>
Mon, 31 Jul 2023 11:28:24 +0000 (14:28 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Aug 2023 01:37:30 +0000 (18:37 -0700)
commitc8e350e62fc51f3fda28f166fc402f4fb539f528
treed14e9d5e9906fd6beb680f70c4507035b80897d6
parent6e56ab1c90593630d5e8799831e9dea4850128ea
net/mlx5e: Make TC and IPsec offloads mutually exclusive on a netdev

For IPsec packet offload mode, the order of TC offload and IPsec
offload on the same netdevice is not aligned with the order in the
non-offload software. For example, for RX, the software performs TC
first and then IPsec transformation, but the implementation for
offload does that in the opposite way.

To resolve the difference for now, either IPsec offload or TC offload,
not both, is allowed for a specific interface.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/8e2e5e3b0984d785066e8663aaf97b3ba1bb873f.1690802064.git.leon@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
include/linux/mlx5/driver.h