net/mlx5: fix external egress group translation
PATCH 1/1 net/mlx5: fix external egress group translation
Representor matching is always enabled on an E-Switch port, and the PMD reserves egress group 0 for the default SQ tagging rule. Removing repr_matching_en left the user group shift enabled only for extended metadata mode. With any other dv_xmeta_en value, an external egress group 0 rule is installed on the root table, where a jump to a non-root group matches but does not continue.
Shift every external egress group when the E-Switch is enabled. This restores the previous repr_matching_en=1 behavior.
Fixes c41f621786ff ("net/mlx5: remove representor matching devarg")
Signed-off-by Maayan Kashani <[email protected]>
--- drivers/net/mlx5/mlx5_flow_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
@@ -5591,7 +5591,6 @@ __translate_group(struct rte_eth_dev *dev, "group index not supported"); *table_group = group +1 ; }else if (config->dv_esw_en && - config->dv_xmeta_en ==MLX5_XMETA_MODE_META32_HWS && external && flow_attr->egress) {/*
@@ -5600,9 +5599,8 @@ __translate_group(struct rte_eth_dev *dev,* These flow rules are inserted in group 0 and this group is reserved by PMD * for these purposes. * -* As a result, if representor matching or extended metadata mode is enabled, -* group provided by the user must be incremented to avoid inserting flow rules -* in group 0. +* Representor matching is always enabled, so the group provided by the user +* must be incremented to avoid inserting flow rules in group 0. */ if (group >MLX5_HW_MAX_EGRESS_GROUP ) return rte_flow_error_set(error, EINVAL,
Signature · 1 line
2.25.1
Patch applied to next-net-mlx.
Thanks,
Raslan Darawsheh