test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_runtime_vf_queue_number update rss-hash-key after command port start all
@ 2019-08-29 11:40 Jianwei Mei
  2019-09-04  5:28 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Jianwei Mei @ 2019-08-29 11:40 UTC (permalink / raw)
  To: dts; +Cc: Jianwei Mei

set rss-hash key after execute port start all and reduce packet count to save time.

Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
 tests/TestSuite_runtime_vf_queue_number.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_runtime_vf_queue_number.py b/tests/TestSuite_runtime_vf_queue_number.py
index 3e04489..f484f70 100644
--- a/tests/TestSuite_runtime_vf_queue_number.py
+++ b/tests/TestSuite_runtime_vf_queue_number.py
@@ -41,6 +41,7 @@ from test_case import TestCase
 from pmd_output import PmdOutput
 
 RSS_KEY = '6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E'
+PACKET_COUNT = 100
 
 class TestRuntimeVfQn(TestCase):
     supported_vf_driver = ['pci-stub', 'vfio-pci']
@@ -48,7 +49,7 @@ class TestRuntimeVfQn(TestCase):
         self.dut_ports = self.dut.get_ports(self.nic)
         self.verify(len(self.dut_ports) >= 1, 'Insufficient ports')
         self.src_intf = self.tester.get_interface(self.tester.get_local_port(0))
-        self.src_mac =  self.tester.get_mac(self.tester.get_local_port(0))
+        self.src_mac = self.tester.get_mac(self.tester.get_local_port(0))
         self.dst_mac = self.dut.get_mac_address(0)
         self.vm0 = None
         self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci']
@@ -187,10 +188,10 @@ class TestRuntimeVfQn(TestCase):
     def testpmd_config_cmd_list(self, qn):
         cmd_list = [['stop'],
                     ['port stop all'],
-                    ['port config 0 rss-hash-key ipv4 %s' % RSS_KEY],
                     ['port config all txq %d' % qn],
                     ['port config all rxq %d' % qn],
-                    ['port start all']]
+                    ['port start all'],
+                    ['port config 0 rss-hash-key ipv4 %s' % RSS_KEY]]
         return cmd_list
 
     def verify_result(self, queue_num, pkt_num):
@@ -225,7 +226,6 @@ class TestRuntimeVfQn(TestCase):
         for qn in valid_qn:
             host_eal_param = '-w %s,queue-num-per-vf=%d --file-prefix=test1 --socket-mem 1024,1024' % (self.pf_pci, qn)
             self.host_testpmd.start_testpmd(self.pmdout.default_cores, param='', eal_param=host_eal_param)
-
             gest_eal_param = '-w %s --file-prefix=test2' % self.vm_dut_0.ports_info[0]['pci']
             self.vm0_testpmd = PmdOutput(self.vm_dut_0)
             self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, eal_param=gest_eal_param, param='')
@@ -236,18 +236,18 @@ class TestRuntimeVfQn(TestCase):
             self.verify("port 0: RX queue number: %d Tx queue number: %d" % (qn, qn) in outstring, "The RX/TX queue number error.")
             self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
             self.vf_mac = self.vm0_testpmd.get_port_mac(self.vm0_dut_ports[0])
-            self.send_packet(self.vf_mac, self.src_intf, 100)
+            self.send_packet(self.vf_mac, self.src_intf, PACKET_COUNT)
             outstring1 = self.vm0_testpmd.execute_cmd("stop", "testpmd> ")
-            self.verify_queue_number(outstring1, qn, 100)
+            self.verify_queue_number(outstring1, qn, PACKET_COUNT)
             guest_cmds1 = self.testpmd_config_cmd_list(qn + 1)
             self.execute_testpmd_cmd(guest_cmds1)
             outstring2 = self.vm0_testpmd.execute_cmd("start", "testpmd> ")
             self.logger.info(outstring2)
             self.verify("port 0: RX queue number: %d Tx queue number: %d" % ((qn + 1), (qn + 1)) in outstring2, "The RX/TX queue number error.")
-            self.send_packet(self.vf_mac, self.src_intf, 254)
+            self.send_packet(self.vf_mac, self.src_intf, PACKET_COUNT)
             outstring3 = self.vm0_testpmd.execute_cmd("stop", "testpmd> ")
             self.logger.info(outstring3)
-            self.verify_queue_number(outstring3, qn + 1, 254)
+            self.verify_queue_number(outstring3, qn + 1, PACKET_COUNT)
             self.vm0_testpmd.execute_cmd('quit', '# ')
             self.dut.send_expect("quit", "# ")
 
@@ -279,7 +279,7 @@ class TestRuntimeVfQn(TestCase):
                 self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ")
                 self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ")
                 self.vm0_testpmd.execute_cmd('port config 0 rss-hash-key ipv4 %s' % RSS_KEY)
-                self.verify_result(valid_qn, 500)
+                self.verify_result(valid_qn, PACKET_COUNT)
                 self.vm0_testpmd.execute_cmd('quit', '# ')
             else:
                 self.vm0_testpmd.start_testpmd(self.pmdout.default_cores, eal_param=gest_eal_param,
@@ -287,7 +287,7 @@ class TestRuntimeVfQn(TestCase):
                 self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ")
                 self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ")
                 self.vm0_testpmd.execute_cmd('port config 0 rss-hash-key ipv4 %s' % RSS_KEY)
-                self.verify_result(valid_qn, 500)
+                self.verify_result(valid_qn, PACKET_COUNT)
                 self.vm0_testpmd.execute_cmd('quit', '# ')
 
     def test_set_invalid_vf_qn_in_testpmd(self):
@@ -329,13 +329,13 @@ class TestRuntimeVfQn(TestCase):
                 guest_cmds.insert(0, ['set promisc all off'])
                 guest_cmds.insert(0, ['set verbose 1'])
                 self.execute_testpmd_cmd(guest_cmds)
-                self.verify_result(valid_qn, 500)
+                self.verify_result(valid_qn, PACKET_COUNT)
             else:
                 guest_cmds = self.testpmd_config_cmd_list(valid_qn)
                 guest_cmds.insert(0, ['set fwd mac'])
                 guest_cmds.insert(0, ['set promisc all off'])
                 self.execute_testpmd_cmd(guest_cmds)
-                self.verify_result(valid_qn, 500)
+                self.verify_result(valid_qn, PACKET_COUNT)
         self.vm0_testpmd.execute_cmd('quit', '# ')
 
     def test_set_invalid_vf_qn_with_testpmd_func_cmd(self):
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1] tests/TestSuite_runtime_vf_queue_number update rss-hash-key after command port start all
  2019-08-29 11:40 [dts] [PATCH V1] tests/TestSuite_runtime_vf_queue_number update rss-hash-key after command port start all Jianwei Mei
@ 2019-09-04  5:28 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-09-04  5:28 UTC (permalink / raw)
  To: Mei, JianweiX, dts; +Cc: Mei, JianweiX

Applied failed, could you please rework it. Thanks


> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei
> Sent: Thursday, August 29, 2019 7:41 PM
> To: dts@dpdk.org
> Cc: Mei, JianweiX <jianweix.mei@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_runtime_vf_queue_number update
> rss-hash-key after command port start all
> 
> set rss-hash key after execute port start all and reduce packet count to save
> time.
> 
> Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
> ---
>  tests/TestSuite_runtime_vf_queue_number.py | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_runtime_vf_queue_number.py
> b/tests/TestSuite_runtime_vf_queue_number.py
> index 3e04489..f484f70 100644
> --- a/tests/TestSuite_runtime_vf_queue_number.py
> +++ b/tests/TestSuite_runtime_vf_queue_number.py
> @@ -41,6 +41,7 @@ from test_case import TestCase  from pmd_output
> import PmdOutput
> 
>  RSS_KEY =
> '6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2
> D5E49566EE0ED1962AFA1B7932F3549520FD71C75E'
> +PACKET_COUNT = 100
> 
>  class TestRuntimeVfQn(TestCase):
>      supported_vf_driver = ['pci-stub', 'vfio-pci'] @@ -48,7 +49,7 @@ class
> TestRuntimeVfQn(TestCase):
>          self.dut_ports = self.dut.get_ports(self.nic)
>          self.verify(len(self.dut_ports) >= 1, 'Insufficient ports')
>          self.src_intf = self.tester.get_interface(self.tester.get_local_port(0))
> -        self.src_mac =  self.tester.get_mac(self.tester.get_local_port(0))
> +        self.src_mac =
> + self.tester.get_mac(self.tester.get_local_port(0))
>          self.dst_mac = self.dut.get_mac_address(0)
>          self.vm0 = None
>          self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci']
> @@ -187,10 +188,10 @@ class TestRuntimeVfQn(TestCase):
>      def testpmd_config_cmd_list(self, qn):
>          cmd_list = [['stop'],
>                      ['port stop all'],
> -                    ['port config 0 rss-hash-key ipv4 %s' % RSS_KEY],
>                      ['port config all txq %d' % qn],
>                      ['port config all rxq %d' % qn],
> -                    ['port start all']]
> +                    ['port start all'],
> +                    ['port config 0 rss-hash-key ipv4 %s' % RSS_KEY]]
>          return cmd_list
> 
>      def verify_result(self, queue_num, pkt_num):
> @@ -225,7 +226,6 @@ class TestRuntimeVfQn(TestCase):
>          for qn in valid_qn:
>              host_eal_param = '-w %s,queue-num-per-vf=%d --file-prefix=test1 --
> socket-mem 1024,1024' % (self.pf_pci, qn)
>              self.host_testpmd.start_testpmd(self.pmdout.default_cores,
> param='', eal_param=host_eal_param)
> -
>              gest_eal_param = '-w %s --file-prefix=test2' %
> self.vm_dut_0.ports_info[0]['pci']
>              self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>              self.vm0_testpmd.start_testpmd(self.pmdout.default_cores,
> eal_param=gest_eal_param, param='') @@ -236,18 +236,18 @@ class
> TestRuntimeVfQn(TestCase):
>              self.verify("port 0: RX queue number: %d Tx queue number: %d" %
> (qn, qn) in outstring, "The RX/TX queue number error.")
>              self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>              self.vf_mac = self.vm0_testpmd.get_port_mac(self.vm0_dut_ports[0])
> -            self.send_packet(self.vf_mac, self.src_intf, 100)
> +            self.send_packet(self.vf_mac, self.src_intf, PACKET_COUNT)
>              outstring1 = self.vm0_testpmd.execute_cmd("stop", "testpmd> ")
> -            self.verify_queue_number(outstring1, qn, 100)
> +            self.verify_queue_number(outstring1, qn, PACKET_COUNT)
>              guest_cmds1 = self.testpmd_config_cmd_list(qn + 1)
>              self.execute_testpmd_cmd(guest_cmds1)
>              outstring2 = self.vm0_testpmd.execute_cmd("start", "testpmd> ")
>              self.logger.info(outstring2)
>              self.verify("port 0: RX queue number: %d Tx queue number: %d" %
> ((qn + 1), (qn + 1)) in outstring2, "The RX/TX queue number error.")
> -            self.send_packet(self.vf_mac, self.src_intf, 254)
> +            self.send_packet(self.vf_mac, self.src_intf, PACKET_COUNT)
>              outstring3 = self.vm0_testpmd.execute_cmd("stop", "testpmd> ")
>              self.logger.info(outstring3)
> -            self.verify_queue_number(outstring3, qn + 1, 254)
> +            self.verify_queue_number(outstring3, qn + 1, PACKET_COUNT)
>              self.vm0_testpmd.execute_cmd('quit', '# ')
>              self.dut.send_expect("quit", "# ")
> 
> @@ -279,7 +279,7 @@ class TestRuntimeVfQn(TestCase):
>                  self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ")
>                  self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ")
>                  self.vm0_testpmd.execute_cmd('port config 0 rss-hash-key
> ipv4 %s' % RSS_KEY)
> -                self.verify_result(valid_qn, 500)
> +                self.verify_result(valid_qn, PACKET_COUNT)
>                  self.vm0_testpmd.execute_cmd('quit', '# ')
>              else:
>                  self.vm0_testpmd.start_testpmd(self.pmdout.default_cores,
> eal_param=gest_eal_param, @@ -287,7 +287,7 @@ class
> TestRuntimeVfQn(TestCase):
>                  self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ")
>                  self.vm0_testpmd.execute_cmd("set fwd mac", "testpmd> ")
>                  self.vm0_testpmd.execute_cmd('port config 0 rss-hash-key
> ipv4 %s' % RSS_KEY)
> -                self.verify_result(valid_qn, 500)
> +                self.verify_result(valid_qn, PACKET_COUNT)
>                  self.vm0_testpmd.execute_cmd('quit', '# ')
> 
>      def test_set_invalid_vf_qn_in_testpmd(self):
> @@ -329,13 +329,13 @@ class TestRuntimeVfQn(TestCase):
>                  guest_cmds.insert(0, ['set promisc all off'])
>                  guest_cmds.insert(0, ['set verbose 1'])
>                  self.execute_testpmd_cmd(guest_cmds)
> -                self.verify_result(valid_qn, 500)
> +                self.verify_result(valid_qn, PACKET_COUNT)
>              else:
>                  guest_cmds = self.testpmd_config_cmd_list(valid_qn)
>                  guest_cmds.insert(0, ['set fwd mac'])
>                  guest_cmds.insert(0, ['set promisc all off'])
>                  self.execute_testpmd_cmd(guest_cmds)
> -                self.verify_result(valid_qn, 500)
> +                self.verify_result(valid_qn, PACKET_COUNT)
>          self.vm0_testpmd.execute_cmd('quit', '# ')
> 
>      def test_set_invalid_vf_qn_with_testpmd_func_cmd(self):
> --
> 1.8.3.1


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

end of thread, other threads:[~2019-09-04  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 11:40 [dts] [PATCH V1] tests/TestSuite_runtime_vf_queue_number update rss-hash-key after command port start all Jianwei Mei
2019-09-04  5:28 ` 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).