net/sfc: rely on native thread safety in flow mechanism
authorIvan Malov <ivan.malov@oktetlabs.ru>
Mon, 16 Nov 2020 19:40:29 +0000 (22:40 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:04 +0000 (21:10 +0100)
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>
doc/guides/nics/sfc_efx.rst
doc/guides/rel_notes/release_20_11.rst
drivers/net/sfc/sfc_ethdev.c

index 962e543..f5e9f94 100644 (file)
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index 24cedba..4e8d13f 100644 (file)
@@ -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 flow API native thread safety
 
 * **Added Wangxun txgbe PMD.**
 
index db81e70..93fc7ba 100644 (file)
@@ -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)