patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
@ 2019-11-11 10:34 Phil Yang
  2019-11-11 10:34 ` [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance Phil Yang
  2019-11-11 10:47 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Bruce Richardson
  0 siblings, 2 replies; 16+ messages in thread
From: Phil Yang @ 2019-11-11 10:34 UTC (permalink / raw)
  To: dev
  Cc: thomas, david.marchand, jerinj, Honnappa.Nagarahalli, gavin.hu,
	joyce.kong, nd, stable

The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
architecture doesn't support the flag '-Wno-address-of-packed-member',
so remove this flag for aarch32.

Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
Cc: stable@dpdk.org

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Joyce Kong <joyce.kong@arm.com>

---
 mk/toolchain/gcc/rte.vars.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index 9fc7041..ec0cbbf 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
 endif
 
 # disable packed member unalign warnings
+ifneq ($(CONFIG_RTE_ARCH_ARM), y)
 WERROR_FLAGS += -Wno-address-of-packed-member
+endif
 
 export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF
 export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS
-- 
2.7.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance
  2019-11-11 10:34 [dpdk-stable] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Phil Yang
@ 2019-11-11 10:34 ` Phil Yang
  2020-05-24 21:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  2020-05-27  8:28   ` Ruifeng Wang
  2019-11-11 10:47 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Bruce Richardson
  1 sibling, 2 replies; 16+ messages in thread
From: Phil Yang @ 2019-11-11 10:34 UTC (permalink / raw)
  To: dev
  Cc: thomas, david.marchand, jerinj, Honnappa.Nagarahalli, gavin.hu,
	joyce.kong, nd, stable

Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.

Cc: stable@dpdk.org

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Joyce Kong <joyce.kong@arm.com>

---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36 ++++++++++++++++++----
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index e799b0b..409d444 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,15 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross-compile DPDK for aarch64 from x86 and compile 32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64. An
+   aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -133,3 +133,27 @@ command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
+
+Compiling DPDK for aarch32/armv7 on aarch64 host
+------------------------------------------
+
+Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
+applications and the legacy 32-bit armv7 applications can run in this mode.
+With the GNU C compiler for the armhf architecture toolchain
+gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64 natively.
+
+For Example, in 64-bit Debian, we can use the following command to build 32-bit armv7 DPDK on aarch64 natively:
+
+Install cross compile toolchain for the armhf architecure.
+command::
+
+	dpkg --add-architecture armhf
+	apt-get update
+	apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
+
+Build DPDK arm-armv7a-linuxapp-gcc executables.
+command::
+
+	cd <dpdk_folder>
+	make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
+	make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc RTE_DEVEL_BUILD=n
-- 
2.7.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-11 10:34 [dpdk-stable] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Phil Yang
  2019-11-11 10:34 ` [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance Phil Yang
@ 2019-11-11 10:47 ` Bruce Richardson
  2019-11-12  5:25   ` Phil Yang (Arm Technology China)
  1 sibling, 1 reply; 16+ messages in thread
From: Bruce Richardson @ 2019-11-11 10:47 UTC (permalink / raw)
  To: Phil Yang
  Cc: dev, thomas, david.marchand, jerinj, Honnappa.Nagarahalli,
	gavin.hu, joyce.kong, nd, stable

On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
> architecture doesn't support the flag '-Wno-address-of-packed-member',
> so remove this flag for aarch32.
> 
> Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Tested-by: Joyce Kong <joyce.kong@arm.com>
> 
> ---
>  mk/toolchain/gcc/rte.vars.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
> index 9fc7041..ec0cbbf 100644
> --- a/mk/toolchain/gcc/rte.vars.mk
> +++ b/mk/toolchain/gcc/rte.vars.mk
> @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
>  endif
>  
>  # disable packed member unalign warnings
> +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
>  WERROR_FLAGS += -Wno-address-of-packed-member
> +endif
>  
You don't need to do this, as gcc will not complain about this unknown flag
unless you have other issues in your code.[1] I think it's better to keep the
code clean in this case, otherwise we'll have the code littered with
conditionals for various flags.

/Bruce

[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
"When an unrecognized warning option is requested (e.g.,
-Wunknown-warning), GCC emits a diagnostic stating that the option is not
recognized. However, if the -Wno- form is used, the behavior is slightly
different: no diagnostic is produced for -Wno-unknown-warning unless other
diagnostics are being produced. This allows the use of new -Wno- options
with old compilers, but if something goes wrong, the compiler warns that an
unrecognized option is present."

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-11 10:47 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Bruce Richardson
@ 2019-11-12  5:25   ` Phil Yang (Arm Technology China)
  2019-11-12  6:03     ` Thomas Monjalon
  0 siblings, 1 reply; 16+ messages in thread
From: Phil Yang (Arm Technology China) @ 2019-11-12  5:25 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, thomas, david.marchand, jerinj, Honnappa Nagarahalli,
	Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable, nd

> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Monday, November 11, 2019 6:47 PM
> To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> architercture
> 
> On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
> > architecture doesn't support the flag '-Wno-address-of-packed-member',
> > so remove this flag for aarch32.
> >
> > Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > Tested-by: Joyce Kong <joyce.kong@arm.com>
> >
> > ---
> >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
> > index 9fc7041..ec0cbbf 100644
> > --- a/mk/toolchain/gcc/rte.vars.mk
> > +++ b/mk/toolchain/gcc/rte.vars.mk
> > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> >  endif
> >
> >  # disable packed member unalign warnings
> > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> >  WERROR_FLAGS += -Wno-address-of-packed-member
> > +endif
> >
> You don't need to do this, as gcc will not complain about this unknown flag
> unless you have other issues in your code.[1] I think it's better to keep the
> code clean in this case, otherwise we'll have the code littered with
> conditionals for various flags.
> 
> /Bruce
> 
> [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> "When an unrecognized warning option is requested (e.g.,
> -Wunknown-warning), GCC emits a diagnostic stating that the option is not
> recognized. However, if the -Wno- form is used, the behavior is slightly
> different: no diagnostic is produced for -Wno-unknown-warning unless other
> diagnostics are being produced. This allows the use of new -Wno- options
> with old compilers, but if something goes wrong, the compiler warns that an
> unrecognized option is present."

Thanks, Bruce. 

There are thousands of warnings with alignment when compiling for ARMv7 (ARMv7 supports unaligned memory access).
Without this new flag, the build system works fine for ARMv7.  So I add this conditional for ARMv7 only.
I agree with you we should clean up the code, but it needs a lot of effort to achieve that. 
This patch is going to make the ARMv7 target build successfully during this period.

Thanks,
Phil

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-12  5:25   ` Phil Yang (Arm Technology China)
@ 2019-11-12  6:03     ` Thomas Monjalon
  2019-11-12  6:40       ` Phil Yang (Arm Technology China)
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-11-12  6:03 UTC (permalink / raw)
  To: Phil Yang (Arm Technology China)
  Cc: Bruce Richardson, dev, david.marchand, jerinj,
	Honnappa Nagarahalli, Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable

12/11/2019 06:25, Phil Yang (Arm Technology China):
> From: Bruce Richardson <bruce.richardson@intel.com>
> > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
> > > architecture doesn't support the flag '-Wno-address-of-packed-member',
> > > so remove this flag for aarch32.
> > >
> > > Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > >
> > > ---
> > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
> > > index 9fc7041..ec0cbbf 100644
> > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> > >  endif
> > >
> > >  # disable packed member unalign warnings
> > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > +endif
> > >
> > You don't need to do this, as gcc will not complain about this unknown flag
> > unless you have other issues in your code.[1] I think it's better to keep the
> > code clean in this case, otherwise we'll have the code littered with
> > conditionals for various flags.
> > 
> > /Bruce
> > 
> > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > "When an unrecognized warning option is requested (e.g.,
> > -Wunknown-warning), GCC emits a diagnostic stating that the option is not
> > recognized. However, if the -Wno- form is used, the behavior is slightly
> > different: no diagnostic is produced for -Wno-unknown-warning unless other
> > diagnostics are being produced. This allows the use of new -Wno- options
> > with old compilers, but if something goes wrong, the compiler warns that an
> > unrecognized option is present."
> 
> Thanks, Bruce. 
> 
> There are thousands of warnings with alignment when compiling for ARMv7 (ARMv7 supports unaligned memory access).
> Without this new flag, the build system works fine for ARMv7.  So I add this conditional for ARMv7 only.
> I agree with you we should clean up the code, but it needs a lot of effort to achieve that. 
> This patch is going to make the ARMv7 target build successfully during this period.

I would go the opposite direction.
I think we should remove all warnings disablement like "-Wno-something",
and clean the code.

If you want to allow building ARMv7, you can just allow warnings as not errors.
So we will still see something is wrong but it won't prevent from building.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-12  6:03     ` Thomas Monjalon
@ 2019-11-12  6:40       ` Phil Yang (Arm Technology China)
  2019-11-26 17:01         ` Thomas Monjalon
  0 siblings, 1 reply; 16+ messages in thread
From: Phil Yang (Arm Technology China) @ 2019-11-12  6:40 UTC (permalink / raw)
  To: thomas
  Cc: Bruce Richardson, dev, david.marchand, jerinj,
	Honnappa Nagarahalli, Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable, nd

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, November 12, 2019 2:03 PM
> To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> david.marchand@redhat.com; jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> architercture
> 
> 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > From: Bruce Richardson <bruce.richardson@intel.com>
> > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
> > > > architecture doesn't support the flag '-Wno-address-of-packed-
> member',
> > > > so remove this flag for aarch32.
> > > >
> > > > Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > >
> > > > ---
> > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> b/mk/toolchain/gcc/rte.vars.mk
> > > > index 9fc7041..ec0cbbf 100644
> > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> > > >  endif
> > > >
> > > >  # disable packed member unalign warnings
> > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > +endif
> > > >
> > > You don't need to do this, as gcc will not complain about this unknown
> flag
> > > unless you have other issues in your code.[1] I think it's better to keep
> the
> > > code clean in this case, otherwise we'll have the code littered with
> > > conditionals for various flags.
> > >
> > > /Bruce
> > >
> > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > "When an unrecognized warning option is requested (e.g.,
> > > -Wunknown-warning), GCC emits a diagnostic stating that the option is
> not
> > > recognized. However, if the -Wno- form is used, the behavior is slightly
> > > different: no diagnostic is produced for -Wno-unknown-warning unless
> other
> > > diagnostics are being produced. This allows the use of new -Wno- options
> > > with old compilers, but if something goes wrong, the compiler warns that
> an
> > > unrecognized option is present."
> >
> > Thanks, Bruce.
> >
> > There are thousands of warnings with alignment when compiling for
> ARMv7 (ARMv7 supports unaligned memory access).
> > Without this new flag, the build system works fine for ARMv7.  So I add this
> conditional for ARMv7 only.
> > I agree with you we should clean up the code, but it needs a lot of effort to
> achieve that.
> > This patch is going to make the ARMv7 target build successfully during this
> period.
> 
> I would go the opposite direction.
> I think we should remove all warnings disablement like "-Wno-something",
> and clean the code.

Thanks, Thomas.

I think it is a compiler issue rather than a code defect in this case, as It cannot recognize the '-Waddress-of-packed-member' flag. 
"arm-linux-gnueabihf-gcc: error: unrecognized command line option '-Waddress-of-packed-member'"

> 
> If you want to allow building ARMv7, you can just allow warnings as not
> errors.
> So we will still see something is wrong but it won't prevent from building.

Yes. We did this already, all the alignment issues are emitted as warnings on ARMv7. 
Please see these two commits:
79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
6433c19105e8 ("mk: generalize strict alignment warning handling")

> 
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-12  6:40       ` Phil Yang (Arm Technology China)
@ 2019-11-26 17:01         ` Thomas Monjalon
  2019-11-27  8:09           ` Phil Yang (Arm Technology China)
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2019-11-26 17:01 UTC (permalink / raw)
  To: Phil Yang (Arm Technology China)
  Cc: dev, Bruce Richardson, david.marchand, jerinj,
	Honnappa Nagarahalli, Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable

12/11/2019 07:40, Phil Yang (Arm Technology China):
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Tuesday, November 12, 2019 2:03 PM
> > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> > david.marchand@redhat.com; jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> > architercture
> > 
> > 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the armhf
> > > > > architecture doesn't support the flag '-Wno-address-of-packed-
> > member',
> > > > > so remove this flag for aarch32.
> > > > >
> > > > > Fixes: a385972c3675 ("mk: disable warning for packed member pointer")
> > > > > Cc: stable@dpdk.org
> > > > >
> > > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > > >
> > > > > ---
> > > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> > b/mk/toolchain/gcc/rte.vars.mk
> > > > > index 9fc7041..ec0cbbf 100644
> > > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> > > > >  endif
> > > > >
> > > > >  # disable packed member unalign warnings
> > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > > +endif
> > > > >
> > > > You don't need to do this, as gcc will not complain about this unknown
> > flag
> > > > unless you have other issues in your code.[1] I think it's better to keep
> > the
> > > > code clean in this case, otherwise we'll have the code littered with
> > > > conditionals for various flags.
> > > >
> > > > /Bruce
> > > >
> > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > > "When an unrecognized warning option is requested (e.g.,
> > > > -Wunknown-warning), GCC emits a diagnostic stating that the option is
> > not
> > > > recognized. However, if the -Wno- form is used, the behavior is slightly
> > > > different: no diagnostic is produced for -Wno-unknown-warning unless
> > other
> > > > diagnostics are being produced. This allows the use of new -Wno- options
> > > > with old compilers, but if something goes wrong, the compiler warns that
> > an
> > > > unrecognized option is present."
> > >
> > > Thanks, Bruce.
> > >
> > > There are thousands of warnings with alignment when compiling for
> > ARMv7 (ARMv7 supports unaligned memory access).
> > > Without this new flag, the build system works fine for ARMv7.  So I add this
> > conditional for ARMv7 only.
> > > I agree with you we should clean up the code, but it needs a lot of effort to
> > achieve that.
> > > This patch is going to make the ARMv7 target build successfully during this
> > period.
> > 
> > I would go the opposite direction.
> > I think we should remove all warnings disablement like "-Wno-something",
> > and clean the code.
> 
> Thanks, Thomas.
> 
> I think it is a compiler issue rather than a code defect in this case, as It cannot recognize the '-Waddress-of-packed-member' flag. 
> "arm-linux-gnueabihf-gcc: error: unrecognized command line option '-Waddress-of-packed-member'"
> 
> > 
> > If you want to allow building ARMv7, you can just allow warnings as not
> > errors.
> > So we will still see something is wrong but it won't prevent from building.
> 
> Yes. We did this already, all the alignment issues are emitted as warnings on ARMv7. 
> Please see these two commits:
> 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
> 6433c19105e8 ("mk: generalize strict alignment warning handling")

I don't know what to do with this patch.
I think it is not how it should work,
but you say your compiler has a real bug.

Can you confirm which compiler is it?
Does it prevent to compile even with -Wno-error ?

Any other opinion?



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-26 17:01         ` Thomas Monjalon
@ 2019-11-27  8:09           ` Phil Yang (Arm Technology China)
  2019-11-27  9:29             ` Bruce Richardson
  0 siblings, 1 reply; 16+ messages in thread
From: Phil Yang (Arm Technology China) @ 2019-11-27  8:09 UTC (permalink / raw)
  To: thomas
  Cc: dev, Bruce Richardson, david.marchand, jerinj,
	Honnappa Nagarahalli, Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable, nd

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, November 27, 2019 1:02 AM
> To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> Cc: dev@dpdk.org; Bruce Richardson <bruce.richardson@intel.com>;
> david.marchand@redhat.com; jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> architercture
> 
> 12/11/2019 07:40, Phil Yang (Arm Technology China):
> > > -----Original Message-----
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Tuesday, November 12, 2019 2:03 PM
> > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on
> armhf
> > > architercture
> > >
> > > 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the
> armhf
> > > > > > architecture doesn't support the flag '-Wno-address-of-packed-
> > > member',
> > > > > > so remove this flag for aarch32.
> > > > > >
> > > > > > Fixes: a385972c3675 ("mk: disable warning for packed member
> pointer")
> > > > > > Cc: stable@dpdk.org
> > > > > >
> > > > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > > > >
> > > > > > ---
> > > > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > > > >  1 file changed, 2 insertions(+)
> > > > > >
> > > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> > > b/mk/toolchain/gcc/rte.vars.mk
> > > > > > index 9fc7041..ec0cbbf 100644
> > > > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> > > > > >  endif
> > > > > >
> > > > > >  # disable packed member unalign warnings
> > > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > > > +endif
> > > > > >
> > > > > You don't need to do this, as gcc will not complain about this unknown
> > > flag
> > > > > unless you have other issues in your code.[1] I think it's better to
> keep
> > > the
> > > > > code clean in this case, otherwise we'll have the code littered with
> > > > > conditionals for various flags.
> > > > >
> > > > > /Bruce
> > > > >
> > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > > > "When an unrecognized warning option is requested (e.g.,
> > > > > -Wunknown-warning), GCC emits a diagnostic stating that the option
> is
> > > not
> > > > > recognized. However, if the -Wno- form is used, the behavior is
> slightly
> > > > > different: no diagnostic is produced for -Wno-unknown-warning
> unless
> > > other
> > > > > diagnostics are being produced. This allows the use of new -Wno-
> options
> > > > > with old compilers, but if something goes wrong, the compiler warns
> that
> > > an
> > > > > unrecognized option is present."
> > > >
> > > > Thanks, Bruce.
> > > >
> > > > There are thousands of warnings with alignment when compiling for
> > > ARMv7 (ARMv7 supports unaligned memory access).
> > > > Without this new flag, the build system works fine for ARMv7.  So I add
> this
> > > conditional for ARMv7 only.
> > > > I agree with you we should clean up the code, but it needs a lot of
> effort to
> > > achieve that.
> > > > This patch is going to make the ARMv7 target build successfully during
> this
> > > period.
> > >
> > > I would go the opposite direction.
> > > I think we should remove all warnings disablement like "-Wno-
> something",
> > > and clean the code.
> >
> > Thanks, Thomas.
> >
> > I think it is a compiler issue rather than a code defect in this case, as It
> cannot recognize the '-Waddress-of-packed-member' flag.
> > "arm-linux-gnueabihf-gcc: error: unrecognized command line option '-
> Waddress-of-packed-member'"
> >
> > >
> > > If you want to allow building ARMv7, you can just allow warnings as not
> > > errors.
> > > So we will still see something is wrong but it won't prevent from building.
> >
> > Yes. We did this already, all the alignment issues are emitted as warnings
> on ARMv7.
> > Please see these two commits:
> > 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
> > 6433c19105e8 ("mk: generalize strict alignment warning handling")
> 
> I don't know what to do with this patch.
> I think it is not how it should work,
> but you say your compiler has a real bug.
Agree with you, however I haven't found a better solution for this issue yet.

> 
> Can you confirm which compiler is it?

Please check the packet information dumped below, it is the latest version in Ubuntu 18.04 LTS.
$ sudo apt show gcc-arm-linux-gnueabihf
Package: gcc-arm-linux-gnueabihf
Version: 4:7.4.0-1ubuntu2.3
Priority: optional
Section: devel
Source: gcc-defaults (1.176ubuntu2.3)
Origin: Ubuntu

> Does it prevent to compile even with -Wno-error ?
Yes, it does. I put one piece of the compiling log bellow. Please take a look.  

$ make -j1 CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc RTE_DEVEL_BUILD=y
...
/home/phil/aarch32_dpdk/dpdk/lib/librte_eal/linux/eal/eal_vfio.c:1178:7: warning: cast increases required alignment of target type [-Wcast-align]
   p = (struct vfio_mp_param *)mp_rep->param;
       ^
/home/phil/aarch32_dpdk/dpdk/lib/librte_eal/linux/eal/eal_vfio.c: At top level:
cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werror]
...

> 
> Any other opinion?
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-27  8:09           ` Phil Yang (Arm Technology China)
@ 2019-11-27  9:29             ` Bruce Richardson
  2019-11-27 10:00               ` Phil Yang (Arm Technology China)
  0 siblings, 1 reply; 16+ messages in thread
From: Bruce Richardson @ 2019-11-27  9:29 UTC (permalink / raw)
  To: Phil Yang (Arm Technology China)
  Cc: thomas, dev, david.marchand, jerinj, Honnappa Nagarahalli,
	Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable

On Wed, Nov 27, 2019 at 08:09:22AM +0000, Phil Yang (Arm Technology China) wrote:
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Wednesday, November 27, 2019 1:02 AM
> > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > Cc: dev@dpdk.org; Bruce Richardson <bruce.richardson@intel.com>;
> > david.marchand@redhat.com; jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> > architercture
> > 
> > 12/11/2019 07:40, Phil Yang (Arm Technology China):
> > > > -----Original Message-----
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > Sent: Tuesday, November 12, 2019 2:03 PM
> > > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > > Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> > > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> > Nagarahalli
> > > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on
> > armhf
> > > > architercture
> > > >
> > > > 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > > > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the
> > armhf
> > > > > > > architecture doesn't support the flag '-Wno-address-of-packed-
> > > > member',
> > > > > > > so remove this flag for aarch32.
> > > > > > >
> > > > > > > Fixes: a385972c3675 ("mk: disable warning for packed member
> > pointer")
> > > > > > > Cc: stable@dpdk.org
> > > > > > >
> > > > > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > > > > >
> > > > > > > ---
> > > > > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > > > > >  1 file changed, 2 insertions(+)
> > > > > > >
> > > > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> > > > b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > index 9fc7041..ec0cbbf 100644
> > > > > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-truncation
> > > > > > >  endif
> > > > > > >
> > > > > > >  # disable packed member unalign warnings
> > > > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > > > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > > > > +endif
> > > > > > >
> > > > > > You don't need to do this, as gcc will not complain about this unknown
> > > > flag
> > > > > > unless you have other issues in your code.[1] I think it's better to
> > keep
> > > > the
> > > > > > code clean in this case, otherwise we'll have the code littered with
> > > > > > conditionals for various flags.
> > > > > >
> > > > > > /Bruce
> > > > > >
> > > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > > > > "When an unrecognized warning option is requested (e.g.,
> > > > > > -Wunknown-warning), GCC emits a diagnostic stating that the option
> > is
> > > > not
> > > > > > recognized. However, if the -Wno- form is used, the behavior is
> > slightly
> > > > > > different: no diagnostic is produced for -Wno-unknown-warning
> > unless
> > > > other
> > > > > > diagnostics are being produced. This allows the use of new -Wno-
> > options
> > > > > > with old compilers, but if something goes wrong, the compiler warns
> > that
> > > > an
> > > > > > unrecognized option is present."
> > > > >
> > > > > Thanks, Bruce.
> > > > >
> > > > > There are thousands of warnings with alignment when compiling for
> > > > ARMv7 (ARMv7 supports unaligned memory access).
> > > > > Without this new flag, the build system works fine for ARMv7.  So I add
> > this
> > > > conditional for ARMv7 only.
> > > > > I agree with you we should clean up the code, but it needs a lot of
> > effort to
> > > > achieve that.
> > > > > This patch is going to make the ARMv7 target build successfully during
> > this
> > > > period.
> > > >
> > > > I would go the opposite direction.
> > > > I think we should remove all warnings disablement like "-Wno-
> > something",
> > > > and clean the code.
> > >
> > > Thanks, Thomas.
> > >
> > > I think it is a compiler issue rather than a code defect in this case, as It
> > cannot recognize the '-Waddress-of-packed-member' flag.
> > > "arm-linux-gnueabihf-gcc: error: unrecognized command line option '-
> > Waddress-of-packed-member'"
> > >
> > > >
> > > > If you want to allow building ARMv7, you can just allow warnings as not
> > > > errors.
> > > > So we will still see something is wrong but it won't prevent from building.
> > >
> > > Yes. We did this already, all the alignment issues are emitted as warnings
> > on ARMv7.
> > > Please see these two commits:
> > > 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
> > > 6433c19105e8 ("mk: generalize strict alignment warning handling")
> > 
> > I don't know what to do with this patch.
> > I think it is not how it should work,
> > but you say your compiler has a real bug.
> Agree with you, however I haven't found a better solution for this issue yet.
> 
> > 
> > Can you confirm which compiler is it?
> 
> Please check the packet information dumped below, it is the latest version in Ubuntu 18.04 LTS.
> $ sudo apt show gcc-arm-linux-gnueabihf
> Package: gcc-arm-linux-gnueabihf
> Version: 4:7.4.0-1ubuntu2.3
> Priority: optional
> Section: devel
> Source: gcc-defaults (1.176ubuntu2.3)
> Origin: Ubuntu
> 
> > Does it prevent to compile even with -Wno-error ?
> Yes, it does. I put one piece of the compiling log bellow. Please take a look.  
> 
> $ make -j1 CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc RTE_DEVEL_BUILD=y

RTE_DEVEL_BUILD turns on -Werror, while what Thomas is asking about is
using the opposite flag "-Wno-error". Can you do a non-developer build or
put "-Wno-error" in EXTRA_CFLAGS to test this.

/Bruce


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-27  9:29             ` Bruce Richardson
@ 2019-11-27 10:00               ` Phil Yang (Arm Technology China)
  2019-11-27 10:32                 ` Thomas Monjalon
  0 siblings, 1 reply; 16+ messages in thread
From: Phil Yang (Arm Technology China) @ 2019-11-27 10:00 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: thomas, dev, david.marchand, jerinj, Honnappa Nagarahalli,
	Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable, nd

> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Wednesday, November 27, 2019 5:30 PM
> To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> Cc: thomas@monjalon.net; dev@dpdk.org; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> architercture
> 
> On Wed, Nov 27, 2019 at 08:09:22AM +0000, Phil Yang (Arm Technology China)
> wrote:
> > > -----Original Message-----
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Wednesday, November 27, 2019 1:02 AM
> > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > Cc: dev@dpdk.org; Bruce Richardson <bruce.richardson@intel.com>;
> > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on
> armhf
> > > architercture
> > >
> > > 12/11/2019 07:40, Phil Yang (Arm Technology China):
> > > > > -----Original Message-----
> > > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > Sent: Tuesday, November 12, 2019 2:03 PM
> > > > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > > > Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> > > > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> > > Nagarahalli
> > > > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error
> on
> > > armhf
> > > > > architercture
> > > > >
> > > > > 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > > > > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the
> > > armhf
> > > > > > > > architecture doesn't support the flag '-Wno-address-of-packed-
> > > > > member',
> > > > > > > > so remove this flag for aarch32.
> > > > > > > >
> > > > > > > > Fixes: a385972c3675 ("mk: disable warning for packed member
> > > pointer")
> > > > > > > > Cc: stable@dpdk.org
> > > > > > > >
> > > > > > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > > > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > > > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > > > > > >
> > > > > > > > ---
> > > > > > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > > > > > >  1 file changed, 2 insertions(+)
> > > > > > > >
> > > > > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> > > > > b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > index 9fc7041..ec0cbbf 100644
> > > > > > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-
> truncation
> > > > > > > >  endif
> > > > > > > >
> > > > > > > >  # disable packed member unalign warnings
> > > > > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > > > > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > > > > > +endif
> > > > > > > >
> > > > > > > You don't need to do this, as gcc will not complain about this
> unknown
> > > > > flag
> > > > > > > unless you have other issues in your code.[1] I think it's better to
> > > keep
> > > > > the
> > > > > > > code clean in this case, otherwise we'll have the code littered with
> > > > > > > conditionals for various flags.
> > > > > > >
> > > > > > > /Bruce
> > > > > > >
> > > > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > > > > > "When an unrecognized warning option is requested (e.g.,
> > > > > > > -Wunknown-warning), GCC emits a diagnostic stating that the
> option
> > > is
> > > > > not
> > > > > > > recognized. However, if the -Wno- form is used, the behavior is
> > > slightly
> > > > > > > different: no diagnostic is produced for -Wno-unknown-warning
> > > unless
> > > > > other
> > > > > > > diagnostics are being produced. This allows the use of new -Wno-
> > > options
> > > > > > > with old compilers, but if something goes wrong, the compiler
> warns
> > > that
> > > > > an
> > > > > > > unrecognized option is present."
> > > > > >
> > > > > > Thanks, Bruce.
> > > > > >
> > > > > > There are thousands of warnings with alignment when compiling for
> > > > > ARMv7 (ARMv7 supports unaligned memory access).
> > > > > > Without this new flag, the build system works fine for ARMv7.  So I
> add
> > > this
> > > > > conditional for ARMv7 only.
> > > > > > I agree with you we should clean up the code, but it needs a lot of
> > > effort to
> > > > > achieve that.
> > > > > > This patch is going to make the ARMv7 target build successfully
> during
> > > this
> > > > > period.
> > > > >
> > > > > I would go the opposite direction.
> > > > > I think we should remove all warnings disablement like "-Wno-
> > > something",
> > > > > and clean the code.
> > > >
> > > > Thanks, Thomas.
> > > >
> > > > I think it is a compiler issue rather than a code defect in this case, as It
> > > cannot recognize the '-Waddress-of-packed-member' flag.
> > > > "arm-linux-gnueabihf-gcc: error: unrecognized command line option '-
> > > Waddress-of-packed-member'"
> > > >
> > > > >
> > > > > If you want to allow building ARMv7, you can just allow warnings as
> not
> > > > > errors.
> > > > > So we will still see something is wrong but it won't prevent from
> building.
> > > >
> > > > Yes. We did this already, all the alignment issues are emitted as
> warnings
> > > on ARMv7.
> > > > Please see these two commits:
> > > > 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
> > > > 6433c19105e8 ("mk: generalize strict alignment warning handling")
> > >
> > > I don't know what to do with this patch.
> > > I think it is not how it should work,
> > > but you say your compiler has a real bug.
> > Agree with you, however I haven't found a better solution for this issue yet.
> >
> > >
> > > Can you confirm which compiler is it?
> >
> > Please check the packet information dumped below, it is the latest version
> in Ubuntu 18.04 LTS.
> > $ sudo apt show gcc-arm-linux-gnueabihf
> > Package: gcc-arm-linux-gnueabihf
> > Version: 4:7.4.0-1ubuntu2.3
> > Priority: optional
> > Section: devel
> > Source: gcc-defaults (1.176ubuntu2.3)
> > Origin: Ubuntu
> >
> > > Does it prevent to compile even with -Wno-error ?
> > Yes, it does. I put one piece of the compiling log bellow. Please take a look.
> >
> > $ make -j1 CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> RTE_DEVEL_BUILD=y
> 
> RTE_DEVEL_BUILD turns on -Werror, while what Thomas is asking about is
> using the opposite flag "-Wno-error". Can you do a non-developer build or
> put "-Wno-error" in EXTRA_CFLAGS to test this.

Thanks, Bruce. 
There is no compiling issue for the non-developer build and "-Wno-error" flag build.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture
  2019-11-27 10:00               ` Phil Yang (Arm Technology China)
@ 2019-11-27 10:32                 ` Thomas Monjalon
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Monjalon @ 2019-11-27 10:32 UTC (permalink / raw)
  To: Phil Yang (Arm Technology China)
  Cc: Bruce Richardson, dev, david.marchand, jerinj,
	Honnappa Nagarahalli, Gavin Hu (Arm Technology China),
	Joyce Kong (Arm Technology China),
	nd, stable

27/11/2019 11:00, Phil Yang (Arm Technology China):
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richardson@intel.com>
> > Sent: Wednesday, November 27, 2019 5:30 PM
> > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > Cc: thomas@monjalon.net; dev@dpdk.org; david.marchand@redhat.com;
> > jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf
> > architercture
> > 
> > On Wed, Nov 27, 2019 at 08:09:22AM +0000, Phil Yang (Arm Technology China)
> > wrote:
> > > > -----Original Message-----
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > Sent: Wednesday, November 27, 2019 1:02 AM
> > > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > > Cc: dev@dpdk.org; Bruce Richardson <bruce.richardson@intel.com>;
> > > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> > Nagarahalli
> > > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on
> > armhf
> > > > architercture
> > > >
> > > > 12/11/2019 07:40, Phil Yang (Arm Technology China):
> > > > > > -----Original Message-----
> > > > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > > Sent: Tuesday, November 12, 2019 2:03 PM
> > > > > > To: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>
> > > > > > Cc: Bruce Richardson <bruce.richardson@intel.com>; dev@dpdk.org;
> > > > > > david.marchand@redhat.com; jerinj@marvell.com; Honnappa
> > > > Nagarahalli
> > > > > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > > > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > > > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > > > > Subject: Re: [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error
> > on
> > > > armhf
> > > > > > architercture
> > > > > >
> > > > > > 12/11/2019 06:25, Phil Yang (Arm Technology China):
> > > > > > > From: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > > > On Mon, Nov 11, 2019 at 06:34:20PM +0800, Phil Yang wrote:
> > > > > > > > > The older version (e.g. version 7.4.0 ) of GNU C compiler for the
> > > > armhf
> > > > > > > > > architecture doesn't support the flag '-Wno-address-of-packed-
> > > > > > member',
> > > > > > > > > so remove this flag for aarch32.
> > > > > > > > >
> > > > > > > > > Fixes: a385972c3675 ("mk: disable warning for packed member
> > > > pointer")
> > > > > > > > > Cc: stable@dpdk.org
> > > > > > > > >
> > > > > > > > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > > > > > > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > > > > > > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > > > > > > > >
> > > > > > > > > ---
> > > > > > > > >  mk/toolchain/gcc/rte.vars.mk | 2 ++
> > > > > > > > >  1 file changed, 2 insertions(+)
> > > > > > > > >
> > > > > > > > > diff --git a/mk/toolchain/gcc/rte.vars.mk
> > > > > > b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > > index 9fc7041..ec0cbbf 100644
> > > > > > > > > --- a/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > > +++ b/mk/toolchain/gcc/rte.vars.mk
> > > > > > > > > @@ -100,7 +100,9 @@ WERROR_FLAGS += -Wno-format-
> > truncation
> > > > > > > > >  endif
> > > > > > > > >
> > > > > > > > >  # disable packed member unalign warnings
> > > > > > > > > +ifneq ($(CONFIG_RTE_ARCH_ARM), y)
> > > > > > > > >  WERROR_FLAGS += -Wno-address-of-packed-member
> > > > > > > > > +endif
> > > > > > > > >
> > > > > > > > You don't need to do this, as gcc will not complain about this
> > unknown
> > > > > > flag
> > > > > > > > unless you have other issues in your code.[1] I think it's better to
> > > > keep
> > > > > > the
> > > > > > > > code clean in this case, otherwise we'll have the code littered with
> > > > > > > > conditionals for various flags.
> > > > > > > >
> > > > > > > > /Bruce
> > > > > > > >
> > > > > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> > > > > > > > "When an unrecognized warning option is requested (e.g.,
> > > > > > > > -Wunknown-warning), GCC emits a diagnostic stating that the
> > option
> > > > is
> > > > > > not
> > > > > > > > recognized. However, if the -Wno- form is used, the behavior is
> > > > slightly
> > > > > > > > different: no diagnostic is produced for -Wno-unknown-warning
> > > > unless
> > > > > > other
> > > > > > > > diagnostics are being produced. This allows the use of new -Wno-
> > > > options
> > > > > > > > with old compilers, but if something goes wrong, the compiler
> > warns
> > > > that
> > > > > > an
> > > > > > > > unrecognized option is present."
> > > > > > >
> > > > > > > Thanks, Bruce.
> > > > > > >
> > > > > > > There are thousands of warnings with alignment when compiling for
> > > > > > ARMv7 (ARMv7 supports unaligned memory access).
> > > > > > > Without this new flag, the build system works fine for ARMv7.  So I
> > add
> > > > this
> > > > > > conditional for ARMv7 only.
> > > > > > > I agree with you we should clean up the code, but it needs a lot of
> > > > effort to
> > > > > > achieve that.
> > > > > > > This patch is going to make the ARMv7 target build successfully
> > during
> > > > this
> > > > > > period.
> > > > > >
> > > > > > I would go the opposite direction.
> > > > > > I think we should remove all warnings disablement like "-Wno-
> > > > something",
> > > > > > and clean the code.
> > > > >
> > > > > Thanks, Thomas.
> > > > >
> > > > > I think it is a compiler issue rather than a code defect in this case, as It
> > > > cannot recognize the '-Waddress-of-packed-member' flag.
> > > > > "arm-linux-gnueabihf-gcc: error: unrecognized command line option '-
> > > > Waddress-of-packed-member'"
> > > > >
> > > > > >
> > > > > > If you want to allow building ARMv7, you can just allow warnings as
> > not
> > > > > > errors.
> > > > > > So we will still see something is wrong but it won't prevent from
> > building.
> > > > >
> > > > > Yes. We did this already, all the alignment issues are emitted as
> > warnings
> > > > on ARMv7.
> > > > > Please see these two commits:
> > > > > 79fa5c2a9992 ("mk: ignore alignment errors for ARMv7")
> > > > > 6433c19105e8 ("mk: generalize strict alignment warning handling")
> > > >
> > > > I don't know what to do with this patch.
> > > > I think it is not how it should work,
> > > > but you say your compiler has a real bug.
> > > Agree with you, however I haven't found a better solution for this issue yet.
> > >
> > > >
> > > > Can you confirm which compiler is it?
> > >
> > > Please check the packet information dumped below, it is the latest version
> > in Ubuntu 18.04 LTS.
> > > $ sudo apt show gcc-arm-linux-gnueabihf
> > > Package: gcc-arm-linux-gnueabihf
> > > Version: 4:7.4.0-1ubuntu2.3
> > > Priority: optional
> > > Section: devel
> > > Source: gcc-defaults (1.176ubuntu2.3)
> > > Origin: Ubuntu
> > >
> > > > Does it prevent to compile even with -Wno-error ?
> > > Yes, it does. I put one piece of the compiling log bellow. Please take a look.
> > >
> > > $ make -j1 CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> > RTE_DEVEL_BUILD=y
> > 
> > RTE_DEVEL_BUILD turns on -Werror, while what Thomas is asking about is
> > using the opposite flag "-Wno-error". Can you do a non-developer build or
> > put "-Wno-error" in EXTRA_CFLAGS to test this.
> 
> Thanks, Bruce. 
> There is no compiling issue for the non-developer build and "-Wno-error" flag build.

Cool, so we can classify this patch as "rejected".




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
  2019-11-11 10:34 ` [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance Phil Yang
@ 2020-05-24 21:21   ` " Thomas Monjalon
  2020-05-25  3:20     ` Phil Yang
  2020-05-27  8:28   ` Ruifeng Wang
  1 sibling, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2020-05-24 21:21 UTC (permalink / raw)
  To: Phil Yang
  Cc: dev, david.marchand, jerinj, Honnappa.Nagarahalli, gavin.hu,
	joyce.kong, nd, stable

11/11/2019 11:34, Phil Yang:
> Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Tested-by: Joyce Kong <joyce.kong@arm.com>
> 
> ---
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36 ++++++++++++++++++----
>  1 file changed, 30 insertions(+), 6 deletions(-)

What is the status of this patch?
The patch 1/2 was rejected.
There are new works around aarch32.
Is it still relevant?




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
  2020-05-24 21:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2020-05-25  3:20     ` Phil Yang
  0 siblings, 0 replies; 16+ messages in thread
From: Phil Yang @ 2020-05-25  3:20 UTC (permalink / raw)
  To: thomas
  Cc: dev, david.marchand, jerinj, Honnappa Nagarahalli, Gavin Hu,
	Joyce Kong, nd, stable, Ruifeng Wang, nd

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, May 25, 2020 5:21 AM
> To: Phil Yang <Phil.Yang@arm.com>
> Cc: dev@dpdk.org; david.marchand@redhat.com; jerinj@marvell.com;
> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Gavin Hu
> <Gavin.Hu@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> <nd@arm.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> 
> 11/11/2019 11:34, Phil Yang:
> > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > Tested-by: Joyce Kong <joyce.kong@arm.com>
> >
> > ---
> >  .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36
> ++++++++++++++++++----
> >  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> What is the status of this patch?
> The patch 1/2 was rejected.
> There are new works around aarch32.
> Is it still relevant?

Thank you for your kindly reminder.
Yes. It is relevant.

This document is intended to guide the user to cross-compile aarch32 DPDK. 
Usually the cross-compile host is x86, but cross-compiling on aarch64 is convenient as well, but not everyone knows how to do it. 
So it is helpful to provide relevant reference documents.

Thanks,
Phil

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
  2019-11-11 10:34 ` [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance Phil Yang
  2020-05-24 21:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2020-05-27  8:28   ` Ruifeng Wang
  2020-07-02  5:37     ` Phil Yang
  1 sibling, 1 reply; 16+ messages in thread
From: Ruifeng Wang @ 2020-05-27  8:28 UTC (permalink / raw)
  To: Phil Yang, dev
  Cc: thomas, david.marchand, jerinj, Honnappa Nagarahalli, Joyce Kong,
	nd, stable


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> Sent: Monday, November 11, 2019 6:34 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> 
> Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Tested-by: Joyce Kong <joyce.kong@arm.com>
> 
> ---
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36
> ++++++++++++++++++----
>  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> index e799b0b..409d444 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -1,15 +1,15 @@
>  ..  SPDX-License-Identifier: BSD-3-Clause
>      Copyright(c) 2018 ARM Corporation.
> 
> -Cross compile DPDK for ARM64
> -============================
> -This chapter describes how to cross compile DPDK for ARM64 from x86 build
> hosts.
> +Cross compile DPDK for aarch64 and aarch32
> +==========================================
> +This chapter describes how to cross-compile DPDK for aarch64 from x86 and
> compile 32-bit aarch32 DPDK from aarch64 build hosts.
> 
>  .. note::
> 
> -   Whilst it is recommended to natively build DPDK on ARM64 (just
> -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> -   ARM64 cross compile GNU toolchain is used for this.
> +   Whilst it is recommended to natively build DPDK on aarch64 (just
> +   like with x86), it is also possible to cross-build DPDK for aarch64. An
> +   aarch64 cross compile GNU toolchain is used for this.
> 
>  Obtain the cross tool chain
>  ---------------------------
> @@ -133,3 +133,27 @@ command::
> 
>  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
>  	ninja -C arm64-build
> +
> +Compiling DPDK for aarch32/armv7 on aarch64 host
> +------------------------------------------
> +
> +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> +applications and the legacy 32-bit armv7 applications can run in this mode.
> +With the GNU C compiler for the armhf architecture toolchain
> +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64 natively.
> +
> +For Example, in 64-bit Debian, we can use the following command to build
> 32-bit armv7 DPDK on aarch64 natively:
> +
> +Install cross compile toolchain for the armhf architecure.
> +command::
> +
> +	dpkg --add-architecture armhf
> +	apt-get update
> +	apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> +binutils
> +
> +Build DPDK arm-armv7a-linuxapp-gcc executables.
> +command::
> +
> +	cd <dpdk_folder>
> +	make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> gcc
> +	make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> +RTE_DEVEL_BUILD=n
> --
> 2.7.4

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
  2020-05-27  8:28   ` Ruifeng Wang
@ 2020-07-02  5:37     ` Phil Yang
  2020-07-02  8:01       ` Jerin Jacob
  0 siblings, 1 reply; 16+ messages in thread
From: Phil Yang @ 2020-07-02  5:37 UTC (permalink / raw)
  To: jerinj, dev
  Cc: thomas, david.marchand, Ruifeng Wang, Honnappa Nagarahalli,
	Joyce Kong, nd, stable

Hi Jerin,

Your insight would be much appreciated.

Thanks,
Phil

> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Wednesday, May 27, 2020 4:29 PM
> To: Phil Yang <Phil.Yang@arm.com>; dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> <nd@arm.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> > Sent: Monday, November 11, 2019 6:34 PM
> > To: dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> >
> > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > Tested-by: Joyce Kong <joyce.kong@arm.com>
> >
> > ---
> >  .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36
> > ++++++++++++++++++----
> >  1 file changed, 30 insertions(+), 6 deletions(-)
> >
> > diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > index e799b0b..409d444 100644
> > --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > @@ -1,15 +1,15 @@
> >  ..  SPDX-License-Identifier: BSD-3-Clause
> >      Copyright(c) 2018 ARM Corporation.
> >
> > -Cross compile DPDK for ARM64
> > -============================
> > -This chapter describes how to cross compile DPDK for ARM64 from x86
> build
> > hosts.
> > +Cross compile DPDK for aarch64 and aarch32
> > +==========================================
> > +This chapter describes how to cross-compile DPDK for aarch64 from x86
> and
> > compile 32-bit aarch32 DPDK from aarch64 build hosts.
> >
> >  .. note::
> >
> > -   Whilst it is recommended to natively build DPDK on ARM64 (just
> > -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> > -   ARM64 cross compile GNU toolchain is used for this.
> > +   Whilst it is recommended to natively build DPDK on aarch64 (just
> > +   like with x86), it is also possible to cross-build DPDK for aarch64. An
> > +   aarch64 cross compile GNU toolchain is used for this.
> >
> >  Obtain the cross tool chain
> >  ---------------------------
> > @@ -133,3 +133,27 @@ command::
> >
> >  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> >  	ninja -C arm64-build
> > +
> > +Compiling DPDK for aarch32/armv7 on aarch64 host
> > +------------------------------------------
> > +
> > +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> > +applications and the legacy 32-bit armv7 applications can run in this mode.
> > +With the GNU C compiler for the armhf architecture toolchain
> > +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64
> natively.
> > +
> > +For Example, in 64-bit Debian, we can use the following command to build
> > 32-bit armv7 DPDK on aarch64 natively:
> > +
> > +Install cross compile toolchain for the armhf architecure.
> > +command::
> > +
> > +	dpkg --add-architecture armhf
> > +	apt-get update
> > +	apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> > +binutils
> > +
> > +Build DPDK arm-armv7a-linuxapp-gcc executables.
> > +command::
> > +
> > +	cd <dpdk_folder>
> > +	make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> > gcc
> > +	make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> > +RTE_DEVEL_BUILD=n
> > --
> > 2.7.4
> 
> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
  2020-07-02  5:37     ` Phil Yang
@ 2020-07-02  8:01       ` Jerin Jacob
  0 siblings, 0 replies; 16+ messages in thread
From: Jerin Jacob @ 2020-07-02  8:01 UTC (permalink / raw)
  To: Phil Yang
  Cc: jerinj, dev, thomas, david.marchand, Ruifeng Wang,
	Honnappa Nagarahalli, Joyce Kong, nd, stable

On Thu, Jul 2, 2020 at 11:07 AM Phil Yang <Phil.Yang@arm.com> wrote:
>
> Hi Jerin,
>
> Your insight would be much appreciated.
>
> Thanks,
> Phil
>
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Wednesday, May 27, 2020 4:29 PM
> > To: Phil Yang <Phil.Yang@arm.com>; dev@dpdk.org
> > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > jerinj@marvell.com; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; Joyce Kong <Joyce.Kong@arm.com>; nd
> > <nd@arm.com>; stable@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> >
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces@dpdk.org> On Behalf Of Phil Yang
> > > Sent: Monday, November 11, 2019 6:34 PM
> > > To: dev@dpdk.org
> > > Cc: thomas@monjalon.net; david.marchand@redhat.com;
> > > jerinj@marvell.com; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology China)
> > > <Gavin.Hu@arm.com>; Joyce Kong (Arm Technology China)
> > > <Joyce.Kong@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> > > Subject: [dpdk-dev] [PATCH 2/2] doc: add aarch32 build guidance
> > >
> > > Add a guidance for aarch64 natively build 32-bit aarch32 DPDK.
> > >
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > > Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> > > Tested-by: Joyce Kong <joyce.kong@arm.com>
> > >
> > > ---
> > >  .../linux_gsg/cross_build_dpdk_for_arm64.rst       | 36
> > > ++++++++++++++++++----
> > >  1 file changed, 30 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > > b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > > index e799b0b..409d444 100644
> > > --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > > +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > > @@ -1,15 +1,15 @@
> > >  ..  SPDX-License-Identifier: BSD-3-Clause
> > >      Copyright(c) 2018 ARM Corporation.
> > >
> > > -Cross compile DPDK for ARM64
> > > -============================
> > > -This chapter describes how to cross compile DPDK for ARM64 from x86
> > build
> > > hosts.
> > > +Cross compile DPDK for aarch64 and aarch32
> > > +==========================================
> > > +This chapter describes how to cross-compile DPDK for aarch64 from x86
> > and
> > > compile 32-bit aarch32 DPDK from aarch64 build hosts.
> > >
> > >  .. note::
> > >
> > > -   Whilst it is recommended to natively build DPDK on ARM64 (just
> > > -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> > > -   ARM64 cross compile GNU toolchain is used for this.
> > > +   Whilst it is recommended to natively build DPDK on aarch64 (just
> > > +   like with x86), it is also possible to cross-build DPDK for aarch64. An
> > > +   aarch64 cross compile GNU toolchain is used for this.
> > >
> > >  Obtain the cross tool chain
> > >  ---------------------------
> > > @@ -133,3 +133,27 @@ command::
> > >
> > >     meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> > >     ninja -C arm64-build
> > > +
> > > +Compiling DPDK for aarch32/armv7 on aarch64 host
> > > +------------------------------------------
> > > +
> > > +Some aarch64 platforms support EL0 aarch32 mode, so the 32-bit aarch32
> > > +applications and the legacy 32-bit armv7 applications can run in this mode.
> > > +With the GNU C compiler for the armhf architecture toolchain
> > > +gcc-arm-linux-gnueabihf, it can generate aarch32 binary on aarch64
> > natively.
> > > +
> > > +For Example, in 64-bit Debian, we can use the following command to build

I think, "we" usage should be removed from the doc.

> > > 32-bit armv7 DPDK on aarch64 natively:
> > > +
> > > +Install cross compile toolchain for the armhf architecure.
> > > +command::
> > > +
> > > +   dpkg --add-architecture armhf
> > > +   apt-get update
> > > +   apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> > > +binutils
> > > +
> > > +Build DPDK arm-armv7a-linuxapp-gcc executables.
> > > +command::
> > > +
> > > +   cd <dpdk_folder>
> > > +   make config CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-
> > > gcc
> > > +   make -j CROSS=arm-linux-gnueabihf- T=arm-armv7a-linuxapp-gcc
> > > +RTE_DEVEL_BUILD=n

make based build is deprecated, Please change this to meson.

The rest looks good to me.


> > > --
> > > 2.7.4
> >
> > Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, back to index

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 10:34 [dpdk-stable] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Phil Yang
2019-11-11 10:34 ` [dpdk-stable] [PATCH 2/2] doc: add aarch32 build guidance Phil Yang
2020-05-24 21:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2020-05-25  3:20     ` Phil Yang
2020-05-27  8:28   ` Ruifeng Wang
2020-07-02  5:37     ` Phil Yang
2020-07-02  8:01       ` Jerin Jacob
2019-11-11 10:47 ` [dpdk-stable] [dpdk-dev] [PATCH 1/2] mk: fix unsupported flag error on armhf architercture Bruce Richardson
2019-11-12  5:25   ` Phil Yang (Arm Technology China)
2019-11-12  6:03     ` Thomas Monjalon
2019-11-12  6:40       ` Phil Yang (Arm Technology China)
2019-11-26 17:01         ` Thomas Monjalon
2019-11-27  8:09           ` Phil Yang (Arm Technology China)
2019-11-27  9:29             ` Bruce Richardson
2019-11-27 10:00               ` Phil Yang (Arm Technology China)
2019-11-27 10:32                 ` Thomas Monjalon

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox