test suite reviews and discussions
 help / color / mirror / Atom feed
From: Michael Qiu <michael.qiu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH] TSO: Add RRC support and some bug fix
Date: Wed, 14 Oct 2015 16:18:08 +0800	[thread overview]
Message-ID: <1444810688-19256-1-git-send-email-michael.qiu@intel.com> (raw)

Add RRC support and some bug fix.

Signed-off-by: Mihcael Qiu <michael.qiu@intel.com>
---
 tests/TestSuite_tso.py | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 392157f..c3a13ee 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -83,7 +83,8 @@ class TestTSO(TestCase):
         # this feature support Fortville, Niantic
         self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM",
                                  "82540EM", "springfountain", "fortville_eagle",
-                                 "fortville_spirit", "fortville_spirit_single"],
+                                 "fortville_spirit", "fortville_spirit_single",
+                                 "redrockcanyou"],
                     "NIC Unsupported: " + str(self.nic))
 
         # Based on h/w type, choose how many ports to use
@@ -138,7 +139,7 @@ class TestTSO(TestCase):
 
         for iface in ifaces:
             command = ('tcpdump -w tcpdump_{0}.pcap -i {0} 2>tcpdump_{0}.out &').format(iface)
-            self.tester.send_expect('rm -f tcpdump_{0}.pcap', '#').format(iface)
+            self.tester.send_expect(('rm -f tcpdump_{0}.pcap').format(iface), '#')
             self.tester.send_expect(command, '#')
 
     def tcpdump_stop_sniff(self):
@@ -182,7 +183,7 @@ class TestTSO(TestCase):
         self.verify(cores is not None, "Insufficient cores for speed testing")
         self.coreMask = dts.create_mask(cores)
 
-        padding = self.frame_sizes[0] - self.headers_size
+        padding = [self.frame_sizes[0] - self.headers_size, self.frame_sizes[1] - self.headers_size]
 
         self.tester.send_expect("ethtool -K %s rx off tx off tso off gso off gro off lro off" % tx_interface, "# ")
         self.tester.send_expect("ip l set %s up" % tx_interface, "# ")
@@ -206,6 +207,7 @@ class TestTSO(TestCase):
 
         self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
         self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+	self.dut.send_expect("set promisc all off", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ")
 
         self.tester.scapy_foreground()
@@ -214,31 +216,34 @@ class TestTSO(TestCase):
         # IPv4 tcp test
 
         self.tcpdump_start_sniffing([tx_interface, rx_interface])
-        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' % (mac, padding, tx_interface))
+        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' % (mac, padding[0], tx_interface))
         out = self.tester.scapy_execute()
         out = self.dut.send_expect("show port stats all", "testpmd> ", 120)
         print out
         self.tcpdump_stop_sniff()
         rx_stats = self.number_of_packets(rx_interface)
-        if (rx_stats == 2):
-            self.verify(1, "Pass")
+        self.verify(rx_stats == 1, "FAIL")
 
         # IPv6 tcp test
 
         self.tcpdump_start_sniffing([tx_interface, rx_interface])
-        self.tester.scapy_append('sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' % (mac, padding, tx_interface))
+        self.tester.scapy_append('sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' % (mac, padding[1], tx_interface))
         out = self.tester.scapy_execute()
         out = self.dut.send_expect("show port stats all", "testpmd> ", 120)
         print out
         self.tcpdump_stop_sniff()
         rx_stats = self.number_of_packets(rx_interface)
-        if (rx_stats == 2):
-            self.verify(1, "Pass")
+        self.verify(rx_stats == 2, "FAIL")
 
     def test_tso_tunneling(self):
         """
         TSO IPv4 TCP, IPv6 TCP, VXLan testing
         """
+        # RedRockCanyou does not support Tunneling in DPDK yet.
+        if self.nic == "redrockcanyou":
+            print dts.RED("fm10k not support this case\n")
+            return
+
         tx_interface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
         rx_interface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[1]))
 
@@ -248,7 +253,7 @@ class TestTSO(TestCase):
         self.verify(cores is not None, "Insufficient cores for speed testing")
         self.coreMask = dts.create_mask(cores)
 
-        padding = self.frame_sizes[0] - self.headers_size
+        padding = [self.frame_sizes[0] - self.headers_size, self.frame_sizes[1] - self.headers_size]
 
         self.tester.send_expect("ethtool -K %s rx off tx off tso off gso off gro off lro off" % tx_interface, "# ")
         self.tester.send_expect("ip l set %s up" % tx_interface, "# ")
@@ -272,6 +277,7 @@ class TestTSO(TestCase):
 
         self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
         self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+        self.dut.send_expect("set promisc all off", "testpmd> ", 120)
         self.dut.send_expect("start", "testpmd> ")
 
         self.tester.scapy_foreground()
@@ -279,25 +285,23 @@ class TestTSO(TestCase):
 
         # Vxlan test
         self.tcpdump_start_sniffing([tx_interface, rx_interface])
-        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport="1021",dport="4789")/VXLAN()/Ether(dst=%s,src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport="1021",dport="1021")/("X"*%s)], iface="%s")' % (mac, mac, padding, tx_interface))
+        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport="1021",dport="4789")/VXLAN()/Ether(dst=%s,src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport="1021",dport="1021")/("X"*%s)], iface="%s")' % (mac, mac, padding[0], tx_interface))
         out = self.tester.scapy_execute()
         out = self.dut.send_expect("show port stats all", "testpmd> ", 120)
         print out
         self.tcpdump_stop_sniff()
         rx_stats = self.number_of_packets(rx_interface)
-        if (rx_stats == 2):
-            self.verify(1, "Pass")
+        self.verify(rx_stats == 1, "FAIL")
 
         # Nvgre test
         self.tcpdump_start_sniffing([tx_interface, rx_interface])
-        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2",proto=47)/NVGRE()/Ether(dst=%s,src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport="1021",dport="1021")/("X"*%s)], iface="%s")' % (mac, mac, padding, tx_interface))
+        self.tester.scapy_append('sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2",proto=47)/NVGRE()/Ether(dst=%s,src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport="1021",dport="1021")/("X"*%s)], iface="%s")' % (mac, mac, padding[1], tx_interface))
         out = self.tester.scapy_execute()
         out = self.dut.send_expect("show port stats all", "testpmd> ", 120)
         print out
         self.tcpdump_stop_sniff()
         rx_stats = self.number_of_packets(rx_interface)
-        if (rx_stats == 2):
-            self.verify(1, "Pass")
+        self.verify(rx_stats == 2, "Pass")
 
     def test_perf_TSO_2ports(self):
         """
@@ -347,6 +351,7 @@ class TestTSO(TestCase):
             self.dut.send_expect("csum parse_tunnel on %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "testpmd> ", 120)
             self.dut.send_expect("set fwd csum", "testpmd> ", 120)
+            self.dut.send_expect("set promisc all off", "testpmd> ", 120)
             self.dut.send_expect("start", "testpmd> ")
             for frame_size in self.frame_sizes:
                 wirespeed = self.wirespeed(self.nic, frame_size, 2)
-- 
1.9.3

             reply	other threads:[~2015-10-14  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14  8:18 Michael Qiu [this message]
2015-10-14  8:30 ` Liu, Yong
2015-11-04  6:24   ` Qiu, Michael
2015-11-04  6:53     ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444810688-19256-1-git-send-email-michael.qiu@intel.com \
    --to=michael.qiu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).