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 B2845A056A; Fri, 6 Mar 2020 10:11:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AFA991BFE1; Fri, 6 Mar 2020 10:11:36 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 187D61BFD2; Fri, 6 Mar 2020 10:11:35 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id w9so1357247iob.12; Fri, 06 Mar 2020 01:11:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KwF6xIMpajD2/BxHYyeavBTEWcMkrGU8wx6n9buLCRY=; b=amRXgzEeDdtLV5AoP2VI3goP362c9SIKoqOmLR4Y55myCXzwC3I01ppIeNdNwp4Qr8 AYMrQ7g1xcdmmMKk+9KS7Sj7ZEM2nQdfK/dKDeorQEjniy74WjoyaTMgcemRj7yJtCxG tsnTU1Xpmo14EowANkdt/GTzYTXibfOT8AGFN6lNESsKeuAzeu0wfgbrXyxco+mhTlgC XzjSEgRKUDniDtBcrO4AZEOz7fUW7vBvMxSLV+GUo7zH2YC3zU1NSOAUOti0R5oCLFmC GlcelBrbm3LcUXpHoVba5SWsIv84R2MdzoBaTINL2hgdsiiIDNHjwN38YObxz83ojKvH Qd+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KwF6xIMpajD2/BxHYyeavBTEWcMkrGU8wx6n9buLCRY=; b=HXWqFzBK09ApfYdSZZ3pHk3uLc8746FEVyH0MIthEkD+vHu1vSyaRCpfHJsvMlkOyD 0V0CP995exsvpnD7lWa+8Y7a4aROq2PifW1q3FusgXWawXhx8A3nnN9BfDL2DQA0WA4e WOa0AmO0huFl7UK9v3Vvn5BHWsLOPY4Qlv2i1ahOrtG9w4wGmKXkF64Swy8tPIVy7ow5 q6/XREziWPTc7RRcuQz9QmjBJNTq+FCNSSfv5KyxdGWoSQIFuXutBN8/7Y8DRWiwFZ0R xRFAPltpeugpJU3dX1gfkRk+vgAAr6la0AoKUS83HMNdj/dhq2ZsMEICGkq0idMq0MkG DnJg== X-Gm-Message-State: ANhLgQ33FyybXo+251mANkW3Tc1G86uqKA8LCNVB43bp57ZRRxsef/gH 2x/e/LTpJXyMUx44EMPzTUM9zxcSJvqloZ9M/jE= X-Google-Smtp-Source: ADFU+vue7Rb8RkjQDzegk2xrrsJ81cTh7VR1XKgqx/HelKzvkWhqVJzsTDuMBeNFuNCIYBFR8XuxYKS50G/XEd7VWuA= X-Received: by 2002:a6b:4f09:: with SMTP id d9mr2173368iob.94.1583485894275; Fri, 06 Mar 2020 01:11:34 -0800 (PST) MIME-Version: 1.0 References: <20200306050427.66114-1-gavin.hu@arm.com> <20200306050427.66114-2-gavin.hu@arm.com> In-Reply-To: <20200306050427.66114-2-gavin.hu@arm.com> From: Jerin Jacob Date: Fri, 6 Mar 2020 14:41:18 +0530 Message-ID: To: Gavin Hu Cc: dpdk-dev , nd , David Marchand , Thomas Monjalon , Jerin Jacob , "Ye, Xiaolong" , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" , Phil Yang , Joyce Kong , Steve Capper , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v1 1/3] net/i40e: relax barrier in the Tx fastpath of vPMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 Fri, Mar 6, 2020 at 10:35 AM Gavin Hu wrote: > > To keep ordering of mixed accesses, rte_cio is sufficient. > The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1] > > This patch fixes by replacing with just sufficient barriers in the > normal PMD and vPMD. > > It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP. > The test case is the RFC2544 zero-loss test running testpmd. > > [1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9 > qf0Kpn89EMdGDajepKoZQ@mail.gmail.com > > Fixes: 4861cde46116 ("i40e: new poll mode driver") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu Acked-by: Jerin Jacob > --- > drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c > index deb185fe2..4376d8911 100644 > --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c > +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c > @@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq) > rx_id = (uint16_t)((rxq->rxrearm_start == 0) ? > (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1)); > > + rte_cio_wmb(); > /* Update the tail pointer on the NIC */ > - I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id); > + I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id); > } > > static inline void > @@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts, > > txq->tx_tail = tx_id; > > - I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail); > + rte_cio_wmb(); > + I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id); > > return nb_pkts; > } > -- > 2.17.1 >