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 E5664A2EEB for ; Wed, 11 Sep 2019 11:32:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2E361E95E; Wed, 11 Sep 2019 11:32:48 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id ABA7C1DFE3; Wed, 11 Sep 2019 11:32:44 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 02:32:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="385643947" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.5]) by fmsmga006.fm.intel.com with ESMTP; 11 Sep 2019 02:32:42 -0700 Date: Wed, 11 Sep 2019 17:30:27 +0800 From: Ye Xiaolong To: Xiao Zhang Cc: dev@dpdk.org, wenzhuo.lu@intel.com, stable@dpdk.org Message-ID: <20190911093027.GB45267@intel.com> References: <1568137278-10066-1-git-send-email-xiao.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1568137278-10066-1-git-send-email-xiao.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [dpdk-dev] net/e1000: correct mb function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 09/11, Xiao Zhang wrote: >Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's >CIO memory. >Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with >E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more >clear. > >Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close") >Cc: stable@dpdk.org > >Signed-off-by: Xiao Zhang >--- > drivers/net/e1000/em_rxtx.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c >index 5925e49..49c5371 100644 >--- a/drivers/net/e1000/em_rxtx.c >+++ b/drivers/net/e1000/em_rxtx.c >@@ -2049,13 +2049,12 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev) > tx_desc->lower.data = rte_cpu_to_le_32(txd_lower | size); > tx_desc->upper.data = 0; > >- rte_wmb(); >+ rte_cio_wmb(); > txq->tx_tail++; > if (txq->tx_tail == txq->nb_tx_desc) > txq->tx_tail = 0; >- rte_io_wmb(); > tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(i)); >- E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail); >+ E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail); > usec_delay(250); > } > } >-- >2.7.4 > Reviewed-by: Xiaolong Ye Applied to dpdk-next-net-intel with Gavin's reviewed-by tag.