From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1D664A6A for ; Wed, 14 Oct 2015 10:18:22 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Oct 2015 01:18:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="810627610" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 14 Oct 2015 01:18:19 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t9E8IDaK027650; Wed, 14 Oct 2015 16:18:13 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t9E8I9gs019291; Wed, 14 Oct 2015 16:18:11 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9E8I9Uv019287; Wed, 14 Oct 2015 16:18:09 +0800 From: Michael Qiu To: dts@dpdk.org Date: Wed, 14 Oct 2015 16:18:08 +0800 Message-Id: <1444810688-19256-1-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] TSO: Add RRC support and some bug fix X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 08:18:23 -0000 Add RRC support and some bug fix. Signed-off-by: Mihcael Qiu --- 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