With fdb_def_rule_en=0, mlx5 SWS still decrements meter and sampler
suffix groups, causing continuation rules to be installed in the
wrong tables.
Decrement these groups only when the default FDB rule is active,
keeping suffix placement consistent with group-to-table translation.
Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Cc: Dariusz Sosnowski <[email protected]>
Cc: [email protected]
Signed-off-by: Rongwei Liu <[email protected]>
Acked-by: Dariusz Sosnowski <[email protected]>
---
drivers/net/mlx5/mlx5_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b0eac185b5..37654918b5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7048,7 +7048,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
goto exit;
}
/* Setting the sfx group atrr. */
- sfx_attr.group = sfx_attr.transfer ?
+ sfx_attr.group = (sfx_attr.transfer && priv->fdb_def_rule) ?
(MLX5_FLOW_TABLE_LEVEL_METER - 1) :
MLX5_FLOW_TABLE_LEVEL_METER;
flow_split_info->prefix_layers =
@@ -7229,7 +7229,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
sfx_tbl_data = container_of(sfx_tbl,
struct mlx5_flow_tbl_data_entry,
tbl);
- sfx_attr.group = sfx_attr.transfer ?
+ sfx_attr.group = (sfx_attr.transfer &&
priv->fdb_def_rule) ?
(sfx_tbl_data->level - 1) : sfx_tbl_data->level;
} else {
MLX5_ASSERT(attr->transfer);
--
2.53.0