test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env
@ 2020-03-10 10:17 Xiao Qimai
  2020-03-10 10:24 ` Xiao, QimaiX
  2020-03-13  6:38 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Qimai @ 2020-03-10 10:17 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. get cores depends on env

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_loopback_multi_queues.py | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_loopback_multi_queues.py b/tests/TestSuite_loopback_multi_queues.py
index daba71e..589bf06 100644
--- a/tests/TestSuite_loopback_multi_queues.py
+++ b/tests/TestSuite_loopback_multi_queues.py
@@ -50,19 +50,16 @@ class TestLoopbackMultiQueues(TestCase):
         """
         self.frame_sizes = [64, 128, 256, 512, 1024, 1518]
         self.verify_queue = [1, 8]
-        self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
+        self.dut_ports = self.dut.get_ports()
+        port_socket = self.dut.get_numa_id(self.dut_ports[0])
+        self.core_list = self.dut.get_core_list(config='all', socket=port_socket)
+        self.cores_num = len(self.core_list)
         self.logger.info("you can config packet_size in file %s.cfg," % self.suite_name + \
                         "in region 'suite' like packet_sizes=[64, 128, 256]")
         # get the frame_sizes from cfg file
         if 'packet_sizes' in self.get_suite_cfg():
             self.frame_sizes = self.get_suite_cfg()['packet_sizes']
 
-        # set diff arg about mem_socket base on socket number
-        if len(set([int(core['socket']) for core in self.dut.cores])) == 1:
-            self.socket_mem = '1024'
-        else:
-            self.socket_mem = '1024,1024'
-
     def set_up(self):
         """
         Run before each test case.
@@ -81,13 +78,11 @@ class TestLoopbackMultiQueues(TestCase):
         """
         get the coremask about vhost and virito depend on the queue number
         """
-        self.core_config = "1S/%dC/1T" % (2*self.nb_cores+2)
-        self.verify(self.cores_num >= (2*self.nb_cores+2),
+        self.verify(self.cores_num > (2*self.nb_cores + 2),
                         "There has not enought cores to test this case %s" %
                         self.running_case)
-        self.core_list = self.dut.get_core_list(self.core_config)
-        self.core_list_user = self.core_list[0:self.nb_cores + 1]
-        self.core_list_host = self.core_list[self.nb_cores + 1:2 * self.nb_cores + 2]
+        self.core_list_user = self.core_list[1:self.nb_cores + 2]
+        self.core_list_host = self.core_list[self.nb_cores + 2:2 * self.nb_cores + 3]
 
     def start_vhost_testpmd(self):
         """
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env
  2020-03-10 10:17 [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env Xiao Qimai
@ 2020-03-10 10:24 ` Xiao, QimaiX
  2020-03-13  6:38 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Xiao, QimaiX @ 2020-03-10 10:24 UTC (permalink / raw)
  To: dts

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai

> -----Original Message-----
> From: Xiao, QimaiX
> Sent: Tuesday, March 10, 2020 6:17 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts][PATCH V1]tests/TestSuite_loopback_multi_queues: get cores
> depends on env
> 
> *. get cores depends on env
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_loopback_multi_queues.py | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_loopback_multi_queues.py
> b/tests/TestSuite_loopback_multi_queues.py
> index daba71e..589bf06 100644
> --- a/tests/TestSuite_loopback_multi_queues.py
> +++ b/tests/TestSuite_loopback_multi_queues.py
> @@ -50,19 +50,16 @@ class TestLoopbackMultiQueues(TestCase):
>          """
>          self.frame_sizes = [64, 128, 256, 512, 1024, 1518]
>          self.verify_queue = [1, 8]
> -        self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
> +        self.dut_ports = self.dut.get_ports()
> +        port_socket = self.dut.get_numa_id(self.dut_ports[0])
> +        self.core_list = self.dut.get_core_list(config='all', socket=port_socket)
> +        self.cores_num = len(self.core_list)
>          self.logger.info("you can config packet_size in file %s.cfg," %
> self.suite_name + \
>                          "in region 'suite' like packet_sizes=[64, 128, 256]")
>          # get the frame_sizes from cfg file
>          if 'packet_sizes' in self.get_suite_cfg():
>              self.frame_sizes = self.get_suite_cfg()['packet_sizes']
> 
> -        # set diff arg about mem_socket base on socket number
> -        if len(set([int(core['socket']) for core in self.dut.cores])) == 1:
> -            self.socket_mem = '1024'
> -        else:
> -            self.socket_mem = '1024,1024'
> -
>      def set_up(self):
>          """
>          Run before each test case.
> @@ -81,13 +78,11 @@ class TestLoopbackMultiQueues(TestCase):
>          """
>          get the coremask about vhost and virito depend on the queue number
>          """
> -        self.core_config = "1S/%dC/1T" % (2*self.nb_cores+2)
> -        self.verify(self.cores_num >= (2*self.nb_cores+2),
> +        self.verify(self.cores_num > (2*self.nb_cores + 2),
>                          "There has not enought cores to test this case %s" %
>                          self.running_case)
> -        self.core_list = self.dut.get_core_list(self.core_config)
> -        self.core_list_user = self.core_list[0:self.nb_cores + 1]
> -        self.core_list_host = self.core_list[self.nb_cores + 1:2 * self.nb_cores +
> 2]
> +        self.core_list_user = self.core_list[1:self.nb_cores + 2]
> +        self.core_list_host = self.core_list[self.nb_cores + 2:2 * self.nb_cores +
> 3]
> 
>      def start_vhost_testpmd(self):
>          """
> --
> 1.8.3.1


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

* Re: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env
  2020-03-10 10:17 [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env Xiao Qimai
  2020-03-10 10:24 ` Xiao, QimaiX
@ 2020-03-13  6:38 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-03-13  6:38 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, March 10, 2020 6:17 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores
> depends on env
> 
> *. get cores depends on env
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_loopback_multi_queues.py | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_loopback_multi_queues.py
> b/tests/TestSuite_loopback_multi_queues.py
> index daba71e..589bf06 100644
> --- a/tests/TestSuite_loopback_multi_queues.py
> +++ b/tests/TestSuite_loopback_multi_queues.py
> @@ -50,19 +50,16 @@ class TestLoopbackMultiQueues(TestCase):
>          """
>          self.frame_sizes = [64, 128, 256, 512, 1024, 1518]
>          self.verify_queue = [1, 8]
> -        self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
> +        self.dut_ports = self.dut.get_ports()
> +        port_socket = self.dut.get_numa_id(self.dut_ports[0])
> +        self.core_list = self.dut.get_core_list(config='all', socket=port_socket)
> +        self.cores_num = len(self.core_list)
>          self.logger.info("you can config packet_size in file %s.cfg," %
> self.suite_name + \
>                          "in region 'suite' like packet_sizes=[64, 128, 256]")
>          # get the frame_sizes from cfg file
>          if 'packet_sizes' in self.get_suite_cfg():
>              self.frame_sizes = self.get_suite_cfg()['packet_sizes']
> 
> -        # set diff arg about mem_socket base on socket number
> -        if len(set([int(core['socket']) for core in self.dut.cores])) == 1:
> -            self.socket_mem = '1024'
> -        else:
> -            self.socket_mem = '1024,1024'
> -
>      def set_up(self):
>          """
>          Run before each test case.
> @@ -81,13 +78,11 @@ class TestLoopbackMultiQueues(TestCase):
>          """
>          get the coremask about vhost and virito depend on the queue number
>          """
> -        self.core_config = "1S/%dC/1T" % (2*self.nb_cores+2)
> -        self.verify(self.cores_num >= (2*self.nb_cores+2),
> +        self.verify(self.cores_num > (2*self.nb_cores + 2),
>                          "There has not enought cores to test this case %s" %
>                          self.running_case)
> -        self.core_list = self.dut.get_core_list(self.core_config)
> -        self.core_list_user = self.core_list[0:self.nb_cores + 1]
> -        self.core_list_host = self.core_list[self.nb_cores + 1:2 * self.nb_cores + 2]
> +        self.core_list_user = self.core_list[1:self.nb_cores + 2]
> +        self.core_list_host = self.core_list[self.nb_cores + 2:2 * self.nb_cores +
> 3]
> 
>      def start_vhost_testpmd(self):
>          """
> --
> 1.8.3.1


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

end of thread, other threads:[~2020-03-13  6:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 10:17 [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env Xiao Qimai
2020-03-10 10:24 ` Xiao, QimaiX
2020-03-13  6:38 ` 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).