test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] update kni for env with single cpu on socket 0
@ 2019-07-02  9:35 xiao,qimai
  2019-07-03  3:39 ` Yao, BingX Y
  2019-07-03  5:40 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: xiao,qimai @ 2019-07-02  9:35 UTC (permalink / raw)
  To: dts; +Cc: xiao,qimai

1.update kni to run on env with single cpu on socket 0
2.add cmd to close firewall on ubuntu

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 6bf388c..a1c07a2 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -263,13 +263,34 @@ class TestKni(TestCase):
 
         out = self.dut.build_dpdk_apps("./examples/kni/")
         self.verify('Error' not in out, "Compilation failed")
+        p0_pci = self.dut.ports_info[0]['pci']
+        numa_node = int(self.dut.send_expect("cat /sys/bus/pci/devices/%s/numa_node"%p0_pci, "# ", 30))
+        socket_id = numa_node if numa_node > 0 else 0
+        if socket_id==0:
+            global default_1_port_cores_config
+            global default_2_port_cores_config
+            global routing_performance_steps
+            global bridge_performance_steps
+            global loopback_performance_steps
+
+            default_1_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            default_2_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            for i in range(len(routing_performance_steps)):
+                routing_performance_steps[i]['config'] = routing_performance_steps[i]['config'].replace('C{1.','C{0.')
+            for j in range(len(bridge_performance_steps)):
+                bridge_performance_steps[j]['config'] = bridge_performance_steps[j]['config'].replace('C{1.','C{0.')
+            for k in range(len(loopback_performance_steps)):
+                loopback_performance_steps[k]['config'] = loopback_performance_steps[k]['config'].replace('C{1.','C{0.')
 
         self.extract_ports_cores_config(default_1_port_cores_config)
         out = self.start_kni()
         self.verify("Error" not in out, "Error found during kni start")
-
-        self.dut.send_expect("service iptables stop", "# ")
-        self.dut.send_expect("service firewalld stop", "# ")
+        out = self.dut.send_expect("cat /etc/os-release", "# ")
+        if "Ubuntu" in out:
+            self.dut.send_expect("ufw disable", "# ")
+        else:
+            self.dut.send_expect("service iptables stop", "# ")
+            self.dut.send_expect("service firewalld stop", "# ")
 
         # get dts output path
         if self.logger.log_path.startswith(os.sep):
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V1] update kni for env with single cpu on socket 0
  2019-07-02  9:35 [dts] [PATCH V1] update kni for env with single cpu on socket 0 xiao,qimai
@ 2019-07-03  3:39 ` Yao, BingX Y
  2019-07-03  5:40 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, BingX Y @ 2019-07-03  3:39 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Tested-by: Yao, BingX Y <bingx.y.yao@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xiao,qimai
Sent: Tuesday, July 2, 2019 5:35 PM
To: dts@dpdk.org
Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1] update kni for env with single cpu on socket 0

1.update kni to run on env with single cpu on socket 0 2.add cmd to close firewall on ubuntu

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 6bf388c..a1c07a2 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -263,13 +263,34 @@ class TestKni(TestCase):
 
         out = self.dut.build_dpdk_apps("./examples/kni/")
         self.verify('Error' not in out, "Compilation failed")
+        p0_pci = self.dut.ports_info[0]['pci']
+        numa_node = int(self.dut.send_expect("cat /sys/bus/pci/devices/%s/numa_node"%p0_pci, "# ", 30))
+        socket_id = numa_node if numa_node > 0 else 0
+        if socket_id==0:
+            global default_1_port_cores_config
+            global default_2_port_cores_config
+            global routing_performance_steps
+            global bridge_performance_steps
+            global loopback_performance_steps
+
+            default_1_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            default_2_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.')
+            for i in range(len(routing_performance_steps)):
+                routing_performance_steps[i]['config'] = routing_performance_steps[i]['config'].replace('C{1.','C{0.')
+            for j in range(len(bridge_performance_steps)):
+                bridge_performance_steps[j]['config'] = bridge_performance_steps[j]['config'].replace('C{1.','C{0.')
+            for k in range(len(loopback_performance_steps)):
+                loopback_performance_steps[k]['config'] = 
+ loopback_performance_steps[k]['config'].replace('C{1.','C{0.')
 
         self.extract_ports_cores_config(default_1_port_cores_config)
         out = self.start_kni()
         self.verify("Error" not in out, "Error found during kni start")
-
-        self.dut.send_expect("service iptables stop", "# ")
-        self.dut.send_expect("service firewalld stop", "# ")
+        out = self.dut.send_expect("cat /etc/os-release", "# ")
+        if "Ubuntu" in out:
+            self.dut.send_expect("ufw disable", "# ")
+        else:
+            self.dut.send_expect("service iptables stop", "# ")
+            self.dut.send_expect("service firewalld stop", "# ")
 
         # get dts output path
         if self.logger.log_path.startswith(os.sep):
--
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V1] update kni for env with single cpu on socket 0
  2019-07-02  9:35 [dts] [PATCH V1] update kni for env with single cpu on socket 0 xiao,qimai
  2019-07-03  3:39 ` Yao, BingX Y
@ 2019-07-03  5:40 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-07-03  5:40 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xiao,qimai
> Sent: Tuesday, July 2, 2019 5:35 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1] update kni for env with single cpu on socket 0
> 
> 1.update kni to run on env with single cpu on socket 0 2.add cmd to close
> firewall on ubuntu
> 
> Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_kni.py | 27 ++++++++++++++++++++++++---
>  1 file changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index
> 6bf388c..a1c07a2 100644
> --- a/tests/TestSuite_kni.py
> +++ b/tests/TestSuite_kni.py
> @@ -263,13 +263,34 @@ class TestKni(TestCase):
> 
>          out = self.dut.build_dpdk_apps("./examples/kni/")
>          self.verify('Error' not in out, "Compilation failed")
> +        p0_pci = self.dut.ports_info[0]['pci']
> +        numa_node = int(self.dut.send_expect("cat
> /sys/bus/pci/devices/%s/numa_node"%p0_pci, "# ", 30))
> +        socket_id = numa_node if numa_node > 0 else 0
> +        if socket_id==0:
> +            global default_1_port_cores_config
> +            global default_2_port_cores_config
> +            global routing_performance_steps
> +            global bridge_performance_steps
> +            global loopback_performance_steps
> +
> +
> default_1_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.
> ')
> +
> default_2_port_cores_config=default_1_port_cores_config.replace('C{1.','C{0.
> ')
> +            for i in range(len(routing_performance_steps)):
> +                routing_performance_steps[i]['config'] =
> routing_performance_steps[i]['config'].replace('C{1.','C{0.')
> +            for j in range(len(bridge_performance_steps)):
> +                bridge_performance_steps[j]['config'] =
> bridge_performance_steps[j]['config'].replace('C{1.','C{0.')
> +            for k in range(len(loopback_performance_steps)):
> +                loopback_performance_steps[k]['config'] =
> + loopback_performance_steps[k]['config'].replace('C{1.','C{0.')
> 
>          self.extract_ports_cores_config(default_1_port_cores_config)
>          out = self.start_kni()
>          self.verify("Error" not in out, "Error found during kni start")
> -
> -        self.dut.send_expect("service iptables stop", "# ")
> -        self.dut.send_expect("service firewalld stop", "# ")
> +        out = self.dut.send_expect("cat /etc/os-release", "# ")
> +        if "Ubuntu" in out:
> +            self.dut.send_expect("ufw disable", "# ")
> +        else:
> +            self.dut.send_expect("service iptables stop", "# ")
> +            self.dut.send_expect("service firewalld stop", "# ")
> 
>          # get dts output path
>          if self.logger.log_path.startswith(os.sep):
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-03  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02  9:35 [dts] [PATCH V1] update kni for env with single cpu on socket 0 xiao,qimai
2019-07-03  3:39 ` Yao, BingX Y
2019-07-03  5:40 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).