public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix flow mark reading after reconfigure
@ 2026-02-11  8:12 Dariusz Sosnowski
  2026-02-24 11:40 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2026-02-11  8:12 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
	Matan Azrad
  Cc: dev, stable

mlx5 PMD supports flow mark action which attaches additional
metadata to received packets. This metadata is stored
in the rte_mbuf in hash.fdir.hi field and applications
are notified about it with RTE_MBUF_F_RX_FDIR mbuf flag.

When working with HW Steering flow engine,
mlx5 PMD reads the HW completion entry field with flow mark value
if and only if at least one template table with flow mark action
was created.
Whenever table was created mlx5 PMD updated the private
data of each Rx queue to inform
Rx burst function to read HW field.

Whenever application reconfigures any of the Rx queues
through additional call to rte_eth_rx_queue_setup(),
this private Rx queue data is reset, but information
about existence of flow mark was not restored by PMD.
As a result, reconfiguration caused applications
to not receive flow mark metadata.

This patch fixes that behavior. Whenever port is started,
PMD will check if flow mark action is used and update
relevant private Rx queue data struct.

Fixes: 1deadfd709f5 ("net/mlx5: add HW mark action")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 0821c93a9a..5add0c4a2b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1898,6 +1898,7 @@ mlx5_flow_rxq_dynf_set(struct rte_eth_dev *dev)
 				data->flow_meta_port_mask = priv->sh->dv_meta_mask;
 			}
 		}
+		data->mark = !!priv->mark_enabled;
 		data->mark_flag = mark_flag;
 	}
 }
-- 
2.47.3


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

end of thread, other threads:[~2026-02-24 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11  8:12 [PATCH] net/mlx5: fix flow mark reading after reconfigure Dariusz Sosnowski
2026-02-24 11:40 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox