From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: Re: [PATCH v2 23/29] net/i40e: use eal I/O device memory read/write API Date: Wed, 4 Jan 2017 20:52:27 +0530 Message-ID: <20170104152225.GA7871@santosh-Latitude-E5530-non-vPro> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-24-git-send-email-jerin.jacob@caviumnetworks.com> <20170104135339.GA56511@dpdk19> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Jerin Jacob , , , , , , , Helin Zhang , Jingjing Wu , Satha Rao To: Tiwei Bie Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0068.outbound.protection.outlook.com [104.47.38.68]) by dpdk.org (Postfix) with ESMTP id A184F2BB9 for ; Wed, 4 Jan 2017 16:23:00 +0100 (CET) Content-Disposition: inline In-Reply-To: <20170104135339.GA56511@dpdk19> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 04, 2017 at 09:53:40PM +0800, Tiwei Bie wrote: > On Tue, Dec 27, 2016 at 03:19:29PM +0530, Jerin Jacob wrote: > > From: Santosh Shukla > > /* Update the tx tail register */ > > rte_wmb(); > > - I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail); > > + I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, txq->tx_tail); > > > > return nb_pkts; > > } > > Besides i40e_xmit_pkts() and tx_xmit_pkts(), i40e_rx_alloc_bufs() which is > called by rx_recv_pkts() is also in the fast path. So I40E_PCI_REG_WRITE() > called by it should also be replaced by the relaxed version: > > diff --git i/drivers/net/i40e/i40e_rxtx.c w/drivers/net/i40e/i40e_rxtx.c > index 7ae7d9f..55a707a 100644 > --- i/drivers/net/i40e/i40e_rxtx.c > +++ w/drivers/net/i40e/i40e_rxtx.c > @@ -581,7 +581,7 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) > > /* Update rx tail regsiter */ > rte_wmb(); > - I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_free_trigger); > + I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rxq->rx_free_trigger); > > rxq->rx_free_trigger = > (uint16_t)(rxq->rx_free_trigger + rxq->rx_free_thresh); > Yes. Will queue it in v3. > > -- > > 2.5.5 > >