From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Jianbo Liu <jianbo.liu@linaro.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal/acl: enable acl for armv7-a
Date: Thu, 3 Dec 2015 20:43:15 +0530 [thread overview]
Message-ID: <20151203151312.GA1810@localhost.localdomain> (raw)
In-Reply-To: <1449154976-16501-3-git-send-email-jianbo.liu@linaro.org>
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 <jianbo.liu@linaro.org>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> 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
>
next prev parent reply other threads:[~2015-12-03 15:13 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 18:41 [dpdk-dev] [PATCH 0/4] support acl/lpm/table/pipeline libs for armv7 and armv8 Jianbo Liu
2015-12-01 12:47 ` Jan Viktorin
2015-12-01 20:56 ` Jianbo Liu
2015-12-01 18:41 ` [dpdk-dev] [PATCH 1/4] eal/arm: use RTE_ARM_EAL_RDTSC_USE_PMU in rte_cycle_32.h Jianbo Liu
2015-12-01 12:41 ` Jan Viktorin
2015-12-01 12:43 ` Jan Viktorin
2015-12-01 18:41 ` [dpdk-dev] [PATCH 2/4] eal/acl: enable acl for armv7-a Jianbo Liu
2015-12-01 14:43 ` Jerin Jacob
2015-12-01 14:46 ` Jan Viktorin
2015-12-02 6:14 ` Jianbo Liu
2015-12-01 18:41 ` [dpdk-dev] [PATCH 3/4] eal/arm: Enable lpm/table/pipeline libs Jianbo Liu
2015-12-01 16:41 ` Jerin Jacob
2015-12-01 17:02 ` Jan Viktorin
2015-12-02 7:02 ` Jianbo Liu
[not found] ` <CAP4Qi3-5ofDU-2-4KsxFzMC1OpTsc5WjmxcFT2Eu_URA0UBzDw@mail.gmail.com>
2015-12-02 8:03 ` Jerin Jacob
2015-12-02 9:49 ` Jianbo Liu
2015-12-02 10:33 ` Ananyev, Konstantin
2015-12-02 10:48 ` Jerin Jacob
2015-12-02 13:06 ` Jan Viktorin
2015-12-02 10:39 ` Jerin Jacob
2015-12-02 13:05 ` Jan Viktorin
2015-12-02 13:13 ` Jianbo Liu
2015-12-02 14:34 ` Jerin Jacob
2015-12-02 16:40 ` Thomas Monjalon
2015-12-02 16:53 ` Jerin Jacob
2015-12-02 16:57 ` Thomas Monjalon
2015-12-02 17:38 ` Jerin Jacob
2015-12-03 9:33 ` Jerin Jacob
2015-12-03 11:02 ` Ananyev, Konstantin
2015-12-03 12:17 ` Jerin Jacob
2015-12-03 12:42 ` Ananyev, Konstantin
2015-12-03 13:20 ` Jerin Jacob
2015-12-01 18:41 ` [dpdk-dev] [PATCH 4/4] maintainers: claim resposibility for ARMv7 and ARMv8 Jianbo Liu
2015-12-01 16:44 ` Jerin Jacob
2015-12-03 15:02 ` [dpdk-dev] [PATCH v2 0/3] support acl lib for armv7-a and a small fix Jianbo Liu
2015-12-03 15:02 ` [dpdk-dev] [PATCH v2 1/3] eal/arm: use RTE_ARM_EAL_RDTSC_USE_PMU in rte_cycle_32.h Jianbo Liu
2015-12-08 1:13 ` Thomas Monjalon
2015-12-03 15:02 ` [dpdk-dev] [PATCH v2 2/3] eal/acl: enable acl for armv7-a Jianbo Liu
2015-12-03 15:13 ` Jerin Jacob [this message]
2015-12-08 1:18 ` Thomas Monjalon
2015-12-08 1:50 ` Jianbo Liu
2015-12-08 2:23 ` Thomas Monjalon
2015-12-08 7:56 ` Jianbo Liu
2015-12-08 10:03 ` Thomas Monjalon
2015-12-08 10:21 ` Jianbo Liu
2015-12-08 10:38 ` Thomas Monjalon
2015-12-08 11:27 ` Jan Viktorin
2015-12-08 10:25 ` Jan Viktorin
2015-12-03 15:02 ` [dpdk-dev] [PATCH v2 3/3] maintainers: claim resposibility for ARMv7 and ARMv8 Jianbo Liu
2015-12-08 1:24 ` [dpdk-dev] [PATCH v2 0/3] support acl lib for armv7-a and a small fix Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151203151312.GA1810@localhost.localdomain \
--to=jerin.jacob@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=jianbo.liu@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).