* [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. @ 2017-07-12 10:50 Herbert Guan 2017-07-12 15:36 ` Jianbo Liu ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Herbert Guan @ 2017-07-12 10:50 UTC (permalink / raw) To: dev, jerin.jacob, jianbo.liu; +Cc: Herbert Guan Fixes: 3c4b4024c2 (arch/arm: add vcopyq_laneq_u32 for old gcc) Signed-off-by: Herbert Guan <herbert.guan@arm.com> --- lib/librte_eal/common/include/arch/arm/rte_vect.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 7fec25e..782350d 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h @@ -101,6 +101,13 @@ #if defined(RTE_ARCH_ARM64) #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000) + +#if (GCC_VERSION < 40900) +typedef uint64_t poly64_t; +typedef uint64x2_t poly64x2_t; +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); +#endif + /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */ static inline uint64x2_t vreinterpretq_u64_p128(poly128_t x) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. 2017-07-12 10:50 [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0 Herbert Guan @ 2017-07-12 15:36 ` Jianbo Liu 2017-07-12 17:45 ` Jerin Jacob 2017-07-13 2:16 ` [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) Herbert Guan 2 siblings, 0 replies; 10+ messages in thread From: Jianbo Liu @ 2017-07-12 15:36 UTC (permalink / raw) To: Herbert Guan; +Cc: dev, Jerin Jacob On 12 July 2017 at 18:50, Herbert Guan <herbert.guan@arm.com> wrote: > Fixes: 3c4b4024c2 (arch/arm: add vcopyq_laneq_u32 for old gcc) > > Signed-off-by: Herbert Guan <herbert.guan@arm.com> > --- > lib/librte_eal/common/include/arch/arm/rte_vect.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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 7fec25e..782350d 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > @@ -101,6 +101,13 @@ > > #if defined(RTE_ARCH_ARM64) > #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000) > + > +#if (GCC_VERSION < 40900) > +typedef uint64_t poly64_t; > +typedef uint64x2_t poly64x2_t; > +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); > +#endif > + > /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */ > static inline uint64x2_t > vreinterpretq_u64_p128(poly128_t x) > -- > 1.8.3.1 > Acked-by: Jianbo Liu <jianbo.liu@linaro.org> ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. 2017-07-12 10:50 [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0 Herbert Guan 2017-07-12 15:36 ` Jianbo Liu @ 2017-07-12 17:45 ` Jerin Jacob 2017-07-13 3:13 ` Herbert Guan 2017-07-13 2:16 ` [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) Herbert Guan 2 siblings, 1 reply; 10+ messages in thread From: Jerin Jacob @ 2017-07-12 17:45 UTC (permalink / raw) To: Herbert Guan; +Cc: dev, jianbo.liu -----Original Message----- > Date: Wed, 12 Jul 2017 18:50:19 +0800 > From: Herbert Guan <herbert.guan@arm.com> > To: dev@dpdk.org, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org > CC: Herbert Guan <herbert.guan@arm.com> > Subject: [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 > types for GCC version lower than 4.9.0. > X-Mailer: git-send-email 1.8.3.1 > > Fixes: 3c4b4024c2 (arch/arm: add vcopyq_laneq_u32 for old gcc) Fix the check-git-log.sh warning. You could start the commit with eal/armv8: With check-git-log.sh fix: Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> [master][dpdk.org] $ ./devtools/check-git-log.sh Wrong headline format: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. Wrong headline uppercase: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. Headline too long: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. > > Signed-off-by: Herbert Guan <herbert.guan@arm.com> > --- > lib/librte_eal/common/include/arch/arm/rte_vect.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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 7fec25e..782350d 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > @@ -101,6 +101,13 @@ > > #if defined(RTE_ARCH_ARM64) > #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000) > + > +#if (GCC_VERSION < 40900) > +typedef uint64_t poly64_t; > +typedef uint64x2_t poly64x2_t; > +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); > +#endif > + > /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */ > static inline uint64x2_t > vreinterpretq_u64_p128(poly128_t x) > -- > 1.8.3.1 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. 2017-07-12 17:45 ` Jerin Jacob @ 2017-07-13 3:13 ` Herbert Guan 0 siblings, 0 replies; 10+ messages in thread From: Herbert Guan @ 2017-07-13 3:13 UTC (permalink / raw) To: Jerin Jacob; +Cc: dev, jianbo.liu Thank, Jerin. I've fixed the git-log warnings and raised a v2 patch just now. Best Regards, Herbert -----Original Message----- From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] Sent: Thursday, July 13, 2017 1:45 To: Herbert Guan <Herbert.Guan@arm.com> Cc: dev@dpdk.org; jianbo.liu@linaro.org Subject: Re: [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. -----Original Message----- > Date: Wed, 12 Jul 2017 18:50:19 +0800 > From: Herbert Guan <herbert.guan@arm.com> > To: dev@dpdk.org, jerin.jacob@caviumnetworks.com, > jianbo.liu@linaro.org > CC: Herbert Guan <herbert.guan@arm.com> > Subject: [PATCH] ARMv8: Use built-in data types for unsupported > poly64/128 types for GCC version lower than 4.9.0. > X-Mailer: git-send-email 1.8.3.1 > > Fixes: 3c4b4024c2 (arch/arm: add vcopyq_laneq_u32 for old gcc) Fix the check-git-log.sh warning. You could start the commit with eal/armv8: With check-git-log.sh fix: Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> [master][dpdk.org] $ ./devtools/check-git-log.sh Wrong headline format: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. Wrong headline uppercase: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. Headline too long: ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0. > > Signed-off-by: Herbert Guan <herbert.guan@arm.com> > --- > lib/librte_eal/common/include/arch/arm/rte_vect.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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 7fec25e..782350d 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > @@ -101,6 +101,13 @@ > > #if defined(RTE_ARCH_ARM64) > #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000) > + > +#if (GCC_VERSION < 40900) > +typedef uint64_t poly64_t; > +typedef uint64x2_t poly64x2_t; > +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); > +#endif > + > /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */ > static inline uint64x2_t > vreinterpretq_u64_p128(poly128_t x) > -- > 1.8.3.1 > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-12 10:50 [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0 Herbert Guan 2017-07-12 15:36 ` Jianbo Liu 2017-07-12 17:45 ` Jerin Jacob @ 2017-07-13 2:16 ` Herbert Guan 2017-07-18 14:44 ` Thomas Monjalon 2017-07-31 7:24 ` Thomas Monjalon 2 siblings, 2 replies; 10+ messages in thread From: Herbert Guan @ 2017-07-13 2:16 UTC (permalink / raw) To: dev, jianbo.liu, jerin.jacob; +Cc: Herbert Guan Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0 Fixes: 3c4b4024c225 ("arch/arm: add vcopyq_laneq_u32 for old gcc") Signed-off-by: Herbert Guan <herbert.guan@arm.com> --- lib/librte_eal/common/include/arch/arm/rte_vect.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 7fec25e..782350d 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h @@ -101,6 +101,13 @@ #if defined(RTE_ARCH_ARM64) #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000) + +#if (GCC_VERSION < 40900) +typedef uint64_t poly64_t; +typedef uint64x2_t poly64x2_t; +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); +#endif + /* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */ static inline uint64x2_t vreinterpretq_u64_p128(poly128_t x) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-13 2:16 ` [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) Herbert Guan @ 2017-07-18 14:44 ` Thomas Monjalon 2017-07-19 8:21 ` Herbert Guan 2017-07-31 7:24 ` Thomas Monjalon 1 sibling, 1 reply; 10+ messages in thread From: Thomas Monjalon @ 2017-07-18 14:44 UTC (permalink / raw) To: Herbert Guan; +Cc: dev, jianbo.liu, jerin.jacob, nelio.laranjeiro 13/07/2017 05:16, Herbert Guan: > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > +#if (GCC_VERSION < 40900) > +typedef uint64_t poly64_t; > +typedef uint64x2_t poly64x2_t; > +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); > +#endif I think a better fix would be to switch to DPDK types like rte_v128u8_t. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-18 14:44 ` Thomas Monjalon @ 2017-07-19 8:21 ` Herbert Guan 2017-07-19 12:31 ` Thomas Monjalon 0 siblings, 1 reply; 10+ messages in thread From: Herbert Guan @ 2017-07-19 8:21 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, jianbo.liu, jerin.jacob, nelio.laranjeiro Thomas, Thanks a lot for your review and comment. But I have some concern in this approach. "poly128_t" is for ARM64 platform only and in fact it's more likely that rte_v128u8_t (generic DPDK data type) could be defined from poly128_t (ARM data type) which seems more reasonable. Best regards, Herbert -----Original Message----- From: Thomas Monjalon [mailto:thomas@monjalon.net] Sent: Tuesday, July 18, 2017 22:44 To: Herbert Guan <Herbert.Guan@arm.com> Cc: dev@dpdk.org; jianbo.liu@linaro.org; jerin.jacob@caviumnetworks.com; nelio.laranjeiro@6wind.com Subject: Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 13/07/2017 05:16, Herbert Guan: > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > +#if (GCC_VERSION < 40900) > +typedef uint64_t poly64_t; > +typedef uint64x2_t poly64x2_t; > +typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16))); > +#endif I think a better fix would be to switch to DPDK types like rte_v128u8_t. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-19 8:21 ` Herbert Guan @ 2017-07-19 12:31 ` Thomas Monjalon 2017-07-24 10:25 ` Herbert Guan 0 siblings, 1 reply; 10+ messages in thread From: Thomas Monjalon @ 2017-07-19 12:31 UTC (permalink / raw) To: Herbert Guan; +Cc: dev, jianbo.liu, jerin.jacob, nelio.laranjeiro 19/07/2017 11:21, Herbert Guan: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 13/07/2017 05:16, Herbert Guan: > > > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > > > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > > > +#if (GCC_VERSION < 40900) > > > +typedef uint64_t poly64_t; > > > +typedef uint64x2_t poly64x2_t; > > > +typedef uint8_t poly128_t __attribute__((vector_size(16), > > > aligned(16))); > > > +#endif > > > > I think a better fix would be to switch to DPDK types > > like rte_v128u8_t. > > Thanks a lot for your review and comment. > But I have some concern in this approach. "poly128_t" is for > ARM64 platform only and in fact it's more likely that rte_v128u8_t > (generic DPDK data type) could be defined from poly128_t > (ARM data type) which seems more reasonable. How poly128_t is different from rte_v128u8_t? You are defining poly128_t as (vector_size(16),aligned(16)) and rte_v128u8_t is exactly that. Is it interpreted differently with newer compilers? In that case, you could at least fallback on rte_v128u8_t. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-19 12:31 ` Thomas Monjalon @ 2017-07-24 10:25 ` Herbert Guan 0 siblings, 0 replies; 10+ messages in thread From: Herbert Guan @ 2017-07-24 10:25 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, jianbo.liu, jerin.jacob, nelio.laranjeiro "poly128_t" is an arm data type provided in GCC later than 4.9.0. But it's not defined in earlier GCC. To make the code get compiled with early version GCC, this patch is provided. In this way, "rte_v128u8_t" do is having the same definition as poly128_t in this patch. But in GCC 4.9.0 and later (e.g. 7.0.0), poly128_t is not interpreted the same way. They are using some new built-in data types: typedef __builtin_neon_poly64 poly64_t; typedef __builtin_neon_poly128 poly128_t; For example, if we need to replace the vector types' interpretation with ARM's data types, then we should not include "generic/rte_vect.h" in "common/include/arch/arm/rte_vect.h" and then interpret these data types in arm/rte_vect.h. So "typedef poly128_t rte_v128u8_t" is okay but "typedef rte_v128u8_t poly128_t" is not. For this reason, I think " typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16)));" is better. Could you comment if having different thoughts or concerns? Thanks, Herbert -----Original Message----- From: Thomas Monjalon [mailto:thomas@monjalon.net] Sent: Wednesday, July 19, 2017 20:31 To: Herbert Guan <Herbert.Guan@arm.com> Cc: dev@dpdk.org; jianbo.liu@linaro.org; jerin.jacob@caviumnetworks.com; nelio.laranjeiro@6wind.com Subject: Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 19/07/2017 11:21, Herbert Guan: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 13/07/2017 05:16, Herbert Guan: > > > --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h > > > +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h > > > +#if (GCC_VERSION < 40900) > > > +typedef uint64_t poly64_t; > > > +typedef uint64x2_t poly64x2_t; > > > +typedef uint8_t poly128_t __attribute__((vector_size(16), > > > aligned(16))); > > > +#endif > > > > I think a better fix would be to switch to DPDK types like > > rte_v128u8_t. > > Thanks a lot for your review and comment. > But I have some concern in this approach. "poly128_t" is for > ARM64 platform only and in fact it's more likely that rte_v128u8_t > (generic DPDK data type) could be defined from poly128_t (ARM data > type) which seems more reasonable. How poly128_t is different from rte_v128u8_t? You are defining poly128_t as (vector_size(16),aligned(16)) and rte_v128u8_t is exactly that. Is it interpreted differently with newer compilers? In that case, you could at least fallback on rte_v128u8_t. IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) 2017-07-13 2:16 ` [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) Herbert Guan 2017-07-18 14:44 ` Thomas Monjalon @ 2017-07-31 7:24 ` Thomas Monjalon 1 sibling, 0 replies; 10+ messages in thread From: Thomas Monjalon @ 2017-07-31 7:24 UTC (permalink / raw) To: Herbert Guan; +Cc: dev, jianbo.liu, jerin.jacob 13/07/2017 04:16, Herbert Guan: > Use built-in data types for unsupported poly64/128 types > for GCC version lower than 4.9.0 > > Fixes: 3c4b4024c225 ("arch/arm: add vcopyq_laneq_u32 for old gcc") > > Signed-off-by: Herbert Guan <herbert.guan@arm.com> Applied, thanks ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-07-31 7:24 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-07-12 10:50 [dpdk-dev] [PATCH] ARMv8: Use built-in data types for unsupported poly64/128 types for GCC version lower than 4.9.0 Herbert Guan 2017-07-12 15:36 ` Jianbo Liu 2017-07-12 17:45 ` Jerin Jacob 2017-07-13 3:13 ` Herbert Guan 2017-07-13 2:16 ` [dpdk-dev] [PATCH v2] eal/armv8: fix poly64/128 compile issue in old GCC(<4.9.0) Herbert Guan 2017-07-18 14:44 ` Thomas Monjalon 2017-07-19 8:21 ` Herbert Guan 2017-07-19 12:31 ` Thomas Monjalon 2017-07-24 10:25 ` Herbert Guan 2017-07-31 7:24 ` Thomas Monjalon
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).