From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 081F2C31A for ; Fri, 5 Feb 2016 16:15:58 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 05 Feb 2016 07:15:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,401,1449561600"; d="scan'208";a="741162458" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga003.jf.intel.com with ESMTP; 05 Feb 2016 07:15:57 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.237]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0248.002; Fri, 5 Feb 2016 15:15:15 +0000 From: "Ananyev, Konstantin" To: "Pattan, Reshma" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thread-Index: AQHRYCVYDGUmOEp2uEqs3il22R8SI58djaMAgAAAhdA= Date: Fri, 5 Feb 2016 15:15:14 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B0465D@irsmsx105.ger.corp.intel.com> References: <1454684049-27195-1-git-send-email-thomas.monjalon@6wind.com> <1454684049-27195-2-git-send-email-thomas.monjalon@6wind.com> <3AEA2BF9852C6F48A459DA490692831FFBEB4C@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831FFBEB4C@IRSMSX109.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] 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 1/3] examples/distributor: fix build for non-x86 arch 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, 05 Feb 2016 15:15:59 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pattan, Reshma > Sent: Friday, February 05, 2016 3:08 PM > To: Thomas Monjalon > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for n= on-x86 arch >=20 > Hi Thomas, >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Friday, February 5, 2016 2:54 PM > > To: Richardson, Bruce; Horton, Remy > > Cc: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non= -x86 arch > > > > _mm_prefetch is defined only in x86 compilers. > > rte_prefetch functions are defined in EAL for each arch, and must be pr= eferred > > over compiler intrinsics. > > > > Fixes: 07db4a975094 ("examples/distributor: new sample app") > > > > Signed-off-by: Thomas Monjalon > > --- > > examples/distributor/main.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/examples/distributor/main.c b/examples/distributor/main.c = index > > 4e74f8f..87344ac 100644 > > --- a/examples/distributor/main.c > > +++ b/examples/distributor/main.c > > @@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r) > > > > /* for traffic we receive, queue it up for transmit */ > > uint16_t i; > > - _mm_prefetch((void *)bufs[0], 0); > > - _mm_prefetch((void *)bufs[1], 0); > > - _mm_prefetch((void *)bufs[2], 0); > > + rte_prefetch0((void *)bufs[0]); > > + rte_prefetch0((void *)bufs[1]); > > + rte_prefetch0((void *)bufs[2]); >=20 > Some time back Jerin Jacob has sent patch for replacing the _mm_prefetch = with rte_prefetch_non_temporal. This is FYI. Yep: http://dpdk.org/dev/patchwork/patch/9369/ http://dpdk.org/dev/patchwork/patch/9370/ And on IA _mm_prefetch(p, 0) !=3D rte_prefetch0(p). I think, as in Jacob implementation, it should be PREFETCHNTA. Konstantin >=20 > Thanks, > Reshma >=20 > > for (i =3D 0; i < nb_rx; i++) { > > struct output_buffer *outbuf; > > uint8_t outp; > > - _mm_prefetch((void *)bufs[i + 3], 0); > > + rte_prefetch0((void *)bufs[i + 3]); > > /* > > * workers should update in_port to hold the > > * output port value > > -- > > 2.7.0