patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix missing thread safety flag for flow API
@ 2023-10-23 10:23 Dariusz Sosnowski
  2023-10-31  8:03 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2023-10-23 10:23 UTC (permalink / raw)
  To: Matan Azrad, Viacheslav Ovsiienko, Ori Kam, Suanming Mou; +Cc: dev, stable

When mlx5 port was configured with HW Steering flow engine
(devarg dv_flow_en set to 2), PMD did not set
RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE in device flags.
This caused certain flow API calls, such as rte_flow_query(),
to obtain a port-wide lock, which is not needed.

This patch adds missing code for setting this flag.

Fixes: d84c3cf7662c ("net/mlx5: introduce hardware steering enable routine")
Cc: suanmingm@nvidia.com
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index d5ef695e6d..1caece5405 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1643,6 +1643,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 					 "matching is disabled",
 				eth_dev->data->port_id);
 		}
+		eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 		return eth_dev;
 #else
 		DRV_LOG(ERR, "DV support is missing for HWS.");
-- 
2.25.1


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

* RE: [PATCH] net/mlx5: fix missing thread safety flag for flow API
  2023-10-23 10:23 [PATCH] net/mlx5: fix missing thread safety flag for flow API Dariusz Sosnowski
@ 2023-10-31  8:03 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2023-10-31  8:03 UTC (permalink / raw)
  To: Dariusz Sosnowski, Matan Azrad, Slava Ovsiienko, Ori Kam, Suanming Mou
  Cc: dev, stable

Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Sent: Monday, October 23, 2023 1:23 PM
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix missing thread safety flag for flow API
> 
> When mlx5 port was configured with HW Steering flow engine (devarg
> dv_flow_en set to 2), PMD did not set
> RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE in device flags.
> This caused certain flow API calls, such as rte_flow_query(), to obtain a port-
> wide lock, which is not needed.
> 
> This patch adds missing code for setting this flag.
> 
> Fixes: d84c3cf7662c ("net/mlx5: introduce hardware steering enable routine")
> Cc: suanmingm@nvidia.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Acked-by: Suanming Mou <suanmingm@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:[~2023-10-31  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 10:23 [PATCH] net/mlx5: fix missing thread safety flag for flow API Dariusz Sosnowski
2023-10-31  8:03 ` 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).