[V1] tests/TestSuite_ipfrag: Add -w option in set_up_all method
diff mbox series

Message ID 20200721144148.42009-1-weix.ling@intel.com
State Accepted
Headers show
Series
  • [V1] tests/TestSuite_ipfrag: Add -w option in set_up_all method
Related show

Commit Message

Ling, WeiX July 21, 2020, 2:41 p.m. UTC
Because DPDK upgrade,if no -w option,ip_fragmentation will use all DPDK driver by default.

Signed-off-by: lingwei <weix.ling@intel.com>
---
 tests/TestSuite_ipfrag.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Tu, Lijuan July 24, 2020, 2:40 a.m. UTC | #1
Applied, thanks

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of lingwei
> Sent: 2020年7月21日 22:42
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_ipfrag: Add -w option in set_up_all
> method
> 
> Because DPDK upgrade,if no -w option,ip_fragmentation will use all DPDK driver
> by default.
> 
> Signed-off-by: lingwei <weix.ling@intel.com>
> ---
>  tests/TestSuite_ipfrag.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py index
> cbcd5fe..8ad2e82 100644
> --- a/tests/TestSuite_ipfrag.py
> +++ b/tests/TestSuite_ipfrag.py
> @@ -129,10 +129,13 @@ l3fwd_ipv4_route_array[] = {\\\n"
>          numPortThread = len([P0, P1]) / len(cores)
>          result = True
>          errString = ''
> +        eal_param = ""
> +        for i in [P0, P1]:
> +            eal_param += " -w %s" % self.dut.ports_info[i]['pci']
> 
>          # run ipv4_frag
> -        self.dut.send_expect("examples/ip_fragmentation/build/ip_fragmentation
> -c %s -n %d -- -p %s -q %s" % (
> -            coremask, self.dut.get_memory_channels(), portmask,
> int(numPortThread)), "Link Up", 120)
> +        self.dut.send_expect("examples/ip_fragmentation/build/ip_fragmentation
> -c %s -n %d %s -- -p %s -q %s" % (
> +            coremask, self.dut.get_memory_channels(), eal_param,
> + portmask, int(numPortThread)), "Link Up", 120)
> 
>          time.sleep(2)
>          self.txItf = self.tester.get_interface(self.tester.get_local_port(P0))
> --
> 2.17.1

Patch
diff mbox series

diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index cbcd5fe..8ad2e82 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -129,10 +129,13 @@  l3fwd_ipv4_route_array[] = {\\\n"
         numPortThread = len([P0, P1]) / len(cores)
         result = True
         errString = ''
+        eal_param = ""
+        for i in [P0, P1]:
+            eal_param += " -w %s" % self.dut.ports_info[i]['pci']
 
         # run ipv4_frag
-        self.dut.send_expect("examples/ip_fragmentation/build/ip_fragmentation -c %s -n %d -- -p %s -q %s" % (
-            coremask, self.dut.get_memory_channels(), portmask, int(numPortThread)), "Link Up", 120)
+        self.dut.send_expect("examples/ip_fragmentation/build/ip_fragmentation -c %s -n %d %s -- -p %s -q %s" % (
+            coremask, self.dut.get_memory_channels(), eal_param, portmask, int(numPortThread)), "Link Up", 120)
 
         time.sleep(2)
         self.txItf = self.tester.get_interface(self.tester.get_local_port(P0))