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 6B5C3A051C; Tue, 11 Feb 2020 03:12:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD8244C87; Tue, 11 Feb 2020 03:12:31 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 26F6F4C74 for ; Tue, 11 Feb 2020 03:12:29 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 18:12:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,427,1574150400"; d="scan'208";a="221773038" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga007.jf.intel.com with ESMTP; 10 Feb 2020 18:12:25 -0800 Date: Tue, 11 Feb 2020 10:11:09 +0800 From: Ye Xiaolong To: Gavin Hu Cc: dev@dpdk.org, nd@arm.com, david.marchand@redhat.com, thomas@monjalon.net, rasland@mellanox.com, maxime.coquelin@redhat.com, tiwei.bie@intel.com, matan@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com, arybchenko@solarflare.com, stephen@networkplumber.org, hemant.agrawal@nxp.com, jerinj@marvell.com, pbhagavatula@marvell.com, Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com, joyce.kong@arm.com, steve.capper@arm.com Message-ID: <20200211021109.GH80720@intel.com> References: <1571758074-16445-1-git-send-email-gavin.hu@arm.com> <20200208134808.212027-1-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200208134808.212027-1-gavin.hu@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: relaxed barrier in the tx fastpath 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" Hi, Gavin Please help add the Fixes tag and cc stable. Thanks, Xiaolong On 02/08, Gavin Hu wrote: >To keep ordering of mixed accesses, rte_cio is sufficient. >The rte_io barrier is overkill.[1] > >[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9 >qf0Kpn89EMdGDajepKoZQ@mail.gmail.com > >Signed-off-by: Gavin Hu >--- >V3: >- optimize the barriers in the fast path only, leave as it is for the > barriers in the slow path and control path >- drop the virtio patches from the list as they are in the control path >- it makes more sense to relax the barrier in the fast path, at the PMD level. > relaxing the fundamental rte_io_x barriers APIs requires scrutinizations for > each PMDs which use the barriers directly or indirectly. >V2: >- remove virtio_pci_read/write64 APIs definitions, they are not needed and generate compiling errors like " error: unused function 'virtio_pci_write64' [-Werror,-Wunused-function]" >- update the reference link to kernel source code >--- > drivers/net/i40e/i40e_rxtx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c >index fd1ae80da..8c0f7cc67 100644 >--- a/drivers/net/i40e/i40e_rxtx.c >+++ b/drivers/net/i40e/i40e_rxtx.c >@@ -1248,7 +1248,8 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > (unsigned) txq->port_id, (unsigned) txq->queue_id, > (unsigned) tx_id, (unsigned) nb_tx); > >- I40E_PCI_REG_WRITE(txq->qtx_tail, tx_id); >+ rte_cio_wmb(); >+ I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id); > txq->tx_tail = tx_id; > > return nb_tx; >-- >2.17.1 >