Skip to content

Commit 06827e2

Browse files
Binary-Eaterkuba-moo
authored andcommitted
net/mlx5e: Require mlx5 tc classifier action support for IPsec prio capability
Require mlx5 classifier action support when creating IPSec chains in offload path. MLX5_IPSEC_CAP_PRIO should only be set if CONFIG_MLX5_CLS_ACT is enabled. If CONFIG_MLX5_CLS_ACT=n and MLX5_IPSEC_CAP_PRIO is set, configuring IPsec offload will fail due to the mlxx5 ipsec chain rules failing to be created due to lack of classifier action support. Fixes: fa5aa2f ("net/mlx5e: Use chains for IPsec policy priority offload") Signed-off-by: Rahul Rameshbabu <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 572f9ca commit 06827e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ u32 mlx5_ipsec_device_caps(struct mlx5_core_dev *mdev)
5151
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, decap))
5252
caps |= MLX5_IPSEC_CAP_PACKET_OFFLOAD;
5353

54-
if ((MLX5_CAP_FLOWTABLE_NIC_TX(mdev, ignore_flow_level) &&
55-
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ignore_flow_level)) ||
56-
MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, ignore_flow_level))
54+
if (IS_ENABLED(CONFIG_MLX5_CLS_ACT) &&
55+
((MLX5_CAP_FLOWTABLE_NIC_TX(mdev, ignore_flow_level) &&
56+
MLX5_CAP_FLOWTABLE_NIC_RX(mdev, ignore_flow_level)) ||
57+
MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, ignore_flow_level)))
5758
caps |= MLX5_IPSEC_CAP_PRIO;
5859

5960
if (MLX5_CAP_FLOWTABLE_NIC_TX(mdev,

0 commit comments

Comments
 (0)