test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_vxlan:Modify the hard coded appparameter
@ 2020-12-10 11:32 Zhou Jun
  2020-12-15  6:58 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Zhou Jun @ 2020-12-10 11:32 UTC (permalink / raw)
  To: dts; +Cc: Zhou Jun

Modify the hard coded app parameter to call the platform interface

Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
 tests/TestSuite_vxlan.py | 115 ++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 74 deletions(-)

diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py
index 4a1bf674..fdb6616d 100644
--- a/tests/TestSuite_vxlan.py
+++ b/tests/TestSuite_vxlan.py
@@ -314,9 +314,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         # Verify that enough threads are available
         netdev = self.dut.ports_info[ports[0]]['port']
         self.ports_socket = netdev.socket
-        cores = self.dut.get_core_list("1S/5C/1T", socket=self.ports_socket)
-        self.verify(cores is not None, "Insufficient cores for speed testing")
-        self.coremask = utils.create_mask(cores)
+
 
         # start testpmd
         self.pmdout = PmdOutput(self.dut)
@@ -540,15 +538,10 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         if self.nic in ["columbiaville_25g","columbiaville_100g"]:
             print("CVL support default none VECTOR")
             src_vec_model = 'n'
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
 
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \
-            " --nb-cores=4 --portmask=%(PORT)s"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+        self.dut.send_expect(r'./%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s'
+                % (self.path, self.eal_para, self.portMask), "testpmd>", 30)
 
         self.dut.send_expect("set fwd rxonly", "testpmd>", 10)
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
@@ -579,14 +572,12 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
             print("CVL support default none VECTOR")
             src_vec_model = 'n'
 
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \
-            " --nb-cores=4 --portmask=%(PORT)s"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+
+
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
+
+        self.dut.send_expect(r'./%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s'
+                % (self.path, self.eal_para, self.portMask), "testpmd>", 30)
 
         self.dut.send_expect("set fwd rxonly", "testpmd>", 10)
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
@@ -618,14 +609,12 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         verify vxlan packet checksum offload
         """
         # start testpmd with 2queue/1port
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --portmask=%(PORT)s " + \
-            "--enable-rx-cksum"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+
+
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
+
+        self.dut.send_expect(r'./%s %s -- -i --portmask=%s --enable-rx-cksum'
+                % (self.path, self.eal_para, self.portMask), "testpmd>", 30)
         self.iperr_num = 0
 
         # disable vlan filter
@@ -692,14 +681,12 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         not support ipv6 + sctp
         """
         # start testpmd with 2queue/1port
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --portmask=%(PORT)s " + \
-            "--enable-rx-cksum"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+
+
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
+
+        self.dut.send_expect(r'./%s %s -- -i --portmask=%s --enable-rx-cksum'
+             % (self.path, self.eal_para, self.portMask), "testpmd>", 30)
         self.iperr_num = 0
 
         # disable vlan filter
@@ -766,14 +753,10 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         """
         verify tunnel filter feature
         """
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --disable-rss --rxq={} --txq={}".format(MAX_TXQ_RXQ, MAX_TXQ_RXQ) + \
-            " --nb-cores=4 --portmask=%(PORT)s"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
+
+        self.dut.send_expect(r'./%s %s -- -i --disable-rss --rxq=%d --txq=%d --nb-cores=4 --portmask=%s'
+                % (self.path, self.eal_para, MAX_TXQ_RXQ, MAX_TXQ_RXQ, self.portMask), "testpmd>", 30)
 
         self.dut.send_expect("set fwd rxonly", "testpmd>", 10)
         self.dut.send_expect("set verbose 1", "testpmd>", 10)
@@ -843,14 +826,10 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         config = VxlanTestConfig(self)
         config.outer_mac_dst = self.dut_port_mac
 
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \
-            " --nb-cores=4 --portmask=%(PORT)s"
-        pmd_cmd = pmd_temp % {'TARGET': self.path,
-                              'COREMASK': self.coremask,
-                              'CHANNEL': self.dut.get_memory_channels(),
-                              'PORT': self.portMask}
-        self.dut.send_expect(pmd_cmd, "testpmd>", 30)
+        self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T", socket=self.ports_socket)
+
+        self.dut.send_expect(r'./%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s'
+                % (self.path, self.eal_para, self.portMask), "testpmd>", 30)
 
         self.enable_vxlan(self.dut_port)
         self.enable_vxlan(self.recv_port)
@@ -982,11 +961,9 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
         core_list = self.dut.get_core_list(
             '1S/%dC/1T' % (self.tunnel_multiqueue * 2 + 1),
             socket=self.ports_socket)
-        core_mask = utils.create_mask(core_list)
 
-        pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-            "%(CHANNEL)d -- -i --disable-rss --rxq=2 --txq=2" + \
-            " --nb-cores=4 --portmask=%(PORT)s"
+
+        pmd_temp = "./%s %s -- -i --disable-rss --rxq=2 --txq=2 --nb-cores=4 --portmask=%s"
 
         for perf_config in self.tunnel_perf:
             tun_filter = perf_config['tunnel_filter']
@@ -995,14 +972,10 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
                             % (perf_config['Packet'], tun_filter, recv_queue))))
 
             if tun_filter == "None" and recv_queue == "Multi":
-                pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-                    "%(CHANNEL)d -- -i --rss-udp --rxq=2 --txq=2" + \
-                    " --nb-cores=4 --portmask=%(PORT)s"
-
-            pmd_cmd = pmd_temp % {'TARGET': self.path,
-                                  'COREMASK': core_mask,
-                                  'CHANNEL': self.dut.get_memory_channels(),
-                                  'PORT': self.portMask}
+                pmd_temp = "./%s %s -- -i --rss-udp --rxq=2 --txq=2 --nb-cores=4 --portmask=%s"
+
+            self.eal_para = self.dut.create_eal_parameters(cores=core_list)
+            pmd_cmd = pmd_temp % (self.path, self.eal_para, self.portMask)
             self.dut.send_expect(pmd_cmd, "testpmd> ", 100)
 
             # config flow
@@ -1096,18 +1069,12 @@ class TestVxlan(TestCase, IxiaPacketGenerator):
 
             # multi queue and signle queue commands
             if recv_queue == 'Multi':
-                pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-                    "%(CHANNEL)d -- -i --disable-rss --rxq=2 --txq=2" + \
-                    " --nb-cores=4 --portmask=%(PORT)s"
+                pmd_temp = "./%s %s -- -i --disable-rss --rxq=2 --txq=2 --nb-cores=4 --portmask=%s"
             else:
-                pmd_temp = "./%(TARGET)s -c %(COREMASK)s -n " + \
-                    "%(CHANNEL)d -- -i --nb-cores=2 --portmask=%(PORT)s" + \
-                    ""
-
-            pmd_cmd = pmd_temp % {'TARGET': self.path,
-                                  'COREMASK': core_mask,
-                                  'CHANNEL': self.dut.get_memory_channels(),
-                                  'PORT': self.portMask}
+                pmd_temp = "./%s %s -- -i --nb-cores=2 --portmask=%s"
+
+            self.eal_para = self.dut.create_eal_parameters(cores=core_list)
+            pmd_cmd = pmd_temp % (self.path, self.eal_para, self.portMask)
 
             self.dut.send_expect(pmd_cmd, "testpmd> ", 100)
             self.dut.send_expect("set fwd csum", "testpmd>", 10)
-- 
2.17.1


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

* Re: [dts] [PATCH V1] tests/TestSuite_vxlan:Modify the hard coded appparameter
  2020-12-10 11:32 [dts] [PATCH V1] tests/TestSuite_vxlan:Modify the hard coded appparameter Zhou Jun
@ 2020-12-15  6:58 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-12-15  6:58 UTC (permalink / raw)
  To: Zhou, JunX W, dts; +Cc: Zhou, JunX W

> Modify the hard coded app parameter to call the platform interface
> 
> Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>

Applied

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

end of thread, other threads:[~2020-12-15  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 11:32 [dts] [PATCH V1] tests/TestSuite_vxlan:Modify the hard coded appparameter Zhou Jun
2020-12-15  6:58 ` 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).