mbox series

[v15,00/12] Arm build options rework

Message ID 1610717170-31279-1-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
Headers
Series Arm build options rework |

Message

Juraj Linkeš Jan. 15, 2021, 1:25 p.m. UTC
  The current way of specifying Arm configuration options is insufficient
since we can't identify the SoC we're building for from the MIDR
information. For example, we can't distinguish between N1SDP, Graviton2
or Ampere Altra.

Add a way to specify the cpu count and numa node count for cross builds
and aarch64 -> aarch64 (SoC) builds.

We also want to be able to disable which drivers (and possibly
libraries) are built without user input. This is useful when building:
1. on an SoC that is slow and we want to build only what is necessary
  without the user having to check which libraries they have installed
2. a cross build on a fast aarch64 machine but with target SoC which
  differs in capabilities or libraries.
This is achieved by specifying the drivers in SoC configuration.

Among libraries, only libnuma can be now disabled.

Also add an optional way to discover cpu count a numa node count. Fix
-Dmax_lcores and -Dmax_numa_nodes for arm builds.

The current implementation adds/supports the following:
* x86 -> aarch64 cross build with added config options/disabled
  drivers/libs
* aarch64 -> aarch64 builds for a different SoCs using meson -Darm_soc
  option or using a cross file
* max numa nodes and max lcore may be specified on the command line to
  overwrite the values for any (native, SoC or cross) build

v2:
Major rework of the whole series.

v3:
Added numa and core count defaults for x86 default build.
Removed numa and core count defaults. Now requiring defaults to be
specified in a cross file or on the cmdline.
Added FreeBDS support for numa count discovery.

v4:
Make automatic numa and cpu counts discovery optional.

v5:
Split the refactor patch into smaller patches.
Simplify buildtools/get_numa_count.py.
Add more explanation to cover letter.

v6:
Apply cross file options arch agnostically, not just in Arm cross
builds.
Streamline Arm build setup and machine args: always use native args in
native builds, require implementer ID and part number for cross builds.

v7:
Arm config options are now organized in one dictionary.
Removed unsupported implementers and removed fallback to generic
implementer/part number for unknown implementer/part number.
Added meson config option arm_soc which can be used to specify
configuration to be used, useful for aarch64 -> aarch64 builds.

v8:
Rebase.

v9:
Split SoC and implementer dictionaries into smaller parts.
Fixed DPAA and ARMADA SoC configuration.
Added documentation about supported SoCs.

v10:
Added a commit that fixes Graviton2 clang build failures in native
build.

v11:
Rebase.

v12:
Fixed dpaa and armada cross builds in generic build commit.

v13:
Removed two commits which were not arm-specific:
1. build: alias default build as generic
2. build: optional NUMA and cpu counts detection
Also minor adjustments to commit messages in:
1. build: isolate configuration for Arm generic build
2. build: disable drivers in Arm builds

v14:
Resent for retesting (because of suspected false negative).

v15:
Fixed 'check_libnuma' var in build: disable libnuma in cross builds.
Removed duplicate configs. Updated n1sdp cores to 80.


Series Acked-by: Jerin Jacob <jerinj@marvell.com>
Series Tested-by: Jerin Jacob <jerinj@marvell.com>
Series Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Series Tested-by: Vimal Chungath <vcchunga@amazon.com>
Series Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Juraj Linkeš (12):
  build: rename Arm build variables
  build: remove unused or superfluous variables
  build: reformat and move Arm config and comments
  build: simplify how Arm flags are processed
  build: organize Arm config into dict
  build: isolate configuration for Arm generic build
  build: use native machine args in Arm native build
  build: add core and NUMA counts to cross files
  build: disable drivers in Arm builds
  build: disable libnuma in cross builds
  build: add Arm SoC meson option
  config: fix Arm implementer and its SoCs

 config/arm/arm64_armada_linux_gcc             |   2 +-
 config/arm/arm64_armv8_linux_gcc              |  15 +-
 config/arm/arm64_bluefield_linux_gcc          |   3 +-
 config/arm/arm64_dpaa_linux_gcc               |   2 +-
 config/arm/arm64_emag_linux_gcc               |   2 +-
 config/arm/arm64_graviton2_linux_gcc          |   3 +-
 config/arm/arm64_n1sdp_linux_gcc              |   3 +-
 config/arm/arm64_n2_linux_gcc                 |   3 +-
 config/arm/arm64_octeontx2_linux_gcc          |   3 +-
 config/arm/arm64_stingray_linux_gcc           |   3 +-
 config/arm/arm64_thunderx2_linux_gcc          |   3 +-
 ..._linux_gcc => arm64_thunderxt88_linux_gcc} |   2 +-
 config/arm/meson.build                        | 522 ++++++++++++------
 config/meson.build                            |  34 +-
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  |  30 +
 drivers/meson.build                           |   6 +-
 meson.build                                   |   1 +
 meson_options.txt                             |   2 +
 18 files changed, 425 insertions(+), 214 deletions(-)
 rename config/arm/{arm64_thunderx_linux_gcc => arm64_thunderxt88_linux_gcc} (92%)
  

Comments

Thomas Monjalon Jan. 18, 2021, 9:31 p.m. UTC | #1
15/01/2021 14:25, Juraj Linkeš:
>   build: rename Arm build variables
>   build: remove unused or superfluous variables
>   build: reformat and move Arm config and comments
>   build: simplify how Arm flags are processed
>   build: organize Arm config into dict
>   build: isolate configuration for Arm generic build
>   build: use native machine args in Arm native build
>   build: add core and NUMA counts to cross files
>   build: disable libnuma in cross builds

These patches look good, thanks for the work.

I consider these patches (9, 11, 12) need more review or rework:

>   build: disable drivers in Arm builds
>   build: add Arm SoC meson option
>   config: fix Arm implementer and its SoCs

I've decided to partially apply the series to have progress in 21.02-rc1.
Please let's continue with these three patches during -rc2.
  
Juraj Linkeš Jan. 19, 2021, 3:10 p.m. UTC | #2
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, January 18, 2021 10:31 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; Ruifeng.Wang@arm.com;
> Honnappa.Nagarahalli@arm.com; Phil.Yang@arm.com;
> vcchunga@amazon.com; Dharmik.Thakkar@arm.com; jerinjacobk@gmail.com;
> hemant.agrawal@nxp.com; ajit.khaparde@broadcom.com;
> ferruh.yigit@intel.com; aboyer@pensando.io; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v15 00/12] Arm build options rework
> 
> 15/01/2021 14:25, Juraj Linkeš:
> >   build: rename Arm build variables
> >   build: remove unused or superfluous variables
> >   build: reformat and move Arm config and comments
> >   build: simplify how Arm flags are processed
> >   build: organize Arm config into dict
> >   build: isolate configuration for Arm generic build
> >   build: use native machine args in Arm native build
> >   build: add core and NUMA counts to cross files
> >   build: disable libnuma in cross builds
> 
> These patches look good, thanks for the work.
> 

Thanks, Thomas, this will simplify the review.

> I consider these patches (9, 11, 12) need more review or rework:
> 
> >   build: disable drivers in Arm builds
> >   build: add Arm SoC meson option
> >   config: fix Arm implementer and its SoCs
> 
> I've decided to partially apply the series to have progress in 21.02-rc1.
> Please let's continue with these three patches during -rc2.
> 
> 

Should I submit new version as continuation of this series or should these three patches constitute a new series?
  
Thomas Monjalon Jan. 19, 2021, 3:53 p.m. UTC | #3
19/01/2021 16:10, Juraj Linkeš:
> From: Thomas Monjalon <thomas@monjalon.net>
> > I consider these patches (9, 11, 12) need more review or rework:
> > 
> > >   build: disable drivers in Arm builds
> > >   build: add Arm SoC meson option
> > >   config: fix Arm implementer and its SoCs
> > 
> > I've decided to partially apply the series to have progress in 21.02-rc1.
> > Please let's continue with these three patches during -rc2.
> 
> Should I submit new version as continuation of this series or should these three patches constitute a new series?

Continuing the series may help tracking the history.