From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH v2] examples/l3fwd: em: use hw accelerated crc hash function for arm64 Date: Fri, 14 Oct 2016 11:02:40 +0530 Message-ID: <9d618bd3-f397-7a32-178b-b3c2b241e2fd@nxp.com> References: <1471964080-29958-1-git-send-email-hemant.agrawal@nxp.com> <1476384425-11787-1-git-send-email-hemant.agrawal@nxp.com> <20161013133644.GA8096@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Jerin Jacob Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0045.outbound.protection.outlook.com [104.47.33.45]) by dpdk.org (Postfix) with ESMTP id 03E296CD4 for ; Fri, 14 Oct 2016 07:32:47 +0200 (CEST) In-Reply-To: <20161013133644.GA8096@localhost.localdomain> 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" On 10/13/2016 7:06 PM, Jerin Jacob wrote: > On Fri, Oct 14, 2016 at 12:17:05AM +0530, Hemant Agrawal wrote: >> if machine level CRC extension are available, offload the >> hash to machine provide functions e.g. armv8-a CRC extensions >> support it >> >> Signed-off-by: Hemant Agrawal >> Reviewed-by: Jerin Jacob >> --- >> examples/l3fwd/l3fwd_em.c | 24 ++++++++++++++---------- >> 1 file changed, 14 insertions(+), 10 deletions(-) >> >> diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c >> index 89a68e6..d92d0aa 100644 >> --- a/examples/l3fwd/l3fwd_em.c >> +++ b/examples/l3fwd/l3fwd_em.c >> @@ -57,13 +57,17 @@ >> >> #include "l3fwd.h" >> >> -#ifdef RTE_MACHINE_CPUFLAG_SSE4_2 >> +#if defined(RTE_MACHINE_CPUFLAG_SSE4_2) && defined(RTE_MACHINE_CPUFLAG_CRC32) > > The will evaluate as FALSE always. > > Please change to logical OR operation here. ie #if defined(RTE_MACHINE_CPUFLAG_SSE4_2) || > defined(RTE_MACHINE_CPUFLAG_CRC32) > Oops! Will fix it. >> +#define EM_HASH_CRC 1 >> +#endif >