From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0E81C433E3 for ; Fri, 17 Jul 2020 20:18:44 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 51F0C20704 for ; Fri, 17 Jul 2020 20:18:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linuxonhyperv.com header.i=@linuxonhyperv.com header.b="gVQy8sYp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51F0C20704 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxonhyperv.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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) -- 2.25.1