DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism
@ 2020-11-16 19:40 Ivan Malov
  2020-11-17  7:38 ` Andrew Rybchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Malov @ 2020-11-16 19:40 UTC (permalink / raw)
  To: dev
  Cc: Andrew Rybchenko, Thomas Monjalon, Ori Kam, Matan Azrad, Ajit Khaparde

The changeset that introduced common flow API thread safety
in fact introduced double locking to this particular PMD as
RTE flow API implementation in the PMD has been thread-safe
since the day zero. State this by setting the corresponding
device flag to skip locking imposed by generic RTE flow API.

Fixes: 80d1a9aff7f6 ("ethdev: make flow API thread safe")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 doc/guides/nics/sfc_efx.rst            | 2 ++
 doc/guides/rel_notes/release_20_11.rst | 1 +
 drivers/net/sfc/sfc_ethdev.c           | 1 +
 3 files changed, 4 insertions(+)

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index 962e54389..f5e9f9495 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -246,6 +246,8 @@ Validating flow rules depends on the firmware variant.
 
 The :ref:`flow_isolated_mode` is supported.
 
+The implementation is natively thread-safe.
+
 Ethernet destination individual/group match
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 24cedba16..1c262d39a 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -220,6 +220,7 @@ New Features
   * Added Alveo SN1000 SmartNICs (EF100 architecture) support including
     flow API transfer rules for switch HW offload
   * Added ARMv8 support
+  * Claimed RTE flow API native thread safety
 
 * **Added Wangxun txgbe PMD.**
 
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index db81e705f..93fc7baa0 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2198,6 +2198,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	/* Copy PCI device info to the dev->data */
 	rte_eth_copy_pci_info(dev, pci_dev);
 	dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+	dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 
 	rc = sfc_kvargs_parse(sa);
 	if (rc != 0)
-- 
2.20.1


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

* Re: [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism
  2020-11-16 19:40 [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism Ivan Malov
@ 2020-11-17  7:38 ` Andrew Rybchenko
  2020-11-17 14:12   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2020-11-17  7:38 UTC (permalink / raw)
  To: Ivan Malov, dev; +Cc: Thomas Monjalon, Ori Kam, Matan Azrad, Ajit Khaparde

On 11/16/20 10:40 PM, Ivan Malov wrote:
> The changeset that introduced common flow API thread safety
> in fact introduced double locking to this particular PMD as
> RTE flow API implementation in the PMD has been thread-safe
> since the day zero. State this by setting the corresponding
> device flag to skip locking imposed by generic RTE flow API.
> 
> Fixes: 80d1a9aff7f6 ("ethdev: make flow API thread safe")
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>


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

* Re: [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism
  2020-11-17  7:38 ` Andrew Rybchenko
@ 2020-11-17 14:12   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-11-17 14:12 UTC (permalink / raw)
  To: Andrew Rybchenko, Ivan Malov, dev
  Cc: Thomas Monjalon, Ori Kam, Matan Azrad, Ajit Khaparde

On 11/17/2020 7:38 AM, Andrew Rybchenko wrote:
> On 11/16/20 10:40 PM, Ivan Malov wrote:
>> The changeset that introduced common flow API thread safety
>> in fact introduced double locking to this particular PMD as
>> RTE flow API implementation in the PMD has been thread-safe
>> since the day zero. State this by setting the corresponding
>> device flag to skip locking imposed by generic RTE flow API.
>>
>> Fixes: 80d1a9aff7f6 ("ethdev: make flow API thread safe")
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> 

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2020-11-17 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 19:40 [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism Ivan Malov
2020-11-17  7:38 ` Andrew Rybchenko
2020-11-17 14:12   ` Ferruh Yigit

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git