From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0071.outbound.protection.outlook.com [65.55.169.71]) by dpdk.org (Postfix) with ESMTP id BB46C8E5A for ; Thu, 3 Dec 2015 16:13:40 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@caviumnetworks.com; Received: from localhost.localdomain (122.166.132.183) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (TLS) id 15.1.337.19; Thu, 3 Dec 2015 15:13:36 +0000 Date: Thu, 3 Dec 2015 20:43:15 +0530 From: Jerin Jacob To: Jianbo Liu Message-ID: <20151203151312.GA1810@localhost.localdomain> References: <1448995276-9599-1-git-send-email-jianbo.liu@linaro.org> <1449154976-16501-1-git-send-email-jianbo.liu@linaro.org> <1449154976-16501-3-git-send-email-jianbo.liu@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1449154976-16501-3-git-send-email-jianbo.liu@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [122.166.132.183] X-ClientProxiedBy: MA1PR01CA0043.INDPRD01.PROD.OUTLOOK.COM (25.164.116.143) To BN3PR0701MB1719.namprd07.prod.outlook.com (25.163.39.18) X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 2:YPndvKjESIE9adqeRBltsnrN2KBo85m6EXJzdogheNYTFOYUZBi6ddW615kMfMendIXg5ZdrnwnruToPLfwyslcKuGFlhLya/e8t3+Xm6M8Ft/BVgsgjAghoZzz+1pArI5u2slf2EBHDz+rZQN03LQ==; 3:LlCbKuIDBmTcfxoxDOJ3cNYozZpPWgIOlu+qrYRfQLeXnOOZKTqGybt09aOiRwnDbbdJVDaeD+D2gQso3W8I3H2+ZGsIKQQx9B6KX453TkyfO5ftrzzs5ja9Cr5la/TF; 25:gPp8XIfsacxMRmCtB9+q9g+6JLGLza+UenxEMmxdy2YUTu29VsRmWJre0p30QrcoOV0f9VQpib4MXImYnfL0xTPaBJ3lwxz/3fOcO1DHonppL7Zitv3i/CSftkrb2VJiEAEHue+lrOF79d7lcFLNyvnN6M37ABk1Ha+oPsgRH023tVdYxIwOVvqmwSI9GaEb0DocKU4c01csBaUL0QtfmKKA02++BQcGFPiSuHqvGVvmqdWK9R97D8Ekpj829ZQ+fEX5xWv33d6J/qlieU4ebw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 20:iiEn8DuiB5A86dyTQAm3HavAr/PO/CwclsRy8iXrY4QaqVN4RGIM1OGkQsbVMz0LB2rskab4rj6i4DhsA81i1jJaHF35G1EgJVzFLTvbhpxaPQt+1U+8s6YEvEEDhkdMtuR2zSD5hHOTt7YjXNoE/VHo9eOk/On3Y82KfQpGNUHqIYfz+pYb+NJO2VmcCD3A3fv8lYLiRWMmPUO9A5w9KsCLoLIGvXDY+I1nPH9eQTJYymeYY9HsB2kKZUDsedCs/5ec98kpW2iKfS6coJV7uREhKLEOLWrXhYZffEr3tOPdSwrPwP5Dh1WuS7CvGD4Bbh3NAoSKC2xj6e+m6KsBlkssbGZbgpTd4hLRvFwR48jwUUd6eW0SUyv/WqlfWZMyxKkZ+pENVFtOK+DcgVS6VTWWYs8EKR5jnbaO0iV1u8fThhYT+JBJVD6msd2eelM75HgrwuyYCehhFyUm9PLDZ2lsY0HwgaBaknQvrBEtxP7HzvJpoMAW4XhiK0IOYn7ugPf4A3/IN05m8lGgZrsQg4AAHCNKlKtxvA/skCgqyfHjwsh31dUTlqTxH3LTlq4/I3thnK2/vZCyGFLXpiEIyYGVZkVDXyhm4RdYxSN0JjM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:6SsHQp6lPih8fGDV+86W4oulhELwjAwi3K21dEq0boIDeCGMlRxSMEkNiH81W7uwPq8pHCbkQ995ia4miIvzhi248DPIhK4XAxZXahHelHjaph+284HvLqH2t6oGI52f1+nnyh9e5VcqB2gJczEKF9gcRci31KvtNZnHrnMNs5PzGZ8vYl4BaChV3UY4xeh2WU1UYxTxGJ8Hg5/WEAm9UbWzzAjI/KDeHm6onGpSNePzwUMT0ff62rHx3f8dX1gKy6kjo+iFCUebksoLebO+T6JX0dSaz/7xdLHfrtKrTp0j0esCVyHgbAOAn8Ri/yCwwLrfe94t30hrXHR/pdCiCSQgk3s+hZSTJmNeqbIkchAqR1lT7tOWJRGaptqwhDjQRdkh+at2y1bIYgnoHyOAfBWffyL9X2b6/qWXfiCw4pkQgJhfVwd1YEDIY2vRcT8w X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(199003)(189002)(24454002)(81156007)(46406003)(76176999)(50986999)(101416001)(19580395003)(77096005)(19580405001)(97756001)(50466002)(33656002)(61506002)(5004730100002)(86362001)(92566002)(110136002)(5001960100002)(87976001)(5008740100001)(54356999)(2950100001)(66066001)(189998001)(47776003)(586003)(83506001)(42186005)(40100003)(23726003)(6116002)(3846002)(105586002)(106356001)(122386002)(1076002)(97736004)(4001350100001)(1096002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:SOjCPVmX2bvRo3LT5++jAb8lKuTviRLq3hXh8i1?= =?us-ascii?Q?a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Hz?= =?us-ascii?Q?BYVNWbL7AyY3hDcy8qROFeaWZH0XYvOWQvgsK5T/diHYkmy79aR1kJTMIhOm?= =?us-ascii?Q?+icRgbaRMUiIHRDJJGeFIXyw50bDRhgSNo8q2t7lZe2yM4mgmZU0+CNWvY+1?= =?us-ascii?Q?MlS4D7DlCCRZYfsB3uQ5Khc93dC+rQLDqJ+HaAbvo/+tWLy9Up2ER5dJQ1fr?= =?us-ascii?Q?jXiB32IEj6PE=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 5:SocJ3H692XhnpX27LJc9yMYqYTfe4x4OKbB38IZB8AcGAF/1GxAJT+/XDYvMb6ysLyEN2Jwc6MEnv+PyD9sZ8uZ8tuEErfN71gCgAx8b9iJua3fXBdQyXttnxQtKwn7FqOvMUdthlr1EeUbMrPPpOA==; 24:yqKVGZNqJ8BOYbSyGLowwM1ycco2nwdpsQtTiNyw+E4TsGkjhEkXC2I33XpG9I+iC5rDyulsItj74SILdBy1ulPaapsQUJ8Xq4gprVp/MYA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2015 15:13:36.7105 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal/acl: enable acl for armv7-a 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: Thu, 03 Dec 2015 15:13:41 -0000 On Thu, Dec 03, 2015 at 11:02:55PM +0800, Jianbo Liu wrote: > Implement vqtbl1q_u8 intrinsic function, which is not support in armv7-a. > > Signed-off-by: Jianbo Liu Acked-by: Jerin Jacob > --- > config/defconfig_arm-armv7a-linuxapp-gcc | 1 - > lib/librte_acl/Makefile | 2 +- > lib/librte_acl/rte_acl.c | 5 ++++- > lib/librte_eal/common/include/arch/arm/rte_vect.h | 23 +++++++++++++++++++++++ > 4 files changed, 28 insertions(+), 3 deletions(-) > > diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc > index 9924ff9..cbebd64 100644 > --- a/config/defconfig_arm-armv7a-linuxapp-gcc > +++ b/config/defconfig_arm-armv7a-linuxapp-gcc > @@ -53,7 +53,6 @@ CONFIG_RTE_LIBRTE_KNI=n > CONFIG_RTE_EAL_IGB_UIO=n > > # fails to compile on ARM > -CONFIG_RTE_LIBRTE_ACL=n > CONFIG_RTE_LIBRTE_LPM=n > CONFIG_RTE_LIBRTE_TABLE=n > CONFIG_RTE_LIBRTE_PIPELINE=n > diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile > index 897237d..2e394c9 100644 > --- a/lib/librte_acl/Makefile > +++ b/lib/librte_acl/Makefile > @@ -49,7 +49,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_bld.c > SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_gen.c > SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_scalar.c > > -ifeq ($(CONFIG_RTE_ARCH_ARM64),y) > +ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),) > SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_neon.c > CFLAGS_acl_run_neon.o += -flax-vector-conversions -Wno-maybe-uninitialized > else > diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c > index e2fdebd..4ba9786 100644 > --- a/lib/librte_acl/rte_acl.c > +++ b/lib/librte_acl/rte_acl.c > @@ -114,8 +114,11 @@ rte_acl_init(void) > { > enum rte_acl_classify_alg alg = RTE_ACL_CLASSIFY_DEFAULT; > > -#ifdef RTE_ARCH_ARM64 > +#if defined(RTE_ARCH_ARM64) > alg = RTE_ACL_CLASSIFY_NEON; > +#elif defined(RTE_ARCH_ARM) > + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) > + alg = RTE_ACL_CLASSIFY_NEON; > #else > #ifdef CC_AVX2_SUPPORT > if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2)) > diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h > index 21cdb4d..a33c054 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > @@ -53,6 +53,29 @@ typedef union rte_xmm { > double pd[XMM_SIZE / sizeof(double)]; > } __attribute__((aligned(16))) rte_xmm_t; > > +#ifdef RTE_ARCH_ARM > +/* NEON intrinsic vqtbl1q_u8() is not supported in ARMv7-A(AArch32) */ > +static __inline uint8x16_t > +vqtbl1q_u8(uint8x16_t a, uint8x16_t b) > +{ > + uint8_t i, pos; > + rte_xmm_t rte_a, rte_b, rte_ret; > + > + vst1q_u8(rte_a.u8, a); > + vst1q_u8(rte_b.u8, b); > + > + for (i = 0; i < 16; i++) { > + pos = rte_b.u8[i]; > + if (pos < 16) > + rte_ret.u8[i] = rte_a.u8[pos]; > + else > + rte_ret.u8[i] = 0; > + } > + > + return vld1q_u8(rte_ret.u8); > +} > +#endif > + > #ifdef __cplusplus > } > #endif > -- > 1.8.3.1 >