net/mlx5: fix non-masked indirect list meter translation in flow rule
PATCH 1/1 net/mlx5: fix non-masked indirect list meter translation in flow rule
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.
--- drivers/net/mlx5/mlx5_flow_hw.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +3 -9
@@ -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);
Signature · 1 line
2.39.2
Hi,
Quoted 22 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Thursday, February 29, 2024 1:31 PM
To: [email protected]
Cc: Gregory Etelson <[email protected]>; Maayan Kashani <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]; Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow ruleTemplate 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.
Quoted 7 lines
Fixes e26f50adbf38 ("net/mlx5: support indirect list meter mark action")Signed-off-by Gregory Etelson <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh