Skip to contentSkip to conversation

net/mlx5: fix suffix groups without default FDB rule

PATCH In review Rongwei Liu 2 participants 2 messages Oct 16 – Oct 26 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix suffix groups without default FDB rule

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]>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_flow.c +2 -2
index b0eac185b5..37654918b5 100644
@@ -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);
Signature · 1 line
2.53.0