[v1,1/2] devtools: allow test-null.sh to run on ppc64le

Message ID 20200213202442.19674-2-dwilder@us.ibm.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series add travis ci support for ppc64le |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation fail apply issues

Commit Message

David Wilder Feb. 13, 2020, 8:24 p.m. UTC
  - Memory requirements are larger for ppc64le
  due to a higher RTE_MAX_LCORE value.

- The --no-huge option requires iova-mode=VA.
  On ppc64le iova-mode defaults to PA therefor
  VA mode must be explicitly set.

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(-)
  

Comments

Thomas Monjalon Feb. 13, 2020, 8:32 p.m. UTC | #1
13/02/2020 21:24, David Wilder:
> - The --no-huge option requires iova-mode=VA.
>   On ppc64le iova-mode defaults to PA therefor
>   VA mode must be explicitly set.

Should we make VA mode automatic when using --no-huge?
Should we log an error message when using --no-huge with PA mode?
  
David Wilder Feb. 13, 2020, 8:58 p.m. UTC | #2
On 2020-02-13 12:32, Thomas Monjalon wrote:
> 13/02/2020 21:24, David Wilder:
>> - The --no-huge option requires iova-mode=VA.
>>   On ppc64le iova-mode defaults to PA therefor
>>   VA mode must be explicitly set.
> 
> Should we make VA mode automatic when using --no-huge?
> Should we log an error message when using --no-huge with PA mode?

Logging a messages sounds like a good idea.  Ignoring the users request 
of iova-mode=PA (in the case of x86) and just switching modes would be 
bad.
  
Thomas Monjalon Feb. 13, 2020, 10:17 p.m. UTC | #3
13/02/2020 21:58, dwilder:
> On 2020-02-13 12:32, Thomas Monjalon wrote:
> > 13/02/2020 21:24, David Wilder:
> >> - The --no-huge option requires iova-mode=VA.
> >>   On ppc64le iova-mode defaults to PA therefor
> >>   VA mode must be explicitly set.
> > 
> > Should we make VA mode automatic when using --no-huge?
> > Should we log an error message when using --no-huge with PA mode?
> 
> Logging a messages sounds like a good idea.  Ignoring the users request 
> of iova-mode=PA (in the case of x86) and just switching modes would be 
> bad.

Yes, I mean for ppc64, if --no-huge is specified,
would you like to change the default to VA mode?
  
David Wilder Feb. 13, 2020, 11:23 p.m. UTC | #4
On 2020-02-13 14:17, Thomas Monjalon wrote:
> 13/02/2020 21:58, dwilder:
>> On 2020-02-13 12:32, Thomas Monjalon wrote:
>> > 13/02/2020 21:24, David Wilder:
>> >> - The --no-huge option requires iova-mode=VA.
>> >>   On ppc64le iova-mode defaults to PA therefor
>> >>   VA mode must be explicitly set.
>> >
>> > Should we make VA mode automatic when using --no-huge?
>> > Should we log an error message when using --no-huge with PA mode?
>> 
>> Logging a messages sounds like a good idea.  Ignoring the users 
>> request
>> of iova-mode=PA (in the case of x86) and just switching modes would be
>> bad.
> 
> Yes, I mean for ppc64, if --no-huge is specified,
> would you like to change the default to VA mode?

OK, that would be better.
I will switch to VA when --no-huge is set (ppc64 only).
Add log messages if PA is selected with --no-huge (all arches).
  
David Marchand Feb. 14, 2020, 1:22 p.m. UTC | #5
On Fri, Feb 14, 2020 at 12:22 AM dwilder <dwilder@us.ibm.com> wrote:
>
> On 2020-02-13 14:17, Thomas Monjalon wrote:
> > 13/02/2020 21:58, dwilder:
> >> On 2020-02-13 12:32, Thomas Monjalon wrote:
> >> > 13/02/2020 21:24, David Wilder:
> >> >> - The --no-huge option requires iova-mode=VA.
> >> >>   On ppc64le iova-mode defaults to PA therefor
> >> >>   VA mode must be explicitly set.
> >> >
> >> > Should we make VA mode automatic when using --no-huge?
> >> > Should we log an error message when using --no-huge with PA mode?
> >>
> >> Logging a messages sounds like a good idea.  Ignoring the users
> >> request
> >> of iova-mode=PA (in the case of x86) and just switching modes would be
> >> bad.
> >
> > Yes, I mean for ppc64, if --no-huge is specified,
> > would you like to change the default to VA mode?
>
> OK, that would be better.
> I will switch to VA when --no-huge is set (ppc64 only).

With no-huge, we can't ensure the physical addresses won't change
(might be different if we locked the pages in memory... but not
possible and/or not handled in eal afaics).
This limitation is generic, not arch specific.


> Add log messages if PA is selected with --no-huge (all arches).
  

Patch

diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index 548de8113..85952d1dc 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 --iova-mode=va \
 	$libs -w 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
 	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia