From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3785F108F for ; Sun, 22 Jan 2017 04:20:23 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 21 Jan 2017 19:20:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,267,1477983600"; d="scan'208";a="51206042" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 21 Jan 2017 19:20:22 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 21 Jan 2017 19:20:22 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 21 Jan 2017 19:20:21 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Sun, 22 Jan 2017 11:20:18 +0800 From: "Liu, Yong" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" Thread-Topic: [dts] [PATCH] tests: format changed in TestSuite_fortville_rss_granularity_config Thread-Index: AQHScvm7BvZOgyDSEUmad2vRLoaDtqFD1qLA Date: Sun, 22 Jan 2017 03:20:17 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D4F777@SHSMSX103.ccr.corp.intel.com> References: <1484902028-2071-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1484902028-2071-1-git-send-email-yuan.peng@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] tests: format changed in TestSuite_fortville_rss_granularity_config 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: Sun, 22 Jan 2017 03:20:25 -0000 Hi Yuan, There're some space characters in some blank lines. Please remove them. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan > Sent: Friday, January 20, 2017 4:47 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH] tests: format changed in > TestSuite_fortville_rss_granularity_config >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/tests/TestSuite_fortville_rss_granularity_config.py > b/tests/TestSuite_fortville_rss_granularity_config.py > index dd06f06..130ebb0 100644 > --- a/tests/TestSuite_fortville_rss_granularity_config.py > +++ b/tests/TestSuite_fortville_rss_granularity_config.py > @@ -32,7 +32,7 @@ > """ > DPDK Test suite. >=20 > -Test DPDK2.3 feature: > +Test DPDK2.3 feature: > 1.Fortville support granularity configuration of RSS. > By default Fortville uses hash input set preloaded from NVM image which > includes all fields > - IPv4/v6+TCP/UDP port. Potential problem for this is global configurati= on per > device and can @@ -65,11 +65,14 @@ from test_case import TestCase # # > Test class. > # > + > + > class TestFortvilleRssGranularityConfig(TestCase): > # > # > # Utility methods and other non-test code. > # > + > def set_up_all(self): > """ > Run at the start of each test suite. > @@ -91,18 +94,19 @@ class TestFortvilleRssGranularityConfig(TestCase): > Run before each test case. > """ > pass > + > def send_packet(self, itf, tran_type): > """ > Sends packets. > """ > global reta_lines > global reta_num > - self.tester.scapy_foreground() > + self.tester.scapy_foreground() > self.dut.send_expect("start", "testpmd>") > mac =3D self.dut.get_mac_address(0) >=20 > # send packet with different source and dest ip > - i =3D 0 > + i =3D 0 > if tran_type =3D=3D "ipv4-other": > packet =3D r'sendp([Ether(dst=3D"%s", > src=3Dget_if_hwaddr("%s"))/IP(src=3D"192.168.0.%d", dst=3D"192.168.0.%d", > proto=3D47)/GRE(key_present=3D1,proto=3D2048,key=3D67108863)/IP()], iface= =3D"%s")' % > ( > mac, itf, i + 1, i + 2, itf) @@ -124,7 +128,7 @@ class > TestFortvilleRssGranularityConfig(TestCase): > elif tran_type =3D=3D "l2_payload": > packet =3D r'sendp([Ether(dst=3D"%s", > src=3Dget_if_hwaddr("%s"))/Dot1Q(id=3D0x8100,vlan=3D%s)/Dot1Q(id=3D0x8100= ,vlan=3D% > s)], iface=3D"%s")' % ( > mac, itf, i + 1, i + 2, itf) > - self.tester.scapy_append(packet) > + self.tester.scapy_append(packet) > self.tester.scapy_execute() > time.sleep(.5) > elif tran_type =3D=3D "ipv6-tcp": > @@ -165,8 +169,8 @@ class TestFortvilleRssGranularityConfig(TestCase): >=20 > reta_line[name.strip()] =3D value.strip() > reta_lines.append(reta_line) > - > - self.append_result_table() > + > + self.append_result_table() >=20 > def append_result_table(self): > """ > @@ -176,27 +180,25 @@ class TestFortvilleRssGranularityConfig(TestCase): > global reta_lines > global reta_num >=20 > - #append the the hash value and queue id into table > + # append the the hash value and queue id into table > self.result_table_create( > ['packet index', 'hash value', 'hash index', 'queue id']) > - > i =3D 0 >=20 > for tmp_reta_line in reta_lines: > - > + > # compute the hash result of five tuple into the 7 LSBs valu= e. > hash_index =3D int(tmp_reta_line["RSS hash"], 16) % reta_num > - self.result_table_add( > + self.result_table_add( > [i, tmp_reta_line["RSS hash"], hash_index, tmp_reta_line= ["queue"]]) > i =3D i + 1 >=20 > - > def test_ipv4_tcp(self): > dutPorts =3D self.dut.get_ports(self.nic) > localPort =3D self.tester.get_local_port(dutPorts[0]) > itf =3D self.tester.get_interface(localPort) > global reta_num > - global reta_lines > + global reta_lines > flag =3D 1 > self.dut.kill_all() >=20 > @@ -216,57 +218,57 @@ class TestFortvilleRssGranularityConfig(TestCase): > self.dut.send_expect( > "port config all rss tcp", "testpmd> ") > self.send_packet(itf, "ipv4-tcp") > - > - #set hash input set to "none" by testpmd on dut > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", > "testpmd> ") > - self.send_packet(itf, "ipv4-tcp") > - > - #set hash input set by testpmd on dut, enable src-ipv4 & dst-ipv4 > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp src-ipv4 add", > "testpmd> ") > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp dst-ipv4 add", > "testpmd> ") > + > + # set hash input set to "none" by testpmd on dut > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none sel= ect", > "testpmd> ") > + self.send_packet(itf, "ipv4-tcp") > + > + # set hash input set by testpmd on dut, enable src-ipv4 & ds= t-ipv4 > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp src-ipv4= add", > "testpmd> ") > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp > + dst-ipv4 add", "testpmd> ") > self.send_packet(itf, "ipv4-tcp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv4, t= cp- > src-port, tcp-dst-port > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port ad= d", > "testpmd> ") > + # set hash input set by testpmd on dut, enable src-ipv4, dst= -ipv4, tcp-src- > port, tcp-dst-port > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp > + tcp-src-port add", "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv4-tcp") >=20 > - #set hash input set by testpmd on dut, enable tcp-src-port, tcp-dst= - > port > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none select", > "testpmd> ") > - self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-src-port ad= d", > "testpmd> ") > + # set hash input set by testpmd on dut, enable tcp-src-port,= tcp-dst-port > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp none sel= ect", > "testpmd> ") > + self.dut.send_expect("set_hash_input_set 0 ipv4-tcp > + tcp-src-port add", "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-tcp tcp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv4-tcp") >=20 > - self.dut.send_expect("quit", "# ", 30) > - self.result_table_print() > - result_rows =3D self.result_table_getrows() > - self.verify(len(result_rows) > 1, "There is no data in the table, testc= ase > failed!") > + self.dut.send_expect("quit", "# ", 30) > + > + self.result_table_print() > + result_rows =3D self.result_table_getrows() > + self.verify(len(result_rows) > 1, "There is no data in the > + table, testcase failed!") >=20 > - > - if > ((result_rows[1][1]=3D=3Dresult_rows[2][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[2][3] > )): > - flag =3D 0 > - self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[3][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[3][3] > )): > + if ((result_rows[1][1] =3D=3D result_rows[2][1]) or (result_rows= [1][3] =3D=3D > result_rows[2][3])): > + flag =3D 0 > + self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > + elif ((result_rows[1][1] =3D=3D result_rows[3][1]) or (result_ro= ws[1][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[3][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[3][1]) or (result_ro= ws[2][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[5][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[5][1]) or (result_ro= ws[1][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[5][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[5][1]) or (result_ro= ws[2][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[3][1]=3D=3Dresult_rows[5][1])or(result_rows[3][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[3][1] =3D=3D result_rows[5][1]) or (result_ro= ws[3][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]!=3Dresult_rows[4][1])or(result_rows[1][3]!=3Dresult_r= ows[4][3])): > + elif ((result_rows[1][1] !=3D result_rows[4][1]) or (result_rows= [1][3] !=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") >=20 > - reta_lines =3D [] > - > + reta_lines =3D [] > + > def test_ipv4_udp(self): > dutPorts =3D self.dut.get_ports(self.nic) > localPort =3D self.tester.get_local_port(dutPorts[0]) > @@ -293,51 +295,52 @@ class TestFortvilleRssGranularityConfig(TestCase): > "port config all rss udp", "testpmd> ") > self.send_packet(itf, "ipv4-udp") >=20 > - #set hash input set to "none" by testpmd on dut > + # set hash input set to "none" by testpmd on dut > self.dut.send_expect("set_hash_input_set 0 ipv4-udp none sel= ect", > "testpmd> ") > self.send_packet(itf, "ipv4-udp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4 & dst= -ipv4 > + # set hash input set by testpmd on dut, enable src-ipv4 & > + dst-ipv4 > self.dut.send_expect("set_hash_input_set 0 ipv4-udp src-ipv4= add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-udp dst-ipv4= add", > "testpmd> ") > self.send_packet(itf, "ipv4-udp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4, dst-= ipv4, udp-src- > port, udp-dst-port > + # set hash input set by testpmd on dut, enable src-ipv4, > + dst-ipv4, udp-src-port, udp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv4-udp") >=20 > - #set hash input set by testpmd on dut, enable udp-src-port, = udp-dst-port > + # set hash input set by testpmd on dut, enable > + udp-src-port, udp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv4-udp none sel= ect", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-udp udp-dst-= port add", > "testpmd> ") > - self.send_packet(itf, "ipv4-udp") > + self.send_packet(itf, "ipv4-udp") >=20 > - self.dut.send_expect("quit", "# ", 30) > + self.dut.send_expect("quit", "# ", 30) > + > self.result_table_print() > result_rows =3D self.result_table_getrows() > self.verify(len(result_rows) > 1, "There is no data in the table= , testcase > failed!") >=20 > - #check the results > - if > ((result_rows[1][1]=3D=3Dresult_rows[2][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[2][3] > )): > + # check the results > + if ((result_rows[1][1] =3D=3D result_rows[2][1])or(result_rows[1= ][3] =3D=3D > result_rows[2][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[3][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[3][1])or(result_rows= [1][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[3][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[3][1])or(result_rows= [2][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[5][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[5][1])or(result_rows= [1][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[5][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[5][1])or(result_rows= [2][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[3][1]=3D=3Dresult_rows[5][1])or(result_rows[3][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[3][1] =3D=3D result_rows[5][1])or(result_rows= [3][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]!=3Dresult_rows[4][1])or(result_rows[1][3]!=3Dresult_r= ows[4][3])): > + elif ((result_rows[1][1] !=3D result_rows[4][1])or(result_rows[1= ][3] !=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") >=20 > @@ -369,51 +372,52 @@ class TestFortvilleRssGranularityConfig(TestCase): > "port config all rss tcp", "testpmd> ") > self.send_packet(itf, "ipv6-tcp") >=20 > - #set hash input set to "none" by testpmd on dut > + # set hash input set to "none" by testpmd on dut > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none sel= ect", > "testpmd> ") > self.send_packet(itf, "ipv6-tcp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv6 & dst= -ipv6 > + # set hash input set by testpmd on dut, enable src-ipv6 & > + dst-ipv6 > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp src-ipv6= add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp dst-ipv6= add", > "testpmd> ") > self.send_packet(itf, "ipv6-tcp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv6, dst-= ipv6, tcp-src- > port, tcp-dst-port > + # set hash input set by testpmd on dut, enable src-ipv6, > + dst-ipv6, tcp-src-port, tcp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv6-tcp") >=20 > - #set hash input set by testpmd on dut, enable tcp-src-port, = tcp-dst-port > + # set hash input set by testpmd on dut, enable > + tcp-src-port, tcp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp none sel= ect", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-tcp tcp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv6-tcp") >=20 > - self.dut.send_expect("quit", "# ", 30) > + self.dut.send_expect("quit", "# ", 30) > + > self.result_table_print() > result_rows =3D self.result_table_getrows() > self.verify(len(result_rows) > 1, "There is no data in the table= , testcase > failed!") >=20 > - #check the results > - if > ((result_rows[1][1]=3D=3Dresult_rows[2][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[2][3] > )): > + # check the results > + if ((result_rows[1][1] =3D=3D result_rows[2][1])or(result_rows[1= ][3] =3D=3D > result_rows[2][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[3][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[3][1])or(result_rows= [1][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[3][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[3][1])or(result_rows= [2][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[5][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[5][1])or(result_rows= [1][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[5][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[5][1])or(result_rows= [2][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[3][1]=3D=3Dresult_rows[5][1])or(result_rows[3][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[3][1] =3D=3D result_rows[5][1])or(result_rows= [3][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]!=3Dresult_rows[4][1])or(result_rows[1][3]!=3Dresult_r= ows[4][3])): > + elif ((result_rows[1][1] !=3D result_rows[4][1])or(result_rows[1= ][3] !=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") >=20 > @@ -445,51 +449,52 @@ class TestFortvilleRssGranularityConfig(TestCase): > "port config all rss udp", "testpmd> ") > self.send_packet(itf, "ipv6-udp") >=20 > - #set hash input set to "none" by testpmd on dut > + # set hash input set to "none" by testpmd on dut > self.dut.send_expect("set_hash_input_set 0 ipv6-udp none sel= ect", > "testpmd> ") > self.send_packet(itf, "ipv6-udp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv6 & dst= -ipv6 > + # set hash input set by testpmd on dut, enable src-ipv6 & > + dst-ipv6 > self.dut.send_expect("set_hash_input_set 0 ipv6-udp src-ipv6= add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-udp dst-ipv6= add", > "testpmd> ") > self.send_packet(itf, "ipv6-udp") >=20 > - #set hash input set by testpmd on dut, enable src-ipv6, dst-= ipv6, udp-src- > port, udp-dst-port > + # set hash input set by testpmd on dut, enable src-ipv6, > + dst-ipv6, udp-src-port, udp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv6-udp") >=20 > - #set hash input set by testpmd on dut, enable udp-src-port, = udp-dst-port > + # set hash input set by testpmd on dut, enable > + udp-src-port, udp-dst-port > self.dut.send_expect("set_hash_input_set 0 ipv6-udp none sel= ect", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-src-= port add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv6-udp udp-dst-= port add", > "testpmd> ") > self.send_packet(itf, "ipv6-udp") >=20 > - self.dut.send_expect("quit", "# ", 30) > + self.dut.send_expect("quit", "# ", 30) > + > self.result_table_print() > result_rows =3D self.result_table_getrows() > self.verify(len(result_rows) > 1, "There is no data in the table= , testcase > failed!") >=20 > - #check the results > - if > ((result_rows[1][1]=3D=3Dresult_rows[2][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[2][3] > )): > + # check the results > + if ((result_rows[1][1] =3D=3D result_rows[2][1])or(result_rows[1= ][3] =3D=3D > result_rows[2][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[3][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[3][1])or(result_rows= [1][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[3][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[3][1])or(result_rows= [2][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[5][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[5][1])or(result_rows= [1][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[2][1]=3D=3Dresult_rows[5][1])or(result_rows[2][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[2][1] =3D=3D result_rows[5][1])or(result_rows= [2][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[3][1]=3D=3Dresult_rows[5][1])or(result_rows[3][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[3][1] =3D=3D result_rows[5][1])or(result_rows= [3][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]!=3Dresult_rows[4][1])or(result_rows[1][3]!=3Dresult_r= ows[4][3])): > + elif ((result_rows[1][1] !=3D result_rows[4][1])or(result_rows[1= ][3] !=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") >=20 > @@ -515,42 +520,42 @@ class TestFortvilleRssGranularityConfig(TestCase): >=20 > self.dut.send_expect("port stop all", "testpmd> ") > self.dut.send_expect("vlan set qinq on 0", "testpmd> ") > - self.dut.send_expect( > + self.dut.send_expect( > "set_hash_global_config 0 toeplitz l2_payload enable", = "testpmd> ") > self.dut.send_expect("port start all", "testpmd> ") > self.dut.send_expect( > "port config all rss ether", "testpmd> ") > self.send_packet(itf, "l2_payload") >=20 > - #set hash input set to "none" by testpmd on dut > + # set hash input set to "none" by testpmd on dut > self.dut.send_expect("set_hash_input_set 0 l2_payload none s= elect", > "testpmd> ") > self.send_packet(itf, "l2_payload") >=20 > - #set hash input set by testpmd on dut, enable ovlan > + # set hash input set by testpmd on dut, enable ovlan > self.dut.send_expect("set_hash_input_set 0 l2_payload ovlan = add", > "testpmd> ") > self.send_packet(itf, "l2_payload") >=20 > - #set hash input set by testpmd on dut, enable ovlan & ivlan > + # set hash input set by testpmd on dut, enable ovlan & > + ivlan > self.dut.send_expect("set_hash_input_set 0 l2_payload ivlan = add", > "testpmd> ") > self.send_packet(itf, "l2_payload") >=20 > - > - self.dut.send_expect("quit", "# ", 30) > + self.dut.send_expect("quit", "# ", 30) > + > self.result_table_print() > result_rows =3D self.result_table_getrows() > self.verify(len(result_rows) > 1, "There is no data in the table= , testcase > failed!") >=20 > - #check the results > - if > ((result_rows[1][1]!=3Dresult_rows[2][1])or(result_rows[1][3]!=3Dresult_r= ows[2][3])): > + # check the results > + if ((result_rows[1][1] !=3D result_rows[2][1])or(result_rows[1][= 3] !=3D > result_rows[2][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[3][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[3][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[3][1])or(result_rows= [1][3] =3D=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[4][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[4][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[4][1])or(result_rows= [1][3] =3D=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[3][1]=3D=3Dresult_rows[4][1])or(result_rows[3][3]=3D=3Dresu= lt_rows[4][3] > )): > + elif ((result_rows[3][1] =3D=3D result_rows[4][1])or(result_rows= [3][3] =3D=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") >=20 > @@ -582,46 +587,46 @@ class TestFortvilleRssGranularityConfig(TestCase): > "port config all rss all", "testpmd> ") > self.send_packet(itf, "ipv4-other") >=20 > - #set hash input set to "none" by testpmd on dut > + # set hash input set to "none" by testpmd on dut > self.dut.send_expect("set_hash_input_set 0 ipv4-other none s= elect", > "testpmd> ") > self.send_packet(itf, "ipv4-other") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4 & dst= -ipv4 > + # set hash input set by testpmd on dut, enable src-ipv4 & > + dst-ipv4 > self.dut.send_expect("set_hash_input_set 0 ipv4-other src-ip= v4 add", > "testpmd> ") > self.dut.send_expect("set_hash_input_set 0 ipv4-other dst-ip= v4 add", > "testpmd> ") > - self.send_packet(itf, "ipv4-other") > + self.send_packet(itf, "ipv4-other") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4, dst-= ipv4, gre-key- > len 3 > + # set hash input set by testpmd on dut, enable src-ipv4, > + dst-ipv4, gre-key-len 3 > self.dut.send_expect("global_config 0 gre-key-len 3", "testp= md> ") > - self.dut.send_expect("set_hash_input_set 0 ipv4-other gre-key a= dd", > "testpmd> ") > + self.dut.send_expect("set_hash_input_set 0 ipv4-other > + gre-key add", "testpmd> ") > self.send_packet(itf, "ipv4-other") >=20 > - #set hash input set by testpmd on dut, enable src-ipv4, dst-ipv= 4, > gre-key-len 4 > + # set hash input set by testpmd on dut, enable src-ipv4, > + dst-ipv4, gre-key-len 4 > self.dut.send_expect("global_config 0 gre-key-len 4", "testp= md> ") > - self.send_packet(itf, "ipv4-other") > + self.send_packet(itf, "ipv4-other") >=20 > - self.dut.send_expect("quit", "# ", 30) > + self.dut.send_expect("quit", "# ", 30) > + > self.result_table_print() > result_rows =3D self.result_table_getrows() > self.verify(len(result_rows) > 1, "There is no data in the table= , testcase > failed!") >=20 > - #check the results > - if > ((result_rows[1][1]=3D=3Dresult_rows[2][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[2][3] > )): > + # check the results > + if ((result_rows[1][1] =3D=3D result_rows[2][1])or(result_rows[1= ][3] =3D=3D > result_rows[2][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]!=3Dresult_rows[3][1])or(result_rows[1][3]!=3Dresult_r= ows[3][3])): > + elif ((result_rows[1][1] !=3D result_rows[3][1])or(result_rows[1= ][3] !=3D > result_rows[3][3])): > flag =3D 0 > self.verify(flag, "The two hash values are different, > rss_granularity_config failed!") > - elif > ((result_rows[1][1]=3D=3Dresult_rows[4][1])or(result_rows[1][3]=3D=3Dresu= lt_rows[4][3] > )): > + elif ((result_rows[1][1] =3D=3D result_rows[4][1])or(result_rows= [1][3] =3D=3D > result_rows[4][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") > - elif > ((result_rows[4][1]=3D=3Dresult_rows[5][1])or(result_rows[4][3]=3D=3Dresu= lt_rows[5][3] > )): > + elif ((result_rows[4][1] =3D=3D result_rows[5][1])or(result_rows= [4][3] =3D=3D > result_rows[5][3])): > flag =3D 0 > self.verify(flag, "The two hash values are the same, > rss_granularity_config failed!") >=20 > reta_lines =3D [] > - > - > + > def tear_down(self): > """ > Run after each test case. > -- > 2.5.0