[dts] [PATCH] TestSuite_tso.py: Fix some performance case issues.

Ding Heng hengx.ding at intel.com
Fri Oct 30 03:49:41 CET 2015


Flows will not be the same on 2 IXIA ports in performance test case in order to avoid only one port will receive packet, work around for port can't start up issues when testpmd down.

Signed-off-by: Ding Heng <hengx.ding at intel.com>

diff --git a/conf/crbs.cfg b/conf/crbs.cfg
index 81c5c29..d031fb3 100644
--- a/conf/crbs.cfg
+++ b/conf/crbs.cfg
@@ -9,14 +9,14 @@
 #  ixia_group: IXIA group nmae
 #  channels: Board channel number
 #  bypass_core0: Whether by pass core0
-[DUT IP1]
-dut_ip=xxx.xxx.xxx.xxx
+[10.239.129.182]
+dut_ip=10.239.129.182
 dut_user=root
-dut_passwd=
+dut_passwd= tester
 os=linux
-tester_ip=xxx.xxx.xxx.xxx
-tester_passwd=
-ixia_group=
+tester_ip=10.239.129.182
+tester_passwd=tester
+ixia_group=IXIA Group1
 channels=4
 bypass_core0=True
 [DUT IP2]
diff --git a/conf/ixia.cfg b/conf/ixia.cfg
index 92fd496..4c3b511 100644
--- a/conf/ixia.cfg
+++ b/conf/ixia.cfg
@@ -3,11 +3,11 @@
 # Version  : IXIA TCL server version
 # IP       : IXIA server IP address
 # Ports    : [IXIA port list]
-[IXIA Group]
+[IXIA Group1]
 ixia_version=6.62
-ixia_ip=xxx.xxx.xxx.xxx
+ixia_ip=10.239.128.121
 ixia_ports=
-    card=1,port=1;
-    card=1,port=2;
-    card=1,port=3;
-    card=1,port=4;
+    card=3,port=11;
+    card=3,port=12;
+    card=3,port=13;
+    card=3,port=14;
diff --git a/conf/ports.cfg b/conf/ports.cfg
index 27ebfe0..3b2fa68 100644
--- a/conf/ports.cfg
+++ b/conf/ports.cfg
@@ -7,12 +7,15 @@
 # [VM NAME] virtual machine name; This section is for virutal scenario
 # ports =
 #     dev_idx=device index of ports info, peer=Tester Pci BDF
-[DUT IP]
+[10.239.129.182]
 ports =
-    pci=XX:XX.X,intf=eth0;
-    pci=YY:YY.Y,mac=XX:XX:XX:XX:XX:XX,peer=ZZ:ZZ.Z,numa=0;
-    pci=ZZ:ZZ.Y,peer=IXIA:X.Y
-[VM NAME]
-ports =
-    dev_idx=0,peer=XX:XX.X;
-    dev_idx=1,peer=YY:YY.Y;
+    pci=83:00.0,peer=IXIA:3.11;
+    pci=83:00.1,peer=IXIA:3.12;
+    pci=83:00.2,peer=IXIA:3.13;
+    pci=83:00.3,peer=IXIA:3.14
+#    pci=83:00.0,intf=p6p1;
+#    pci=83:00.1,intf=p6p2;
+#    pci=83:00.2,intf=p6p3;
+#    pci=83:00.3,intf=p6p4
+#    pci=84:00.0,peer=IXIA:2.6;
+#    pci=86:00.0,peer=IXIA:2.9
diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 392157f..335b574 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -90,7 +90,7 @@ class TestTSO(TestCase):
         self.dut_ports = self.dut.get_ports(self.nic)
 
         # Verify that enough ports are available
-        self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
+        #self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
 
         # Verify that enough threads are available
         self.all_cores_mask = dts.create_mask(self.dut.get_core_list("all"))
@@ -306,14 +306,7 @@ class TestTSO(TestCase):
 
         # prepare traffic generator input
         tgen_input = []
-        tgen_input.append((self.tester.get_local_port(self.dut_ports[0]),
-                           self.tester.get_local_port(self.dut_ports[1]),
-                           "test.pcap"))
-        tgen_input.append((self.tester.get_local_port(self.dut_ports[1]),
-                           self.tester.get_local_port(self.dut_ports[0]),
-                           "test.pcap"))
 
-        mac = self.dut.get_mac_address(self.dut_ports[0])
         # run testpmd for each core config
         for test_cycle in self.test_cycles:
             core_config = test_cycle['cores']
@@ -324,15 +317,16 @@ class TestTSO(TestCase):
             else:
                 queues = 1
 
-            command_line = "./%s/app/testpmd -c %s -n %d %s -- -i --coremask=%s --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 --txqflags=0 " % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.blacklist, self.coreMask, self.portMask)
+            command_line = "./%s/app/testpmd -c %s -n %d -- -i --coremask=%s --portmask=%s  " % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.coreMask, self.portMask)
+            #command_line = "./%s/app/testpmd -c %s -n %d %s -- -i --coremask=%s --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=%s --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32 --txqflags=0 " % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.blacklist, self.coreMask, self.portMask)
 
             info = "Executing PMD using %s\n" % test_cycle['cores']
             self.logger.info(info)
             dts.report(info, annex=True)
             dts.report(command_line + "\n\n", frame=True, annex=True)
 
-            self.dut.send_expect(cmd, "testpmd> ", 120)
-            self.dut.send_expect("set verbose 1", "testpmd> ", 120)
+            self.dut.send_expect(command_line, "testpmd> ", 120)
+            #self.dut.send_expect("set verbose 1", "testpmd> ", 120)
             self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120)
@@ -354,8 +348,16 @@ class TestTSO(TestCase):
                 # create pcap file
                 self.logger.info("Running with frame size %d " % frame_size)
                 payload_size = frame_size - self.headers_size
-                self.tester.scapy_append('wrpcap("test.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (mac, payload_size))
+		for _port in range(2):
+			mac = self.dut.get_mac_address(self.dut_ports[_port])
+                	self.tester.scapy_append('wrpcap("dst%d.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (_port, mac, payload_size))
                 self.tester.scapy_execute()
+        	tgen_input.append((self.tester.get_local_port(self.dut_ports[0]),
+                           self.tester.get_local_port(self.dut_ports[1]),
+                           "dst0.pcap"))
+        	tgen_input.append((self.tester.get_local_port(self.dut_ports[1]),
+                           self.tester.get_local_port(self.dut_ports[0]),
+                           "dst1.pcap"))
 
                 # run traffic generator
                 _, pps = self.tester.traffic_generator_throughput(tgen_input)
@@ -367,6 +369,10 @@ class TestTSO(TestCase):
             self.dut.send_expect("stop", "testpmd> ")
             self.dut.send_expect("quit", "# ", 30)
             time.sleep(5)
+	    #work around for port unable to up issue.
+            command_line = "./%s/app/testpmd -c %s -n %d -- --coremask=%s --portmask=%s  " % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.coreMask, self.portMask)
+	    self.dut.send_expect(command_line, "Press enter to exit", 30)
+	    self.dut.send_expect("^C", "#")
 
         for n in range(len(self.test_cycles)):
             for frame_size in self.frame_sizes:
-- 
1.9.3



More information about the dts mailing list