From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <helin.zhang@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 89E48C3D2
 for <dev@dpdk.org>; Fri, 10 Jul 2015 18:18:58 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga101.fm.intel.com with ESMTP; 10 Jul 2015 09:18:57 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.15,447,1432623600"; d="scan'208";a="726526272"
Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80])
 by orsmga001.jf.intel.com with ESMTP; 10 Jul 2015 09:18:57 -0700
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS)
 id 14.3.224.2; Sat, 11 Jul 2015 00:18:55 +0800
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0224.002;
 Sat, 11 Jul 2015 00:18:54 +0800
From: "Zhang, Helin" <helin.zhang@intel.com>
To: Damjan Marion <damarion@cisco.com>
Thread-Topic: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code
Thread-Index: AQHQo8uj+/12byNmikycjhZNeTuam53VEBcA
Date: Fri, 10 Jul 2015 16:18:54 +0000
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A891BBB@SHSMSX104.ccr.corp.intel.com>
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" <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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Jul 2015 16:18:59 -0000



> -----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.
>=20
> Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Helin Zhang <helin.zhang@intel.com> with minor change requests.

1. commit log should be reworded.
2. likely should be added to the newly added if() line.
3. checkpatch.pl should be used to have a check.

> ---
>  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))
> +			rte_prefetch0 (rxep[i+1].mbuf);
> +
>  		mb =3D rxep[i].mbuf;
>  		rte_mbuf_refcnt_set(mb, 1);
>  		mb->next =3D NULL;
> --
> 2.1.4