- * [dpdk-dev] [PATCH v4 1/4] eal/linux: force iova-mode va with no-huge option
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
@ 2020-04-02 17:12 ` David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 2/4] devtools: allow test-null.sh to run on ppc64le David Wilder
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: David Wilder @ 2020-04-02 17:12 UTC (permalink / raw)
  To: aconole, maicolgabriel, thomas, ferruh.yigit, arybchenko
  Cc: dev, ruifeng.wang, david.marchand, drc, jerinjacobk, wilder
When using --no-huge option the iova-mode must be VA.
Physical address are not guaranteed to be persistent with out
hugepages. This change effectively makes "--no-huge" the same as
"--no-huge --iova-mode=va".  When --no-huge is used setting --iova-mode=pa
will have no effect.
Signed-off-by: David Wilder <dwilder@us.ibm.com>
---
 lib/librte_eal/linux/eal.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 9530ee55f..44e950f9c 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1060,6 +1060,11 @@ rte_eal_init(int argc, char **argv)
 
 	phys_addrs = rte_eal_using_phys_addrs() != 0;
 
+	if (!phys_addrs) {
+		internal_config.iova_mode = RTE_IOVA_VA;
+		RTE_LOG(INFO, EAL, "Physical addresses are unavailable, selecting IOVA as VA mode.\n");
+	}
+
 	/* 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 */
@@ -1068,18 +1073,7 @@ rte_eal_init(int argc, char **argv)
 		if (iova_mode == RTE_IOVA_DC) {
 			RTE_LOG(DEBUG, EAL, "Buses did not request a specific IOVA mode.\n");
 
-			if (!phys_addrs) {
-				/* if we have no access to physical addresses,
-				 * pick IOVA as VA mode.
-				 */
-				iova_mode = RTE_IOVA_VA;
-				RTE_LOG(DEBUG, EAL, "Physical addresses are unavailable, selecting IOVA as VA mode.\n");
-#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
-			} else if (rte_eal_check_module("rte_kni") == 1) {
-				iova_mode = RTE_IOVA_PA;
-				RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI perfomance.\n");
-#endif
-			} else if (is_iommu_enabled()) {
+			if (is_iommu_enabled()) {
 				/* we have an IOMMU, pick IOVA as VA mode */
 				iova_mode = RTE_IOVA_VA;
 				RTE_LOG(DEBUG, EAL, "IOMMU is available, selecting IOVA as VA mode.\n");
@@ -1090,6 +1084,12 @@ rte_eal_init(int argc, char **argv)
 				iova_mode = RTE_IOVA_PA;
 				RTE_LOG(DEBUG, EAL, "IOMMU is not available, selecting IOVA as PA mode.\n");
 			}
+#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
+			if (rte_eal_check_module("rte_kni") == 1) {
+				iova_mode = RTE_IOVA_PA;
+				RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI perfomance.\n");
+			}
+#endif
 		}
 #if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
 		/* Workaround for KNI which requires physical address to work
-- 
2.25.0
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * [dpdk-dev] [PATCH v4 2/4] devtools: allow test-null.sh to run on ppc64le
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 1/4] eal/linux: force iova-mode va with no-huge option David Wilder
@ 2020-04-02 17:12 ` David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 3/4] ci: add travis ci support for native ppc64le David Wilder
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: David Wilder @ 2020-04-02 17:12 UTC (permalink / raw)
  To: aconole, maicolgabriel, thomas, ferruh.yigit, arybchenko
  Cc: dev, ruifeng.wang, david.marchand, drc, jerinjacobk, wilder
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
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * [dpdk-dev] [PATCH v4 3/4] ci: add travis ci support for native ppc64le
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 1/4] eal/linux: force iova-mode va with no-huge option David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 2/4] devtools: allow test-null.sh to run on ppc64le David Wilder
@ 2020-04-02 17:12 ` David Wilder
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 4/4] ci: enable unit test for ppc64le David Wilder
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: David Wilder @ 2020-04-02 17:12 UTC (permalink / raw)
  To: aconole, maicolgabriel, thomas, ferruh.yigit, arybchenko
  Cc: dev, ruifeng.wang, david.marchand, drc, jerinjacobk, 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 31bb45bcfdf5 ("ci: add travis ci support for native aarch64").
Signed-off-by: David Wilder <dwilder@us.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
---
 .travis.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index fd4f79cfc..2afb80e46 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -131,3 +131,23 @@ jobs:
   - env: DEF_LIB="shared" RUN_TESTS=1
     arch: arm64
     compiler: clang
+  # ppc64le gcc jobs
+  - env: DEF_LIB="static"
+    arch: ppc64le
+    compiler: gcc
+  - env: DEF_LIB="shared" BUILD_DOCS=1
+    arch: ppc64le
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *required_packages
+          - *doc_packages
+  - env: DEF_LIB="shared" ABI_CHECKS=1
+    arch: ppc64le
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *required_packages
+          - *libabigail_build_packages
-- 
2.25.0
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * [dpdk-dev] [PATCH  v4 4/4] ci: enable unit test for ppc64le
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
                   ` (2 preceding siblings ...)
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 3/4] ci: add travis ci support for native ppc64le David Wilder
@ 2020-04-02 17:12 ` David Wilder
  2021-03-25 15:06 ` [dpdk-dev] [PATCH v4 0/4] add travis ci support " David Marchand
  2021-04-15 14:45 ` Christian Ehrhardt
  5 siblings, 0 replies; 8+ messages in thread
From: David Wilder @ 2020-04-02 17:12 UTC (permalink / raw)
  To: aconole, maicolgabriel, thomas, ferruh.yigit, arybchenko
  Cc: dev, ruifeng.wang, david.marchand, drc, jerinjacobk, wilder
Add Travis CI jobs to run unit tests on ppc64le platform.
Signed-off-by: David Wilder <dwilder@us.ibm.com>
---
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 2afb80e46..7db5c5c7e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -135,6 +135,9 @@ jobs:
   - env: DEF_LIB="static"
     arch: ppc64le
     compiler: gcc
+  - env: DEF_LIB="shared" RUN_TESTS=1
+    arch: ppc64le
+    compiler: gcc
   - env: DEF_LIB="shared" BUILD_DOCS=1
     arch: ppc64le
     compiler: gcc
-- 
2.25.0
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * Re: [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
                   ` (3 preceding siblings ...)
  2020-04-02 17:12 ` [dpdk-dev] [PATCH v4 4/4] ci: enable unit test for ppc64le David Wilder
@ 2021-03-25 15:06 ` David Marchand
  2021-04-15 14:45 ` Christian Ehrhardt
  5 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2021-03-25 15:06 UTC (permalink / raw)
  To: David Wilder, Burakov, Anatoly
  Cc: Aaron Conole, Michael Santana, Thomas Monjalon, Yigit, Ferruh,
	Andrew Rybchenko, dev, Ruifeng Wang (Arm Technology China),
	David Christensen, Jerin Jacob, David Wilder
On Thu, Apr 2, 2020 at 7:13 PM David Wilder <dwilder@us.ibm.com> wrote:
>
> This patch series adds Travis gcc compilation jobs and unit testing
> for ppc64le.  Limitations for ppc64le are similar to arm64 (see commit
> 31bb45bcfd).
>
> 1. Only gcc builds are supported on ppc64le.
> 2. Hugepages are not available in the ppc64le Travis environment.
> 3. Memory requirements are larger for ppc64le due to a higher
>    RTE_MAX_LCORE value.
>
> V2: Insures iova-mode is VA when --no-huge is selected.
>     Removed setting of --iova-mode=VA in test-null.sh.
> V3: Refactor ppc64le changes on top of David Marchand's
>     Patch series: "Reorganise Travis jobs"
>     http://mails.dpdk.org/archives/dev/2020-February/158231.html
> V4: Adding unit testing.
>     Updated eal/linux: patch to force PA mode when --huge-page is used.
>     This should be a more straightforward solution than my V3 patch.
>
> A Travis build with theses patches can be found here:
> https://travis-ci.org/github/djlwilder/dpdk/builds/670214578
> David Wilder (4):
>   eal/linux: force iova-mode va with no-huge option
>   devtools: allow test-null.sh to run on ppc64le
>   ci: add travis ci support for native ppc64le
>   ci: enable unit test for ppc64le
>
Is this series still applicable?
The changes on EAL did not get a review.
-- 
David Marchand
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * Re: [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le
  2020-04-02 17:12 [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le David Wilder
                   ` (4 preceding siblings ...)
  2021-03-25 15:06 ` [dpdk-dev] [PATCH v4 0/4] add travis ci support " David Marchand
@ 2021-04-15 14:45 ` Christian Ehrhardt
  2021-04-19 12:22   ` Luca Boccassi
  5 siblings, 1 reply; 8+ messages in thread
From: Christian Ehrhardt @ 2021-04-15 14:45 UTC (permalink / raw)
  To: David Wilder, Luca Boccassi
  Cc: Aaron Conole, maicolgabriel, Thomas Monjalon, Ferruh Yigit,
	Andrew Rybchenko, dev, ruifeng.wang, david.marchand,
	David Christensen, jerinjacobk, wilder
On Thu, Apr 2, 2020 at 7:13 PM David Wilder <dwilder@us.ibm.com> wrote:
>
> This patch series adds Travis gcc compilation jobs and unit testing
> for ppc64le.  Limitations for ppc64le are similar to arm64 (see commit
> 31bb45bcfd).
>
> 1. Only gcc builds are supported on ppc64le.
> 2. Hugepages are not available in the ppc64le Travis environment.
> 3. Memory requirements are larger for ppc64le due to a higher
>    RTE_MAX_LCORE value.
>
> V2: Insures iova-mode is VA when --no-huge is selected.
>     Removed setting of --iova-mode=VA in test-null.sh.
> V3: Refactor ppc64le changes on top of David Marchand's
>     Patch series: "Reorganise Travis jobs"
>     http://mails.dpdk.org/archives/dev/2020-February/158231.html
> V4: Adding unit testing.
>     Updated eal/linux: patch to force PA mode when --huge-page is used.
>     This should be a more straightforward solution than my V3 patch.
>
> A Travis build with theses patches can be found here:
> https://travis-ci.org/github/djlwilder/dpdk/builds/670214578
> David Wilder (4):
>   eal/linux: force iova-mode va with no-huge option
>   devtools: allow test-null.sh to run on ppc64le
This affects our testing and from reviewing the code I think the first
two are safe and good.
In addition it affects mostly no-huge which is almost testing-only.
Therefore for patch #1 and #2:
Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
@Luca - could you give this a try if it applies and fixes our issues please?
That would also answer DMs question about applicability.
>   ci: add travis ci support for native ppc64le
>   ci: enable unit test for ppc64le
I can't speak much about the travis change :-/
>  .travis.yml                | 23 +++++++++++++++++++++++
>  devtools/test-null.sh      |  2 +-
>  lib/librte_eal/linux/eal.c | 24 ++++++++++++------------
>  3 files changed, 36 insertions(+), 13 deletions(-)
>
> --
> 2.25.0
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * Re: [dpdk-dev] [PATCH v4 0/4] add travis ci support for ppc64le
  2021-04-15 14:45 ` Christian Ehrhardt
@ 2021-04-19 12:22   ` Luca Boccassi
  0 siblings, 0 replies; 8+ messages in thread
From: Luca Boccassi @ 2021-04-19 12:22 UTC (permalink / raw)
  To: Christian Ehrhardt, David Wilder
  Cc: Aaron Conole, maicolgabriel, Thomas Monjalon, Ferruh Yigit,
	Andrew Rybchenko, dev, ruifeng.wang, david.marchand,
	David Christensen, jerinjacobk, wilder
On Thu, 2021-04-15 at 16:45 +0200, Christian Ehrhardt wrote:
> On Thu, Apr 2, 2020 at 7:13 PM David Wilder <dwilder@us.ibm.com> wrote:
> > This patch series adds Travis gcc compilation jobs and unit testing
> > for ppc64le.  Limitations for ppc64le are similar to arm64 (see commit
> > 31bb45bcfd).
> > 
> > 1. Only gcc builds are supported on ppc64le.
> > 2. Hugepages are not available in the ppc64le Travis environment.
> > 3. Memory requirements are larger for ppc64le due to a higher
> >    RTE_MAX_LCORE value.
> > 
> > V2: Insures iova-mode is VA when --no-huge is selected.
> >     Removed setting of --iova-mode=VA in test-null.sh.
> > V3: Refactor ppc64le changes on top of David Marchand's
> >     Patch series: "Reorganise Travis jobs"
> >     http://mails.dpdk.org/archives/dev/2020-February/158231.html
> > V4: Adding unit testing.
> >     Updated eal/linux: patch to force PA mode when --huge-page is used.
> >     This should be a more straightforward solution than my V3 patch.
> > 
> > A Travis build with theses patches can be found here:
> > https://travis-ci.org/github/djlwilder/dpdk/builds/670214578
> > David Wilder (4):
> >   eal/linux: force iova-mode va with no-huge option
> >   devtools: allow test-null.sh to run on ppc64le
> 
> This affects our testing and from reviewing the code I think the first
> two are safe and good.
> In addition it affects mostly no-huge which is almost testing-only.
> Therefore for patch #1 and #2:
> 
> Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> @Luca - could you give this a try if it applies and fixes our issues please?
> That would also answer DMs question about applicability.
Hi,
The first patch applies with very minor and trivial refresh for fuzz to
20.11, and fixes the issue for me - the fast suite can now run without
privileges in autopkgtest. I'd like to have this included for 21.05 so
that we can fix the tests.
So:
Tested-by: Luca Boccassi <bluca@debian.org>
-- 
Kind regards,
Luca Boccassi
^ permalink raw reply	[flat|nested] 8+ messages in thread