DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule
@ 2024-02-29 11:31 Gregory Etelson
  2024-03-12  8:00 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Gregory Etelson @ 2024-02-29 11:31 UTC (permalink / raw)
  To: dev
  Cc: getelson, mkashani, rasland, stable, Dariusz Sosnowski,
	Viacheslav Ovsiienko, Ori Kam, Suanming Mou, Matan Azrad

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@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule
  2024-02-29 11:31 [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule Gregory Etelson
@ 2024-03-12  8:00 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2024-03-12  8:00 UTC (permalink / raw)
  To: Gregory Etelson, dev
  Cc: Maayan Kashani, stable, Dariusz Sosnowski, Slava Ovsiienko,
	Ori Kam, Suanming Mou, Matan Azrad

Hi,

> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Thursday, February 29, 2024 1:31 PM
> To: dev@dpdk.org
> Cc: Gregory Etelson <getelson@nvidia.com>; Maayan Kashani
> <mkashani@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Dariusz Sosnowski <dsosnowski@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>;
> Suanming Mou <suanmingm@nvidia.com>; Matan Azrad
> <matan@nvidia.com>
> Subject: [PATCH] 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.
> 
> Fixes: e26f50adbf38 ("net/mlx5: support indirect list meter mark action")
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-12  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 11:31 [PATCH] net/mlx5: fix non-masked indirect list meter translation in flow rule Gregory Etelson
2024-03-12  8:00 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).