[dpdk-dev] [RFC PATCH] build/pkg-config: remove machine arch flag
Ruifeng Wang
Ruifeng.Wang at arm.com
Thu Sep 16 16:11:33 CEST 2021
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Ruifeng Wang
> Sent: Thursday, September 16, 2021 6:17 PM
> To: Jerin Jacob <jerinjacobk at gmail.com>; David Christensen
> <drc at linux.vnet.ibm.com>
> Cc: Bruce Richardson <bruce.richardson at intel.com>; dpdk-dev
> <dev at dpdk.org>; Luca Boccassi <bluca at debian.org>; David Marchand
> <david.marchand at redhat.com>; ian.stokes at intel.com; Ilya Maximets
> <i.maximets at ovn.org>; jerinj at marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; Ferruh Yigit <ferruh.yigit at intel.com>; nd
> <nd at arm.com>
> Subject: Re: [dpdk-dev] [RFC PATCH] build/pkg-config: remove machine arch
> flag
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjacobk at gmail.com>
> > Sent: Thursday, September 16, 2021 11:43 AM
> > To: David Christensen <drc at linux.vnet.ibm.com>
> > Cc: Bruce Richardson <bruce.richardson at intel.com>; dpdk-dev
> > <dev at dpdk.org>; Luca Boccassi <bluca at debian.org>; David Marchand
> > <david.marchand at redhat.com>; ian.stokes at intel.com; Ilya Maximets
> > <i.maximets at ovn.org>; jerinj at marvell.com; Ruifeng Wang
> > <Ruifeng.Wang at arm.com>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli at arm.com>; Ananyev, Konstantin
> > <konstantin.ananyev at intel.com>; Ferruh Yigit <ferruh.yigit at intel.com>
> > Subject: Re: [dpdk-dev] [RFC PATCH] build/pkg-config: remove machine
> > arch flag
> >
> > On Thu, Sep 16, 2021 at 2:53 AM David Christensen
> > <drc at linux.vnet.ibm.com>
> > wrote:
> > >
> > >
> > >
> > > On 9/15/21 9:28 AM, Bruce Richardson wrote:
> > > > On Fri, Dec 11, 2020 at 03:51:11PM +0000, Bruce Richardson wrote:
> > > >> Traditionally any apps built using DPDK had to support the same
> > > >> instruction sets as supported when the DPDK SDK itself was built,
> > > >> since that was "leaked" through to the end-app and DPDK headers
> > > >> via
> > > >> RTE_MACHINE_CPUFLAG_* values. Therefore, when converting over
> to
> > > >> meson for app build correctness the "-march=" flag was included
> > > >> in the pkg-config cflags output.
> > > >>
> > > >> However, since the DPDK-specific CPU flags are now obsolete, and
> > > >> we instead check directly for compiler-defined flags, we should
> > > >> no longer need to force the exact same architecture match in all
> > > >> cases. To faciliate such flexibility, a new
> > > >> pkg_config_machine_args array - which defaults to the existing
> > > >> machine_args array has been defined. The individual architectures
> > > >> - x86, arm and ppc - can choose if and how to override this value
> themselves.
> > > >>
> > > >> For x86, since SSE4.2 is the minimum instruction-set level needed
> > > >> to run DPDK, and since some header files assume that minimum
> > > >> level of instruction set support, we override the "-march=" value
> > > >> with "-
> > msse4"
> > > >> for the pkg-config file. This allows end applications to set
> > > >> their own "march" value while still ensuring valid DPDK compilation.
> > > >>
> > > >> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > > >> ---
> > > >>
> > > >> CC: Jerin Jacob <jerinj at marvell.com>
> > > >> CC: Ruifeng Wang <ruifeng.wang at arm.com>
> > > >> CC: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > > >> CC: David Christensen <drc at linux.vnet.ibm.com> for Feedback
> > > >> requested from ARM and PPC maintainers as to this change and what
> > > >> flags, if any, need to be in the .pc file for DPDK on such
> > > >> platforms. For example - is setting 'pkg_config_machine_args' to
> > > >> 'machine_args' by default necessary behaviour?
> > > >>
> > > >
> > > > Ping for further thoughts or input on this patch.
> >
> > Armv8 has dedicated config(taken least cpu flags which supports all
> > armv8) for this purpose config/arm/arm64_armv8_linux_gcc.
> > So this change looks good to me. @Ruifeng Wang (Arm Technology China)
> > Any comments?
> >
>
> Agree. For distro build, only armv8-a is requested. The change looks fine.
This is fine if "cross-file" is provided when doing distro build.
However, when "-Dmachine=default"/"-Dplatform=default" is used instead of "cross-file" to do distro build, current change in config/meson.build
will lead to " pkg_config_machine_args = -march=generic". This is because generic build is handled by subsequent arch specific config on Arm.
I think moving the change in config/meson.build down below line #307 subdir(arch_subdir) will address aforementioned issue. As by the time,
machine_args has been updated with proper value.
>
> Thanks,
> Ruifeng
> >
> > >
> > > On initial inspection I don't see any additional value for PPC systems.
> > > Selection of a CPU through -mcpu implies a full ISA for that CPU,
> > > including things like vector extensions, at least with respect to
> > > the minimum supported POWER8 CPU (ISA 2.07) and later ISAs. The
> > > values of machine_args and pkg_config_machine_args should be
> > > identical in all cases I can think of.
> > >
> > > If a third party OpenPOWER CPU comes along some time in the future
> > > then the requirements may change.
> >
> >
> >
> >
> > >
> > > Dave
More information about the dev
mailing list