From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 7B2B6C398 for ; Fri, 10 Jul 2015 17:24:05 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 10 Jul 2015 08:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,447,1432623600"; d="scan'208";a="762005633" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga002.jf.intel.com with ESMTP; 10 Jul 2015 08:24:03 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.224.2; Fri, 10 Jul 2015 23:24:01 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Fri, 10 Jul 2015 23:24:00 +0800 From: "Zhang, Helin" To: Damjan Marion Thread-Topic: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code Thread-Index: AQHQo8uj+/12byNmikycjhZNeTuam53VACUA Date: Fri, 10 Jul 2015 15:24:00 +0000 Message-ID: References: <1433974765-136411-1-git-send-email-damarion@cisco.com> In-Reply-To: <1433974765-136411-1-git-send-email-damarion@cisco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code 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: Fri, 10 Jul 2015 15:24:06 -0000 Hi Marion > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Damjan Marion > Sent: Wednesday, June 10, 2015 3:19 PM > To: dev@dpdk.org > Cc: Damjan Marion > Subject: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code >=20 > This patch improves performance of vectored rx on i40e devices. It seems this is not a vectored i40e driver, but it is a good idea. Please reword the commit logs! >=20 > Signed-off-by: Damjan Marion > --- > drivers/net/i40e/i40e_rxtx.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > 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) >=20 > rxdp =3D &rxq->rx_ring[alloc_idx]; > for (i =3D 0; i < rxq->rx_free_thresh; i++) { > + > + /* Prefetch next mbuf */ > + if (i < (rxq->rx_free_thresh - 1)) It would be better to add a 'likely' in above line. > + rte_prefetch0 (rxep[i+1].mbuf); Have you checked with checkpatch.pl? I guess there might be a warning/error there for above line. There shouldn't be a space between 'rte_prefetch0' and '('. Thanks, Helin > + > mb =3D rxep[i].mbuf; > rte_mbuf_refcnt_set(mb, 1); > mb->next =3D NULL; > -- > 2.1.4