From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] i40e: prefetch next mbuf in rx alloc code Date: Fri, 10 Jul 2015 16:33:19 +0200 Message-ID: <2993772.ZMHUuAIlz7@xps13> References: <1433974765-136411-1-git-send-email-damarion@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Damjan Marion To: Helin Zhang Return-path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 10CE4C3A4 for ; Fri, 10 Jul 2015 16:34:35 +0200 (CEST) Received: by wifm2 with SMTP id m2so48253863wif.1 for ; Fri, 10 Jul 2015 07:34:35 -0700 (PDT) In-Reply-To: <1433974765-136411-1-git-send-email-damarion@cisco.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Helin, a comment? 2015-06-11 00:19, Damjan Marion: > This patch improves performance of vectored rx on i40e devices. > > Signed-off-by: Damjan Marion > --- > drivers/net/i40e/i40e_rxtx.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 2de0ac4..152e9e6 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -778,6 +778,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++) { > + > + /* Prefetch next mbuf */ > + if (i < (rxq->rx_free_thresh - 1)) > + rte_prefetch0 (rxep[i+1].mbuf); > + > mb = rxep[i].mbuf; > rte_mbuf_refcnt_set(mb, 1); > mb->next = NULL; >