From patchwork Fri Jul 17 20:18:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 74398 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18BABA0528; Fri, 17 Jul 2020 22:18:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 192BF1BED7; Fri, 17 Jul 2020 22:18:43 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by dpdk.org (Postfix) with ESMTP id CCCB91BED5 for ; Fri, 17 Jul 2020 22:18:40 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id C026D20B4909; Fri, 17 Jul 2020 13:18:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C026D20B4909 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1595017119; bh=gRBlVen3ZpSdesWEGVoXuCaPV+1kcRb6yEyJq7/pq+s=; h=From:To:Cc:Subject:Date:From; b=gVQy8sYpLAo0FzekJvkYy/pgtmc5eV8MADY4mBnYNXKVZ/5zbbFLWcbwe2c51iuVo /QyJf9IXL/LiGAGadPDd7vV+6yJoXTaTPSvwR8o6gx/sk6Vk7JiUZaLvnDQ92HITlm r3lZqWtMzxsszXQHktaARkrc8GuUw80mUW7Yg3RQ= From: Long Li To: Stephen Hemminger Cc: dev@dpdk.org, Long Li Date: Fri, 17 Jul 2020 13:18:29 -0700 Message-Id: <1595017109-22952-1-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] bus/vmbus: use SMP memory barrier for signaling read 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" From: Long Li rte_smp_mb() uses the same locked ADD as the in-kernel vmbus driver, and it has slightly performance improvement over rte_mb(). Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c index aaa801d88..c60470332 100644 --- a/drivers/bus/vmbus/vmbus_channel.c +++ b/drivers/bus/vmbus/vmbus_channel.c @@ -214,7 +214,7 @@ void rte_vmbus_chan_signal_read(struct vmbus_channel *chan, uint32_t bytes_read) return; /* Make sure reading of pending happens after new read index */ - rte_mb(); + rte_smp_mb(); pending_sz = rbr->vbr->pending_send; if (!pending_sz)