From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B9164A00E6 for ; Wed, 12 Jun 2019 08:25:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A89591D138; Wed, 12 Jun 2019 08:25:23 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3C7E71D133 for ; Wed, 12 Jun 2019 08:25:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2019 23:25:20 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 11 Jun 2019 23:25:19 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 11 Jun 2019 23:25:19 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 11 Jun 2019 23:25:18 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.104]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.72]) with mapi id 14.03.0439.000; Wed, 12 Jun 2019 14:25:17 +0800 From: "Tu, Lijuan" To: "Zhu, ShuaiX" , "dts@dpdk.org" CC: "Zhu, ShuaiX" Thread-Topic: [dts] [PATCH V2] tests/tso:Optimize the verification result. Thread-Index: AQHVH/5hJoab9cR1e0GJrR0f26M3zqaXjy0A Date: Wed, 12 Jun 2019 06:25:16 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BABA6DE@SHSMSX101.ccr.corp.intel.com> References: <1560220791-154580-1-git-send-email-shuaix.zhu@intel.com> In-Reply-To: <1560220791-154580-1-git-send-email-shuaix.zhu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWQ3NjY2OGMtNmRjZS00NTc3LTlmY2ItY2EzN2NiMTZjMTRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOHNMcU1EcEsrSnM3ZG1XcllIUHI2MExmTWdMK1JxYnBQM2lwekJUSDVZclNhd0p2bGR1Q05aNTlnbmU5THNcL3UifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2] tests/tso:Optimize the verification result. 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhu,shuai > Sent: Tuesday, June 11, 2019 10:40 AM > To: dts@dpdk.org > Cc: Zhu, ShuaiX > Subject: [dts] [PATCH V2] tests/tso:Optimize the verification result. >=20 > Signed-off-by: zhu,shuai > --- > tests/TestSuite_tso.py | 209 ++++++++++++++++++++++++++++------------- > 1 file changed, 143 insertions(+), 66 deletions(-) >=20 > diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index > 5e0dbd5..645e24b 100644 > --- a/tests/TestSuite_tso.py > +++ b/tests/TestSuite_tso.py > @@ -36,13 +36,15 @@ DPDK Test suite. > Tests for TSO. >=20 > """ > - > +import os > import utils > import time > import re > from test_case import TestCase > from settings import HEADER_SIZE >=20 > +DEFAULT_MUT =3D 1500 > +TSO_MTU =3D 9000 >=20 > class TestTSO(TestCase): > dut_ports =3D [] > @@ -62,7 +64,7 @@ class TestTSO(TestCase): > self.portMask =3D utils.create_mask([self.dut_ports[0], self.dut= _ports[1]]) > self.ports_socket =3D self.dut.get_numa_id(self.dut_ports[0]) >=20 > - self.frame_sizes =3D [128, 1458] > + self.loading_sizes =3D [128, 800, 801, 1700, 2500] > self.rxfreet_values =3D [0, 8, 16, 32, 64, 128] >=20 > self.test_cycles =3D [{'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {= }}] @@ -76,6 > +78,7 @@ class TestTSO(TestCase): >=20 > self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE[ > 'ip'] + HEADER_SIZE['tcp'] > + self.tester.send_expect("ifconfig %s mtu %s" % > + (self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0 > + ])), TSO_MTU), "# ") >=20 > def set_up(self): > """ > @@ -83,6 +86,16 @@ class TestTSO(TestCase): > """ > pass >=20 > + def load_module(self): > + """ > + Load vxlan or nvgre module to scapy. > + """ > + cwd =3D os.getcwd() > + dir_module =3D cwd + r'/' + 'dep' > + self.tester.scapy_append('sys.path.append("%s")' % dir_module) > + self.tester.scapy_append("from vxlan import Vxlan") > + self.tester.scapy_append('from nvgre import NVGRE') > + > def tcpdump_start_sniffing(self, ifaces=3D[]): > """ > Starts tcpdump in the background to sniff the tester interface w= here > @@ -93,7 +106,8 @@ class TestTSO(TestCase): >=20 > for iface in ifaces: > command =3D ('tcpdump -w tcpdump_{0}.pcap -i {0} 2>tcpdump_{= 0}.out > &').format(iface) > - self.tester.send_expect('rm -f tcpdump_{0}.pcap', '#').forma= t(iface) > + del_cmd =3D ('rm -f tcpdump_{0}.pcap').format(iface) > + self.tester.send_expect(del_cmd, '#') > self.tester.send_expect(command, '#') >=20 > def tcpdump_stop_sniff(self): > @@ -125,6 +139,21 @@ class TestTSO(TestCase): > 'grep -c "seq"') > return self.tcpdump_command(command.format(**locals())) >=20 > + def tcpdump_scanner(self, scanner): > + """ > + Execute scanner to return results > + """ > + scanner_result =3D self.tester.send_expect(scanner, '#') > + fially_result =3D re.findall(r'length( \d+)', scanner_result) > + return list(fially_result) > + > + def number_of_bytes(self, iface): > + """ > + Get the length of loading_sizes > + """ > + scanner =3D ('tcpdump -vv -r tcpdump_{iface}.pcap 2>/dev/null |= grep > "seq" | grep "length"') > + return self.tcpdump_scanner(scanner.format(**locals())) > + > def test_tso(self): > """ > TSO IPv4 TCP, IPv6 TCP, VXLan testing @@ -137,12 +166,11 @@ clas= s > TestTSO(TestCase): > self.verify(cores is not None, "Insufficient cores for speed tes= ting") > self.coreMask =3D utils.create_mask(cores) >=20 > - padding =3D self.frame_sizes[0] - self.headers_size >=20 > 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, "# ") >=20 > - cmd =3D "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=3D512 --txd= =3D512 -- > burst=3D32 --rxfreet=3D64 --mbcache=3D128 --portmask=3D%s --txpt=3D36 --t= xht=3D0 -- > txwt=3D0 --txfreet=3D32 --txrst=3D32 " % (self.target, self.coreMask, > self.dut.get_memory_channels(), self.blacklist, self.portMask) > + cmd =3D "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=3D512 > + --txd=3D512 --burst=3D32 --rxfreet=3D64 --mbcache=3D128 --portmask=3D%s > + --max-pkt-len=3D%s --txpt=3D36 --txht=3D0 --txwt=3D0 --txfreet=3D32 --t= xrst=3D32 " > + % (self.target, self.coreMask, self.dut.get_memory_channels(), > + self.blacklist, self.portMask, TSO_MTU) > self.dut.send_expect(cmd, "testpmd> ", 120) > self.dut.send_expect("set verbose 1", "testpmd> ", 120) > self.dut.send_expect("port stop all", "testpmd> ", 120) @@ -163,= 34 > +191,55 @@ class TestTSO(TestCase): > self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "test= pmd> ", > 120) > self.dut.send_expect("set fwd csum", "testpmd> ", 120) > self.dut.send_expect("port start all", "testpmd> ", 120) > + self.dut.send_expect("set promisc all off", "testpmd> ", 120) > self.dut.send_expect("start", "testpmd> ") >=20 > self.tester.scapy_foreground() > time.sleep(5) >=20 > - # IPv4 tcp test > - > - self.tcpdump_start_sniffing([tx_interface, rx_interface]) > - > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2")/TCP(sport=3D1021,dport=3D1021)/(= "X"*%s)], > iface=3D"%s")' % (mac, padding, tx_interface)) > - out =3D self.tester.scapy_execute() > - out =3D self.dut.send_expect("show port stats all", "testpmd> ",= 120) > - print out > - self.tcpdump_stop_sniff() > - rx_stats =3D self.number_of_packets(rx_interface) > - if (rx_stats =3D=3D 2): > - self.verify(1, "Pass") > - > - # IPv6 tcp test > - > - self.tcpdump_start_sniffing([tx_interface, rx_interface]) > - self.tester.scapy_append('sendp([Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/IPv6(src=3D"FE80:0:0:0:200:1FF:FE00:200", > dst=3D"3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=3D1021,dport= =3D102 > 1)/("X"*%s)], iface=3D"%s")' % (mac, padding, tx_interface)) > - out =3D self.tester.scapy_execute() > - out =3D self.dut.send_expect("show port stats all", "testpmd> ",= 120) > - print out > - self.tcpdump_stop_sniff() > - rx_stats =3D self.number_of_packets(rx_interface) > - if (rx_stats =3D=3D 2): > - self.verify(1, "Pass") > + for loading_size in self.loading_sizes: > + # IPv4 tcp test > + self.tcpdump_start_sniffing([tx_interface, rx_interface]) > + out =3D self.dut.send_expect("clear port info all", "testpmd= > ", 120) > + > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2")/TCP(sport=3D1021,dport=3D1021)/(= "X"*%s)], > iface=3D"%s")' % (mac, loading_size, tx_interface)) > + out =3D self.tester.scapy_execute() > + out =3D self.dut.send_expect("show port stats all", "testpmd= > ", 120) > + print out > + self.tcpdump_stop_sniff() > + rx_stats =3D self.number_of_packets(rx_interface) > + tx_stats =3D self.number_of_packets(tx_interface) > + tx_outlist =3D self.number_of_bytes(rx_interface) > + self.logger.info(tx_outlist) > + if (loading_size <=3D 800): > + self.verify(rx_stats =3D=3D tx_stats and int(tx_outlist[= 0]) =3D=3D > loading_size, "IPV6 RX or TX packet number not correct") > + else: > + num =3D loading_size/800 > + for i in range(num): > + self.verify(int(tx_outlist[i]) =3D=3D 800, "the pack= et segmentation > incorrect, %s" % tx_outlist) > + if loading_size% 800 !=3D 0: > + self.verify(int(tx_outlist[num]) =3D=3D loading_size= % > + 800, "the packet segmentation incorrect, %s" % tx_outlist) > + > + for loading_size in self.loading_sizes: > + # IPv6 tcp test > + self.tcpdump_start_sniffing([tx_interface, rx_interface]) > + out =3D self.dut.send_expect("clear port info all", "testpmd= > ", 120) > + self.tester.scapy_append('sendp([Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/IPv6(src=3D"FE80:0:0:0:200:1FF:FE00:200", > dst=3D"3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=3D1021,dport= =3D102 > 1)/("X"*%s)], iface=3D"%s")' % (mac, loading_size, tx_interface)) > + out =3D self.tester.scapy_execute() > + out =3D self.dut.send_expect("show port stats all", "testpmd= > ", 120) > + print out > + self.tcpdump_stop_sniff() > + rx_stats =3D self.number_of_packets(rx_interface) > + tx_stats =3D self.number_of_packets(tx_interface) > + tx_outlist =3D self.number_of_bytes(rx_interface) > + self.logger.info(tx_outlist) > + if (loading_size <=3D 800): > + self.verify(rx_stats =3D=3D tx_stats and int(tx_outlist[= 0]) =3D=3D > loading_size, "IPV6 RX or TX packet number not correct") > + else: > + num =3D loading_size/800 > + for i in range(num): > + self.verify(int(tx_outlist[i]) =3D=3D 800, "the pack= et segmentation > incorrect, %s" % tx_outlist) > + if loading_size% 800 !=3D 0: > + self.verify(int(tx_outlist[num]) =3D=3D loading_size= % > + 800, "the packet segmentation incorrect, %s" % tx_outlist) >=20 > def test_tso_tunneling(self): > """ > @@ -205,12 +254,10 @@ class TestTSO(TestCase): > self.verify(cores is not None, "Insufficient cores for speed tes= ting") > self.coreMask =3D utils.create_mask(cores) >=20 > - padding =3D self.frame_sizes[0] - 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, "# ") >=20 > - cmd =3D "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=3D512 --txd= =3D512 -- > burst=3D32 --rxfreet=3D64 --mbcache=3D128 --portmask=3D%s --txpt=3D36 --t= xht=3D0 -- > txwt=3D0 --txfreet=3D32 --txrst=3D32 " % (self.target, self.coreMask, > self.dut.get_memory_channels(), self.blacklist, self.portMask) > + cmd =3D "./%s/app/testpmd -c %s -n %d %s -- -i --rxd=3D512 > + --txd=3D512 --burst=3D32 --rxfreet=3D64 --mbcache=3D128 --portmask=3D%s > + --max-pkt-len=3D%s --txpt=3D36 --txht=3D0 --txwt=3D0 --txfreet=3D32 --t= xrst=3D32 " > + % (self.target, self.coreMask, self.dut.get_memory_channels(), > + self.blacklist, self.portMask, TSO_MTU) > self.dut.send_expect(cmd, "testpmd> ", 120) > self.dut.send_expect("set verbose 1", "testpmd> ", 120) > self.dut.send_expect("port stop all", "testpmd> ", 120) @@ -228,= 35 > +275,62 @@ class TestTSO(TestCase): > self.dut.send_expect("csum set outer-ip hw %d" % self.dut_ports[= 1], > "testpmd> ", 120) > self.dut.send_expect("csum parse-tunnel on %d" % self.dut_ports[= 1], > "testpmd> ", 120) >=20 > - self.dut.send_expect("tso set 800 %d" % self.dut_ports[1], "test= pmd> ", > 120) > + self.dut.send_expect("tunnel_tso set 800 %d" % self.dut_ports[1]= , > "testpmd> ", 120) > + self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd> ", > + 120) > self.dut.send_expect("set fwd csum", "testpmd> ", 120) > self.dut.send_expect("port start all", "testpmd> ", 120) > + self.dut.send_expect("set promisc all off", "testpmd> ", 120) > self.dut.send_expect("start", "testpmd> ") >=20 > self.tester.scapy_foreground() > time.sleep(5) >=20 > - # Vxlan test > - self.tcpdump_start_sniffing([tx_interface, rx_interface]) > - > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2")/UDP(sport=3D"1021",dport=3D"4789= ")/VXLA > N()/Ether(dst=3D%s,src=3D"52:00:00:00:00:00")/IP(src=3D"192.168.1.1",dst= =3D"192.168. > 1.2")/TCP(sport=3D"1021",dport=3D"1021")/("X"*%s)], iface=3D"%s")' % (mac= , mac, > padding, tx_interface)) > - out =3D self.tester.scapy_execute() > - out =3D self.dut.send_expect("show port stats all", "testpmd> ",= 120) > - print out > - self.tcpdump_stop_sniff() > - rx_stats =3D self.number_of_packets(rx_interface) > - if (rx_stats =3D=3D 2): > - self.verify(1, "Pass") > - > - # Nvgre test > - self.tcpdump_start_sniffing([tx_interface, rx_interface]) > - > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2",proto=3D47)/NVGRE()/Ether(dst=3D%= s,src=3D"52 > :00:00:00:00:00")/IP(src=3D"192.168.1.1",dst=3D"192.168.1.2")/TCP(sport= =3D"1021",d > port=3D"1021")/("X"*%s)], iface=3D"%s")' % (mac, mac, padding, tx_interfa= ce)) > - out =3D self.tester.scapy_execute() > - out =3D self.dut.send_expect("show port stats all", "testpmd> ",= 120) > - print out > - self.tcpdump_stop_sniff() > - rx_stats =3D self.number_of_packets(rx_interface) > - if (rx_stats =3D=3D 2): > - self.verify(1, "Pass") > + for loading_size in self.loading_sizes: > + # Vxlan test > + self.tcpdump_start_sniffing([tx_interface, rx_interface]) > + self.load_module() > + out =3D self.dut.send_expect("clear port info all", "testpmd= > ", 120) > + > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2")/UDP(sport=3D1021,dport=3D4789)/V= xlan()/Et > her(dst=3D"%s",src=3D"52:00:00:00:00:00")/IP(src=3D"192.168.1.1",dst=3D"1= 92.168.1.2") > /TCP(sport=3D1021,dport=3D1021)/("X"*%s)], iface=3D"%s")' % (mac, mac, > loading_size, tx_interface)) > + out =3D self.tester.scapy_execute() > + out =3D self.dut.send_expect("show port stats all", "testpmd= > ", 120) > + print out > + self.tcpdump_stop_sniff() > + rx_stats =3D self.number_of_packets(rx_interface) > + tx_stats =3D self.number_of_packets(tx_interface) > + tx_outlist =3D self.number_of_bytes(rx_interface) > + self.logger.info(tx_outlist) > + if (loading_size <=3D 800): > + self.verify(rx_stats =3D=3D tx_stats and int(tx_outlist[= 0]) =3D=3D > loading_size, "Vxlan RX or TX packet number not correct") > + else: > + num =3D loading_size/800 > + for i in range(num): > + self.verify(int(tx_outlist[i]) =3D=3D 800, "the pack= et segmentation > incorrect, %s" % tx_outlist) > + if loading_size% 800 !=3D 0: > + self.verify(int(tx_outlist[num]) =3D=3D loading_size= % > + 800, "the packet segmentation incorrect, %s" % tx_outlist) > + > + for loading_size in self.loading_sizes: > + # Nvgre test > + self.tcpdump_start_sniffing([tx_interface, rx_interface]) > + self.load_module() > + out =3D self.dut.send_expect("clear port info all", "testpmd= > ", 120) > + > self.tester.scapy_append('sendp([Ether(dst=3D"%s",src=3D"52:00:00:00:00:0= 0")/IP( > src=3D"192.168.1.1",dst=3D"192.168.1.2",proto=3D47)/NVGRE()/Ether(dst=3D"= %s",src=3D" > 52:00:00:00:00:00")/IP(src=3D"192.168.1.1",dst=3D"192.168.1.2")/TCP(sport= =3D1021,d > port=3D1021)/("X"*%s)], iface=3D"%s")' % (mac, mac, loading_size, tx_inte= rface)) > + out =3D self.tester.scapy_execute() > + out =3D self.dut.send_expect("show port stats all", "testpmd= > ", 120) > + print out > + self.tcpdump_stop_sniff() > + rx_stats =3D self.number_of_packets(rx_interface) > + tx_stats =3D self.number_of_packets(tx_interface) > + tx_outlist =3D self.number_of_bytes(rx_interface) > + self.logger.info(tx_outlist) > + if (loading_size <=3D 800): > + self.verify(rx_stats =3D=3D tx_stats and int(tx_outlist[= 0]) =3D=3D > loading_size, "Nvgre RX or TX packet number not correct") > + else: > + num =3D loading_size/800 > + for i in range(num): > + self.verify(int(tx_outlist[i]) =3D=3D 800, "the pack= et segmentation > incorrect, %s" % tx_outlist) > + if loading_size% 800 !=3D 0: > + self.verify(int(tx_outlist[num]) =3D=3D loading_size= % > + 800, "the packet segmentation incorrect, %s" % tx_outlist) > + >=20 > def test_perf_TSO_2ports(self): > """ > @@ -276,7 +350,7 @@ class TestTSO(TestCase): > else: > queues =3D 1 >=20 > - command_line =3D "./%s/app/testpmd -c %s -n %d %s -- -i -- > coremask=3D%s --rxd=3D512 --txd=3D512 --burst=3D32 --rxfreet=3D64 --mbcac= he=3D128 -- > portmask=3D%s --txpt=3D36 --txht=3D0 --txwt=3D0 --txfreet=3D32 --txrst=3D= 32 " % > (self.target, self.all_cores_mask, self.dut.get_memory_channels(), > self.blacklist, self.coreMask, self.portMask) > + command_line =3D "./%s/app/testpmd -c %s -n %d %s -- -i > + --coremask=3D%s --rxd=3D512 --txd=3D512 --burst=3D32 --rxfreet=3D64 > + --mbcache=3D128 --portmask=3D%s --max-pkt-len=3D%s --txpt=3D36 --txht= =3D0 > + --txwt=3D0 --txfreet=3D32 --txrst=3D32 " % (self.target, > + self.all_cores_mask, self.dut.get_memory_channels(), self.blacklist, > + self.coreMask, self.portMask, TSO_MTU) >=20 > info =3D "Executing PMD using %s\n" % test_cycle['cores'] > self.logger.info(info) > @@ -300,18 +374,20 @@ 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("port start all", "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: > + for loading_size in self.loading_sizes: > + frame_size =3D loading_size + self.headers_size > wirespeed =3D self.wirespeed(self.nic, frame_size, 2) >=20 > # create pcap file > self.logger.info("Running with frame size %d " % frame_s= ize) > payload_size =3D frame_size - self.headers_size > for _port in range(2): > - mac =3D self.dut.get_mac_address(self.dut_ports[_port]) > - self.tester.scapy_append('wrpcap("dst%d.pcap", > [Ether(dst=3D"%s",src=3D"52:00:00:00:00:01")/IP(src=3D"192.168.1.1",dst= =3D"192.168.1. > 2")/TCP(sport=3D1021,dport=3D1021)/("X"*%d)])' % (_port, mac, payload_siz= e)) > - > tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]), > - self.tester.get_local_port(self.dut_ports[1-_= port]), > "dst%d.pcap") % _port) > + mac =3D self.dut.get_mac_address(self.dut_ports[_por= t]) > + self.tester.scapy_append('wrpcap("dst%d.pcap", > [Ether(dst=3D"%s",src=3D"52:00:00:00:00:01")/IP(src=3D"192.168.1.1",dst= =3D"192.168.1. > 2")/TCP(sport=3D1021,dport=3D1021)/("X"*%d)])' % (_port, mac, loading_siz= e)) > + > tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]), > + > + self.tester.get_local_port(self.dut_ports[1-_port]), "dst%d.pcap") % > + _port) > self.tester.scapy_execute() >=20 > # run traffic generator @@ -326,21 +402,22 @@ class > TestTSO(TestCase): > time.sleep(5) >=20 > for n in range(len(self.test_cycles)): > - for frame_size in self.frame_sizes: > + for loading_size in self.loading_sizes: > self.verify(self.test_cycles[n]['Mpps'][ > - frame_size] > 0, "No traffic detected") > + loading_size] > 0, "No traffic detected") >=20 > # Print results > self.result_table_create(self.table_header) > - for frame_size in self.frame_sizes: > - table_row =3D [frame_size] > + for loading_size in self.loading_sizes: > + table_row =3D [loading_size] > for test_cycle in self.test_cycles: > - table_row.append(test_cycle['Mpps'][frame_size]) > - table_row.append(test_cycle['pct'][frame_size]) > + table_row.append(test_cycle['Mpps'][loading_size]) > + table_row.append(test_cycle['pct'][loading_size]) >=20 > self.result_table_add(table_row) >=20 > self.result_table_print() > + > def tear_down(self): > """ > Run after each test case. > @@ -352,4 +429,4 @@ class TestTSO(TestCase): > """ > Run after each test suite. > """ > - pass > + self.tester.send_expect("ifconfig %s mtu %s" % > + (self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0 > + ])), DEFAULT_MUT), "# ") > -- > 2.17.2