From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 984AC8E66 for ; Wed, 14 Sep 2016 15:25:03 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 14 Sep 2016 06:25:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,334,1470726000"; d="scan'208";a="168063262" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.117]) ([10.237.220.117]) by fmsmga004.fm.intel.com with ESMTP; 14 Sep 2016 06:25:00 -0700 To: Vladyslav Buslov , "Zhang, Helin" , "Wu, Jingjing" References: <20160714172719.17502-1-vladyslav.buslov@harmonicinc.com> <20160714172719.17502-2-vladyslav.buslov@harmonicinc.com> Cc: "dev@dpdk.org" From: Ferruh Yigit Message-ID: <18156776-3658-a97d-3fbc-19c1a820a04d@intel.com> Date: Wed, 14 Sep 2016 14:24:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160714172719.17502-2-vladyslav.buslov@harmonicinc.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/i40e: add additional prefetch instructions for bulk rx 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: Wed, 14 Sep 2016 13:25:04 -0000 On 7/14/2016 6:27 PM, Vladyslav Buslov wrote: > Added prefetch of first packet payload cacheline in i40e_rx_scan_hw_ring > Added prefetch of second mbuf cacheline in i40e_rx_alloc_bufs > > Signed-off-by: Vladyslav Buslov > --- > drivers/net/i40e/i40e_rxtx.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index d3cfb98..e493fb4 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -1003,6 +1003,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq) > /* Translate descriptor info to mbuf parameters */ > for (j = 0; j < nb_dd; j++) { > mb = rxep[j].mbuf; > + rte_prefetch0(RTE_PTR_ADD(mb->buf_addr, RTE_PKTMBUF_HEADROOM)); > qword1 = rte_le_to_cpu_64(\ > rxdp[j].wb.qword1.status_error_len); > pkt_len = ((qword1 & I40E_RXD_QW1_LENGTH_PBUF_MASK) >> > @@ -1086,9 +1087,11 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) > > rxdp = &rxq->rx_ring[alloc_idx]; > for (i = 0; i < rxq->rx_free_thresh; i++) { > - if (likely(i < (rxq->rx_free_thresh - 1))) > + if (likely(i < (rxq->rx_free_thresh - 1))) { > /* Prefetch next mbuf */ > - rte_prefetch0(rxep[i + 1].mbuf); > + rte_prefetch0(&rxep[i + 1].mbuf->cacheline0); > + rte_prefetch0(&rxep[i + 1].mbuf->cacheline1); > + } > > mb = rxep[i].mbuf; > rte_mbuf_refcnt_set(mb, 1); > -- > 2.8.3 > i40e maintainers, can you please review the patch? Thanks, ferruh