[PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule
Gregory Etelson
getelson at nvidia.com
Thu Feb 29 12:31:19 CET 2024
Template table reuses DR5 action handle for non-masked indirect
actions. Flow rule must explicitly translate non-masked indirect
action and update DR5 handle with the rule indirect object.
Current PMD assumed DR5 handle of non-masked indirect action was
always NULL before the action translation.
The patch always translates non-masked indirect list meter object.
Fixes: e26f50adbf38 ("net/mlx5: support indirect list meter mark action")
Cc: stable at dpdk.org
Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 9620b7f576..9833654aac 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -1702,15 +1702,9 @@ flow_hw_translate_indirect_meter(struct rte_eth_dev *dev,
const struct rte_flow_indirect_update_flow_meter_mark **flow_conf =
(typeof(flow_conf))action_conf->conf;
- /*
- * Masked indirect handle set dr5 action during template table
- * translation.
- */
- if (!dr_rule->action) {
- ret = flow_dr_set_meter(priv, dr_rule, action_conf);
- if (ret)
- return ret;
- }
+ ret = flow_dr_set_meter(priv, dr_rule, action_conf);
+ if (ret)
+ return ret;
if (!act_data->shared_meter.conf_masked) {
if (flow_conf && flow_conf[0] && flow_conf[0]->init_color < RTE_COLORS)
flow_dr_mtr_flow_color(dr_rule, flow_conf[0]->init_color);
--
2.39.2
More information about the stable
mailing list