DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix using wrong group ID for action translation
@ 2025-03-03 13:49 Maayan Kashani
  2025-03-11  7:35 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Maayan Kashani @ 2025-03-03 13:49 UTC (permalink / raw)
  To: dev
  Cc: mkashani, dsosnowski, rasland, Bing Zhao, stable,
	Viacheslav Ovsiienko, Ori Kam, Suanming Mou, Matan Azrad

From: Bing Zhao <bingz@nvidia.com>

In HWS non-template API, the actual group ID is calculated in the
flow_hw_translate_flow_actions(). This would be set into the dummy
template table for the following usage.

Since __flow_hw_translate_actions_template() is also called for the
dummy action template and some fixed actions' translation. The actual
group ID is also needed to avoid the misuse of actions for 'root'
table. Only the 'group' in the attributes can be used in this
function. The actual group should be set explicitly before calling
it in the non-template API.

Fixes: 27d171b88031 ("net/mlx5: abstract flow action and enable reconfigure")
Cc: stable@dpdk.org

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 03cbf53f492..93e71192552 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -13825,6 +13825,7 @@ flow_hw_translate_flow_actions(struct rte_eth_dev *dev,
 	table->cfg.external = external;
 	table->nb_action_templates = 1;
 	memcpy(&table->cfg.attr.flow_attr, attr, sizeof(*attr));
+	table->cfg.attr.flow_attr.group = src_group;
 	table->ats[0].action_template = at;
 	ret = __flow_hw_translate_actions_template(dev, &table->cfg, hw_acts, at,
 						   &table->mpctx, true, error);
-- 
2.21.0


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

end of thread, other threads:[~2025-03-11  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-03 13:49 [PATCH] net/mlx5: fix using wrong group ID for action translation Maayan Kashani
2025-03-11  7:35 ` 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).