From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; Thu, 25 Jun 2015 20:26:19 +0200 (CEST) Received: by pdbci14 with SMTP id ci14so58355800pdb.2 for ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2015 18:26:20 -0000 Add write memory barrier before writing tail pointer. Fixes c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") Signed-off-by: Eric Kinzie --- 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; -- 1.7.10.4