From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1C347C41A for ; Mon, 29 Jun 2015 13:30:01 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 29 Jun 2015 04:29:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,698,1427785200"; d="scan'208";a="755060161" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga002.jf.intel.com with ESMTP; 29 Jun 2015 04:29:44 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.245]) by IRSMSX102.ger.corp.intel.com ([169.254.2.117]) with mapi id 14.03.0224.002; Mon, 29 Jun 2015 12:28:43 +0100 From: "Ananyev, Konstantin" To: Eric Kinzie , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/2] ixgbe: add memory barriers in vector rx/tx Thread-Index: AQHQr3SIiezbo6axCE6yC9tdZd6YtJ3DWz8Q Date: Mon, 29 Jun 2015 11:28:42 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836A1F275@irsmsx105.ger.corp.intel.com> References: <1435256741-25489-1-git-send-email-ehkinzie@gmail.com> <1435256741-25489-3-git-send-email-ehkinzie@gmail.com> In-Reply-To: <1435256741-25489-3-git-send-email-ehkinzie@gmail.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] ixgbe: add memory barriers in vector rx/tx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 11:30:02 -0000 Hi Eric, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Eric Kinzie > Sent: Thursday, June 25, 2015 7:26 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 2/2] ixgbe: add memory barriers in vector rx/t= x >=20 > Add write memory barrier before writing tail pointer. >=20 > Fixes c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") >=20 > Signed-off-by: Eric Kinzie > --- > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe= _rxtx_vec.c > index abd10f6..b601de8 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c > @@ -123,6 +123,7 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) > (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1)); >=20 > /* Update the tail pointer on the NIC */ > + rte_wmb(); > IXGBE_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); > } >=20 > @@ -645,6 +646,8 @@ ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf *= *tx_pkts, >=20 > txq->tx_tail =3D tx_id; >=20 > + /* update tail pointer */ > + rte_wmb(); > IXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail); >=20 > return nb_pkts; There were several discussions about that subject already: why fence is not necessary here for IA and why we don't want to put it here= : That I suppose was the last one: http://dpdk.org/ml/archives/dev/2015-April/016463.html As I can see, Dong already submitted patches for that: http://dpdk.org/dev/patchwork/patch/5884/=20 Though I didn't look at it closely yet. Konstantin > -- > 1.7.10.4