test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 0/1] tests/pvp_vhost_user_built_in_net_driver: support one socket server
@ 2019-09-18  6:13 yufengmx
  2019-09-18  6:14 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one yufengmx
  0 siblings, 1 reply; 4+ messages in thread
From: yufengmx @ 2019-09-18  6:13 UTC (permalink / raw)
  To: dts, yinan.wang, lihongx.ma; +Cc: yufengmx

set socket memsize to support suite deployed on one socket server. 

yufengmx (1):
  tests/pvp_vhost_user_built_in_net_driver: support one socket server

 ...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

-- 
2.21.0


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

* [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one
  2019-09-18  6:13 [dts] [PATCH V1 0/1] tests/pvp_vhost_user_built_in_net_driver: support one socket server yufengmx
@ 2019-09-18  6:14 ` yufengmx
  2019-09-18  6:16   ` Mo, YufengX
  2019-09-20  6:48   ` Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: yufengmx @ 2019-09-18  6:14 UTC (permalink / raw)
  To: dts, yinan.wang, lihongx.ma; +Cc: yufengmx

 socket server

set socket memsize to support suite deployed on one socket server.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 ...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
index 52d9df9..1c13665 100644
--- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
+++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
@@ -78,6 +78,10 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
             self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
         # create an instance to set stream field setting
         self.pktgen_helper = PacketGeneratorHelper()
+        
+        # set memory size
+        self.verify(self.sockets > 0, 'cpu socket should not be zero')
+        self.mem_size = ','.join(['2048']*self.sockets)
 
     def set_up(self):
         """
@@ -100,6 +104,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
         self.table_header.append("% linerate")
         self.result_table_create(self.table_header)
 
+    @property
+    def sockets(self):
+        sockets = [
+            cpu.get('socket') for cpu in self.dut.get_all_cores()
+            if cpu.get('socket')]
+        return len(set(sockets))
+
     def prepare_vhost_switch(self):
         cmd_info = self.dut.send_expect("grep 'define MAX_QUEUES' %s" %
                         "./examples/vhost/main.c", "# ")
@@ -158,12 +169,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
         """
         self.dut.send_expect("rm -rf ./vhost.out", "#")
         command_line_client = "./examples/vhost/build/app/vhost-switch " + \
-                              "-c %s -n %d --socket-mem 2048,2048 -- " + \
+                              "-c %s -n %d --socket-mem %s -- " + \
                               "-p 0x1 --mergeable 0 --vm2vm 1 " + \
                               "--builtin-net-driver  --socket-file ./vhost-net" + \
                               "> ./vhost.out &"
         command_line_client = command_line_client % (self.core_mask_vhost_user,
-                                            self.mem_channels)
+                                                     self.mem_channels, self.mem_size)
         self.vhost_switch.send_expect(command_line_client, "# ", 120)
         time.sleep(15)
         try:
@@ -185,11 +196,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
         start testpmd on virtio
         """
         command_line_user = "./%s/app/testpmd -n %d -c %s " + \
-                            "--no-pci --socket-mem 2048,2048 --file-prefix=virtio-user " + \
+                            "--no-pci --socket-mem %s --file-prefix=virtio-user " + \
                             "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,queues=1 " + \
                             "-- -i --rxq=1 --txq=1"
         command_line_user = command_line_user % (self.target,
-            self.mem_channels, self.core_mask_virtio_user, self.virtio_mac)
+                                                 self.mem_channels, self.core_mask_virtio_user,
+                                                 self.mem_size, self.virtio_mac)
         self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
         self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
         self.virtio_user.send_expect("start tx_first", "testpmd> ", 120)
-- 
2.21.0


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

* Re: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one
  2019-09-18  6:14 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one yufengmx
@ 2019-09-18  6:16   ` Mo, YufengX
  2019-09-20  6:48   ` Tu, Lijuan
  1 sibling, 0 replies; 4+ messages in thread
From: Mo, YufengX @ 2019-09-18  6:16 UTC (permalink / raw)
  To: dts, Wang, Yinan, Ma,  LihongX

Tested by Mo, YufengX <yufengx.mo@intel.com>


> -----Original Message-----
> From: Mo, YufengX
> Sent: Wednesday, September 18, 2019 2:14 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one
> 
>  socket server
> 
> set socket memsize to support suite deployed on one socket server.
> 
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
>  ...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> index 52d9df9..1c13665 100644
> --- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> +++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> @@ -78,6 +78,10 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>              self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
>          # create an instance to set stream field setting
>          self.pktgen_helper = PacketGeneratorHelper()
> +
> +        # set memory size
> +        self.verify(self.sockets > 0, 'cpu socket should not be zero')
> +        self.mem_size = ','.join(['2048']*self.sockets)
> 
>      def set_up(self):
>          """
> @@ -100,6 +104,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          self.table_header.append("% linerate")
>          self.result_table_create(self.table_header)
> 
> +    @property
> +    def sockets(self):
> +        sockets = [
> +            cpu.get('socket') for cpu in self.dut.get_all_cores()
> +            if cpu.get('socket')]
> +        return len(set(sockets))
> +
>      def prepare_vhost_switch(self):
>          cmd_info = self.dut.send_expect("grep 'define MAX_QUEUES' %s" %
>                          "./examples/vhost/main.c", "# ")
> @@ -158,12 +169,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          """
>          self.dut.send_expect("rm -rf ./vhost.out", "#")
>          command_line_client = "./examples/vhost/build/app/vhost-switch " + \
> -                              "-c %s -n %d --socket-mem 2048,2048 -- " + \
> +                              "-c %s -n %d --socket-mem %s -- " + \
>                                "-p 0x1 --mergeable 0 --vm2vm 1 " + \
>                                "--builtin-net-driver  --socket-file ./vhost-net" + \
>                                "> ./vhost.out &"
>          command_line_client = command_line_client % (self.core_mask_vhost_user,
> -                                            self.mem_channels)
> +                                                     self.mem_channels, self.mem_size)
>          self.vhost_switch.send_expect(command_line_client, "# ", 120)
>          time.sleep(15)
>          try:
> @@ -185,11 +196,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          start testpmd on virtio
>          """
>          command_line_user = "./%s/app/testpmd -n %d -c %s " + \
> -                            "--no-pci --socket-mem 2048,2048 --file-prefix=virtio-user " + \
> +                            "--no-pci --socket-mem %s --file-prefix=virtio-user " + \
>                              "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,queues=1 " + \
>                              "-- -i --rxq=1 --txq=1"
>          command_line_user = command_line_user % (self.target,
> -            self.mem_channels, self.core_mask_virtio_user, self.virtio_mac)
> +                                                 self.mem_channels, self.core_mask_virtio_user,
> +                                                 self.mem_size, self.virtio_mac)
>          self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
>          self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
>          self.virtio_user.send_expect("start tx_first", "testpmd> ", 120)
> --
> 2.21.0


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

* Re: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one
  2019-09-18  6:14 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one yufengmx
  2019-09-18  6:16   ` Mo, YufengX
@ 2019-09-20  6:48   ` Tu, Lijuan
  1 sibling, 0 replies; 4+ messages in thread
From: Tu, Lijuan @ 2019-09-20  6:48 UTC (permalink / raw)
  To: Mo, YufengX, dts, Wang, Yinan, Ma, LihongX; +Cc: Mo, YufengX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Wednesday, September 18, 2019 2:14 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver:
> support one
> 
>  socket server
> 
> set socket memsize to support suite deployed on one socket server.
> 
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
>  ...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> index 52d9df9..1c13665 100644
> --- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> +++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
> @@ -78,6 +78,10 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>              self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
>          # create an instance to set stream field setting
>          self.pktgen_helper = PacketGeneratorHelper()
> +
> +        # set memory size
> +        self.verify(self.sockets > 0, 'cpu socket should not be zero')
> +        self.mem_size = ','.join(['2048']*self.sockets)
> 
>      def set_up(self):
>          """
> @@ -100,6 +104,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          self.table_header.append("% linerate")
>          self.result_table_create(self.table_header)
> 
> +    @property
> +    def sockets(self):
> +        sockets = [
> +            cpu.get('socket') for cpu in self.dut.get_all_cores()
> +            if cpu.get('socket')]
> +        return len(set(sockets))
> +
>      def prepare_vhost_switch(self):
>          cmd_info = self.dut.send_expect("grep 'define MAX_QUEUES' %s" %
>                          "./examples/vhost/main.c", "# ") @@ -158,12 +169,12 @@
> class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          """
>          self.dut.send_expect("rm -rf ./vhost.out", "#")
>          command_line_client = "./examples/vhost/build/app/vhost-switch " + \
> -                              "-c %s -n %d --socket-mem 2048,2048 -- " + \
> +                              "-c %s -n %d --socket-mem %s -- " + \
>                                "-p 0x1 --mergeable 0 --vm2vm 1 " + \
>                                "--builtin-net-driver  --socket-file ./vhost-net" + \
>                                "> ./vhost.out &"
>          command_line_client = command_line_client %
> (self.core_mask_vhost_user,
> -                                            self.mem_channels)
> +                                                     self.mem_channels,
> + self.mem_size)
>          self.vhost_switch.send_expect(command_line_client, "# ", 120)
>          time.sleep(15)
>          try:
> @@ -185,11 +196,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
>          start testpmd on virtio
>          """
>          command_line_user = "./%s/app/testpmd -n %d -c %s " + \
> -                            "--no-pci --socket-mem 2048,2048 --file-prefix=virtio-user "
> + \
> +                            "--no-pci --socket-mem %s
> + --file-prefix=virtio-user " + \
>                              "--vdev=net_virtio_user0,mac=%s,path=./vhost-
> net,queues=1 " + \
>                              "-- -i --rxq=1 --txq=1"
>          command_line_user = command_line_user % (self.target,
> -            self.mem_channels, self.core_mask_virtio_user, self.virtio_mac)
> +                                                 self.mem_channels,
> self.core_mask_virtio_user,
> +                                                 self.mem_size,
> + self.virtio_mac)
>          self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
>          self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
>          self.virtio_user.send_expect("start tx_first", "testpmd> ", 120)
> --
> 2.21.0


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

end of thread, other threads:[~2019-09-20  6:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18  6:13 [dts] [PATCH V1 0/1] tests/pvp_vhost_user_built_in_net_driver: support one socket server yufengmx
2019-09-18  6:14 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one yufengmx
2019-09-18  6:16   ` Mo, YufengX
2019-09-20  6:48   ` 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).