From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Matan Azrad <matan@nvidia.com>,
Viacheslav 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
Date: Mon, 23 Oct 2023 13:23:02 +0300 [thread overview]
Message-ID: <20231023102303.1443105-1-dsosnowski@nvidia.com> (raw)
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
next reply other threads:[~2023-10-23 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 10:23 Dariusz Sosnowski [this message]
2023-10-31 8:03 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231023102303.1443105-1-dsosnowski@nvidia.com \
--to=dsosnowski@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).