From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 33BA7A04DD; Mon, 16 Nov 2020 20:41:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 191C4F90; Mon, 16 Nov 2020 20:41:06 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id 7543AF12 for ; Mon, 16 Nov 2020 20:41:03 +0100 (CET) Received: from localhost.localdomain (unknown [188.242.7.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id F0DF57F4F3; Mon, 16 Nov 2020 22:41:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru F0DF57F4F3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1605555662; bh=XhcO6HolrEZEfqBGuqT05ravu6Z4r7u2JjjOvRj04Ls=; h=From:To:Cc:Subject:Date; b=FmtMJCg1FQuK3IztVF6F6pDha9Lsnhs47dhsRqnvV+L34e+MmpjJNI/lg2ILE5EuF fyvW3yy0PAh+mtUHzjdeI7mJxVvjHeM9NFH6MrwjQlW9mTD+cM2OrQPai7s3Q2/oCz GOf0v9NPxr575qugIP3/+K5WuTBuhQh0gQaSh3iw= From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko , Thomas Monjalon , Ori Kam , Matan Azrad , Ajit Khaparde Date: Mon, 16 Nov 2020 22:40:29 +0300 Message-Id: <20201116194029.15646-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/sfc: rely on native thread safety in RTE flow mechanism X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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