Message ID | 1435256741-25489-3-git-send-email-ehkinzie@gmail.com (mailing list archive) |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 2373EC6F8; Thu, 25 Jun 2015 20:26:22 +0200 (CEST) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id F0696C6E2 for <dev@dpdk.org>; Thu, 25 Jun 2015 20:26:19 +0200 (CEST) Received: by pdbci14 with SMTP id ci14so58355800pdb.2 for <dev@dpdk.org>; Thu, 25 Jun 2015 11:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DQ037s0GFQpw/ThuBmuVIuFvo8U9D3rsqHW5EEqxNME=; b=PPkf2mGJJSEGKJe02Y4vMUhWvYRUClCYWpAtssivRjUmu5DhYG39GtyzswIhyLAj8h 8Ydh34eGw+syYhpJoVw62OhbBtWmHHOienvjMBOgNG1XQy7xPbstXTzMv/6SLtSrCZLx 8apa0fcBRl+lSX0549Uxs/FtTD2HlyPBd3Hr5npspZInLTfxawClrv1bKTbrct3O6NO8 MxwV7hEmxolC1tmhRJIHzfHwqlOs6d1vaUvBlZgorMQT8LJSO89UxHIMsAqIHNdQVCAF g1HqG+YkhB+kjNHVDw7cedDr9z/qV/p+4+Ap54bnUQH6YfsARRlGoFZIVjiciEZaMPLe OPRQ== X-Received: by 10.70.36.139 with SMTP id q11mr94684233pdj.38.1435256779288; Thu, 25 Jun 2015 11:26:19 -0700 (PDT) Received: from buildhost2.vyatta.com. ([144.49.132.22]) by mx.google.com with ESMTPSA id j9sm30720876pbq.92.2015.06.25.11.26.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 11:26:18 -0700 (PDT) From: Eric Kinzie <ehkinzie@gmail.com> To: dev@dpdk.org Date: Thu, 25 Jun 2015 11:25:41 -0700 Message-Id: <1435256741-25489-3-git-send-email-ehkinzie@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1435256741-25489-1-git-send-email-ehkinzie@gmail.com> References: <1435256741-25489-1-git-send-email-ehkinzie@gmail.com> Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Eric Kinzie
June 25, 2015, 6:25 p.m. UTC
Add write memory barrier before writing tail pointer.
Fixes c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec.c | 3 +++
1 file changed, 3 insertions(+)
Comments
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/tx > > Add write memory barrier before writing tail pointer. > > Fixes c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") > > Signed-off-by: Eric Kinzie <ehkinzie@gmail.com> > --- > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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)); > > /* Update the tail pointer on the NIC */ > + rte_wmb(); > IXGBE_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); > } > > @@ -645,6 +646,8 @@ ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, > > txq->tx_tail = tx_id; > > + /* update tail pointer */ > + rte_wmb(); > IXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail); > > 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/ Though I didn't look at it closely yet. Konstantin > -- > 1.7.10.4
2015-06-29 11:28, Ananyev, Konstantin: > 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/tx > > > > Add write memory barrier before writing tail pointer. > > > > Fixes c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") > > > > Signed-off-by: Eric Kinzie <ehkinzie@gmail.com> > > --- > > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > 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)); > > > > /* Update the tail pointer on the NIC */ > > + rte_wmb(); > > IXGBE_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); > > } > > > > @@ -645,6 +646,8 @@ ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, > > > > txq->tx_tail = tx_id; > > > > + /* update tail pointer */ > > + rte_wmb(); > > IXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail); > > > > 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/ > Though I didn't look at it closely yet. It will be a good idea to re-open the topic of the cross-arch memory barriers at the beginning of the 2.2 cycle. Thanks
2015-08-03 17:08, Thomas Monjalon: > 2015-06-29 11:28, Ananyev, Konstantin: > > 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/ > > Though I didn't look at it closely yet. > > It will be a good idea to re-open the topic of the cross-arch memory barriers > at the beginning of the 2.2 cycle. > Thanks Any update on this topic? The patch is still "New" in patchwork.
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)); /* Update the tail pointer on the NIC */ + rte_wmb(); IXGBE_PCI_REG_WRITE(rxq->rdt_reg_addr, rx_id); } @@ -645,6 +646,8 @@ ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, txq->tx_tail = tx_id; + /* update tail pointer */ + rte_wmb(); IXGBE_PCI_REG_WRITE(txq->tdt_reg_addr, txq->tx_tail); return nb_pkts;