From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16DE4A0561; Thu, 18 Mar 2021 08:19:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91486140EC3; Thu, 18 Mar 2021 08:18:57 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 97BF5140EAC for ; Thu, 18 Mar 2021 08:18:56 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16E9C11D4; Thu, 18 Mar 2021 00:18:56 -0700 (PDT) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.125]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EF8133F718; Thu, 18 Mar 2021 00:18:53 -0700 (PDT) From: Feifei Wang To: Matan Azrad , Shahaf Shuler Cc: dev@dpdk.org, nd@arm.com, Feifei Wang , Ruifeng Wang Date: Thu, 18 Mar 2021 15:18:38 +0800 Message-Id: <20210318071840.359957-3-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210318071840.359957-1-feifei.wang2@arm.com> References: <20210318071840.359957-1-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1 2/4] net/mlx4: replace SMP barrier with C11 barriers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Replace SMP barrier with atomic thread fence. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- drivers/net/mlx4/mlx4_mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c index cfd7d4a9c..503e8a7bb 100644 --- a/drivers/net/mlx4/mlx4_mr.c +++ b/drivers/net/mlx4/mlx4_mr.c @@ -951,11 +951,11 @@ mlx4_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len) priv->mr.dev_gen); /* Flush local caches by propagating invalidation across cores. - * rte_smp_wmb is to keep the order that dev_gen updated before + * release-fence is to keep the order that dev_gen updated before * rebuilding global cache. Therefore, other core can flush their * local cache on time. */ - rte_smp_wmb(); + rte_atomic_thread_fence(__ATOMIC_RELEASE); mr_rebuild_dev_cache(dev); } rte_rwlock_write_unlock(&priv->mr.rwlock); -- 2.25.1