This patch series adds Travis gcc compilation jobs for ppc64le. Limitations for ppc64le are similar to arm64 (see commit 31bb45bcfd). 1. Only gcc builds are supported on ppc64le. 2. A container is used, therefor Huge pages are not available. Unit tests are not run, a single test (test-null) using the no-huge option is run. V2: Insures iova-mode is VA when --no-huge is selected. Removed setting of --iova-mode=VA in test-null.sh. A Travis build with theses patches can be found here: https://travis-ci.org/djlwilder/dpdk/builds/652238523 David Wilder (3): eal/linux: select iova-mode va with no-huge option devtools: allow test-null.sh to run on ppc64le ci: add travis ci support for native ppc64le .travis.yml | 30 ++++++++++++++++++++++++++++++ devtools/test-null.sh | 2 +- lib/librte_eal/linux/eal/eal.c | 14 ++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) -- 2.25.0
If --no-huge is set and iova-mode has not been specified force VA mode. If --no-huge and --iova-mode=PA is requested error out as this is an impossible configuration. Signed-off-by: David Wilder <dwilder@us.ibm.com> --- lib/librte_eal/linux/eal/eal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index 9530ee55f..d3a0a1731 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -1062,9 +1062,16 @@ rte_eal_init(int argc, char **argv) /* if no EAL option "--iova-mode=<pa|va>", use bus IOVA scheme */ if (internal_config.iova_mode == RTE_IOVA_DC) { + /* autodetect the IOVA mapping mode */ enum rte_iova_mode iova_mode = rte_bus_get_iommu_class(); + if (iova_mode == RTE_IOVA_PA && !rte_eal_has_hugepages()) { + iova_mode = RTE_IOVA_VA; + RTE_LOG(WARNING, EAL, "Some buses want 'PA' but forcing 'VA' because --no-huge is requested.\n"); + RTE_LOG(WARNING, EAL, "Not all buses may be able to initialize.\n"); + } + if (iova_mode == RTE_IOVA_DC) { RTE_LOG(DEBUG, EAL, "Buses did not request a specific IOVA mode.\n"); @@ -1111,6 +1118,13 @@ rte_eal_init(int argc, char **argv) internal_config.iova_mode; } + if (rte_eal_iova_mode() == RTE_IOVA_PA && + rte_eal_has_hugepages() == 0) { + rte_eal_init_alert("Cannot use IOVA as 'PA' with --no-huge"); + rte_errno = EINVAL; + return -1; + } + if (rte_eal_iova_mode() == RTE_IOVA_PA && !phys_addrs) { rte_eal_init_alert("Cannot use IOVA as 'PA' since physical addresses are not available"); rte_errno = EINVAL; -- 2.25.0
Memory requirements are larger for ppc64le due to a higher RTE_MAX_LCORE value. Signed-off-by: David Wilder <dwilder@us.ibm.com> Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> --- devtools/test-null.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/test-null.sh b/devtools/test-null.sh index 548de8113..b7defe1fd 100755 --- a/devtools/test-null.sh +++ b/devtools/test-null.sh @@ -27,6 +27,6 @@ else fi (sleep 1 && echo stop) | -$testpmd -c $coremask --no-huge -m 20 \ +$testpmd -c $coremask --no-huge -m 30 \ $libs -w 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \ --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia -- 2.25.0
This change follows the example of aarch64 Travis support by adding support for ppc64le gcc builds. Limitations for ppc64le are the same as aarch64 as described in commit 31bb45bcfd. Signed-off-by: David Wilder <dwilder@us.ibm.com> Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1d43f16ae..c15bf4f07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -153,5 +153,35 @@ matrix: packages: - *extra_packages - *libabigail_build_packages + - env: DEF_LIB="static" + arch: ppc64le + compiler: gcc + addons: + apt: + packages: + - *required_packages + - env: DEF_LIB="shared" + arch: ppc64le + compiler: gcc + addons: + apt: + packages: + - *required_packages + - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1 + arch: ppc64le + compiler: gcc + addons: + apt: + packages: + - *required_packages + - *doc_packages + - env: DEF_LIB="shared" EXTRA_PACKAGES=1 ABI_CHECKS=1 + arch: ppc64le + compiler: gcc + addons: + apt: + packages: + - *extra_packages + - *libabigail_build_packages script: ./.ci/${TRAVIS_OS_NAME}-build.sh -- 2.25.0
19/02/2020 02:10, David Wilder: > This change follows the example of aarch64 Travis support > by adding support for ppc64le gcc builds. Limitations for > ppc64le are the same as aarch64 as described in commit > 31bb45bcfd. > > Signed-off-by: David Wilder <dwilder@us.ibm.com> > Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> > --- > --- a/.travis.yml > +++ b/.travis.yml > + - env: DEF_LIB="static" > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages > + - env: DEF_LIB="shared" > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages > + - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1 kmods are already disabled by default. > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages > + - *doc_packages Why testing without EXTRA_PACKAGES? > + - env: DEF_LIB="shared" EXTRA_PACKAGES=1 ABI_CHECKS=1 > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *extra_packages > + - *libabigail_build_packages
On Wed, Feb 19, 2020 at 2:10 AM David Wilder <dwilder@us.ibm.com> wrote: > > This change follows the example of aarch64 Travis support > by adding support for ppc64le gcc builds. Limitations for > ppc64le are the same as aarch64 as described in commit > 31bb45bcfd. checkpatch did not catch it because of the \n (?). When referring to other commits, please use the format 'commit <12+ chars of sha1> ("<title line>")'. > > Signed-off-by: David Wilder <dwilder@us.ibm.com> > Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> I can see no clang compilation. Is it unsupported? forgotten? unwanted? > --- > .travis.yml | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/.travis.yml b/.travis.yml > index 1d43f16ae..c15bf4f07 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -153,5 +153,35 @@ matrix: > packages: > - *extra_packages > - *libabigail_build_packages > + - env: DEF_LIB="static" > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages Copy/pasting this part is useless. The addons: global node would make all jobs use this required_packages as a default. I have a patch cleaning this for arm. > + - env: DEF_LIB="shared" > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages > + - env: DEF_LIB="shared" OPTS="-Denable_kmods=false" BUILD_DOCS=1 > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *required_packages > + - *doc_packages > + - env: DEF_LIB="shared" EXTRA_PACKAGES=1 ABI_CHECKS=1 > + arch: ppc64le > + compiler: gcc > + addons: > + apt: > + packages: > + - *extra_packages > + - *libabigail_build_packages > > script: ./.ci/${TRAVIS_OS_NAME}-build.sh > -- > 2.25.0 > -- David Marchand
On 2020-02-19 05:46, David Marchand wrote: > On Wed, Feb 19, 2020 at 2:10 AM David Wilder <dwilder@us.ibm.com> > wrote: >> >> This change follows the example of aarch64 Travis support >> by adding support for ppc64le gcc builds. Limitations for >> ppc64le are the same as aarch64 as described in commit >> 31bb45bcfd. > > checkpatch did not catch it because of the \n (?). > When referring to other commits, please use the format 'commit <12+ > chars of sha1> ("<title line>")'. > Ok > >> >> Signed-off-by: David Wilder <dwilder@us.ibm.com> >> Reviewed-by: David Christensen <drc@linux.vnet.ibm.com> > > I can see no clang compilation. > Is it unsupported? forgotten? unwanted? > Unsupported for now (issues with altivec). > >> --- >> .travis.yml | 30 ++++++++++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) >> >> diff --git a/.travis.yml b/.travis.yml >> index 1d43f16ae..c15bf4f07 100644 >> --- a/.travis.yml >> +++ b/.travis.yml >> @@ -153,5 +153,35 @@ matrix: >> packages: >> - *extra_packages >> - *libabigail_build_packages >> + - env: DEF_LIB="static" >> + arch: ppc64le >> + compiler: gcc >> + addons: >> + apt: >> + packages: >> + - *required_packages > > Copy/pasting this part is useless. > The addons: global node would make all jobs use this required_packages > as a default. > I have a patch cleaning this for arm. I see your cleanup patch now. I will refactor the ppc support on top and let you know if I have issues. Thanks for the review.