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 3A0A2A046B; Thu, 30 Apr 2020 21:09:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FB231DBDD; Thu, 30 Apr 2020 21:09:12 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id CCBCA1DAED for ; Thu, 30 Apr 2020 21:09:06 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id v63so283503pfb.10 for ; Thu, 30 Apr 2020 12:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gM9D22B7a/TuqnZw8T9M6yRj21fpxqioBW632jm56kU=; b=lF5O3H0b/4EHmNskBpMt7fPufvDlV6XQ+NBOfBFBdTZ/u3OPK919tG2fnoOL0pSZi7 pNACZGfzkq7zECRgzVwBXPvNpO8DtaKb6iKLXFP3MIItxsg5sJZhBhUZiV96AWiY701u GfvlCNeJpBbfsR2NMY52cMWsULVfEMZDdeE5BNN5rEusD4XqAhFu1X4hZ9JN3PrLPwnT 45dI4qEUaAkCFldey7Re4le/mSCtRooKVhVPpK/a73VIcnid9fJALfxd+NQcGNWCGL8U fthc3MGJ0WDMaraa9ZH/37VxA8K8BAPUYYDqHb25Emk1CQuYOKkQQ5jBJtfEW20W5QTn 4YEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gM9D22B7a/TuqnZw8T9M6yRj21fpxqioBW632jm56kU=; b=Zn3SEvOpIqsjRg8IzUva5YzHYI9wsh1X1MuYNop4cDFn6M0rzgFDenwS/lWsc2oSlb t8fuXLeR06QzvaKrEHo5gvWgiQ3tNuArTEoEGjCY8y1lsVynNWLcw6Swb3hKscYKaQ+N 3ndMhWpxmTQwlGHpAaU+R/wHYQAr9rmGehSd16rkIej9guywmUuTIcVZVLuWTJet9cfe zvx2adaNBwcKWY7+9Nr36OtxdFQF8kTpZeFcIkhBCct3woEtanx1I9N6dCXcKzXQ2hce 1gxyKdDV6pZfuOauVfjCiAf3cXnPgDWhaQJd5IfJjKh7zweDjR2y9PC2b74BektCXLuK VgJQ== X-Gm-Message-State: AGi0PuaD7by0ieo43Q9xlfTBeAlKXBUk+fTJVdv3S+H6VAqIMZz6V9qX l5JnT9wdZIsA1Gup4DnUbQ/heoesTEsm2g== X-Google-Smtp-Source: APiQypIR2bSGOb258lGMZKVnmiYi6VxsEeTf47P50n9prbY2gyQDm45WpU2h3LSQjn5BUsauLioARQ== X-Received: by 2002:a63:d16:: with SMTP id c22mr444893pgl.34.1588273745636; Thu, 30 Apr 2020 12:09:05 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id fy21sm452075pjb.25.2020.04.30.12.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 12:09:04 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 30 Apr 2020 12:08:49 -0700 Message-Id: <20200430190853.498-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430190853.498-1-stephen@networkplumber.org> References: <20200430190853.498-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 3/7] net/vmbus: add missing barrier 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 check for event ring being empty needs a barrier to avoid any over agressive optimization. This is same barrier as Linux kernel. Signed-off-by: Stephen Hemminger --- drivers/bus/vmbus/vmbus_channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c index 46b3ba3f9f9e..ff2985c25758 100644 --- a/drivers/bus/vmbus/vmbus_channel.c +++ b/drivers/bus/vmbus/vmbus_channel.c @@ -199,6 +199,7 @@ bool rte_vmbus_chan_rx_empty(const struct vmbus_channel *channel) { const struct vmbus_br *br = &channel->rxbr; + rte_smp_rmb(); return br->vbr->rindex == br->vbr->windex; } -- 2.20.1