From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 966478E7E for ; Tue, 3 Nov 2015 09:08:50 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 03 Nov 2015 00:08:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,238,1444719600"; d="scan'208";a="593034171" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2015 00:08:49 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Nov 2015 00:08:44 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Nov 2015 00:08:43 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.56]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.100]) with mapi id 14.03.0248.002; Tue, 3 Nov 2015 16:08:42 +0800 From: "Tang, HaifengX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] tests checksum_offload: remove source mac filter Thread-Index: AQHRFeTVn8DtBBJrbEeN3+RL5rBXaZ6J8RqA Date: Tue, 3 Nov 2015 08:08:41 +0000 Message-ID: References: <1446520037-20968-1-git-send-email-yong.liu@intel.com> In-Reply-To: <1446520037-20968-1-git-send-email-yong.liu@intel.com> Accept-Language: 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 Cc: "Gu, YongjieX" Subject: Re: [dts] [PATCH] tests checksum_offload: remove source mac filter 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: Tue, 03 Nov 2015 08:08:51 -0000 Hi liuyong: This patch have been verified by yongjie , and u can merge it toady . thanks > > >-----Original Message----- >From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yong Liu >Sent: Tuesday, November 03, 2015 11:07 AM >To: dts@dpdk.org >Subject: [dts] [PATCH] tests checksum_offload: remove source mac filter > >From: Marvin Liu > >testpmd csum forwarding will replace source mac address with port mac. >So remove source mac filter from this case. > >Signed-off-by: Marvin Liu > >diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksu= m_offload.py >index abfebb6..0f3c8af 100644 >--- a/tests/TestSuite_checksum_offload.py >+++ b/tests/TestSuite_checksum_offload.py >@@ -109,7 +109,7 @@ class TestChecksumOffload(TestCase): > self.tester.scapy_append('sys.path.append("./")') > self.tester.scapy_append('import sctp') > self.tester.scapy_append('from sctp import *') >- self.tester.scapy_append('p =3D sniff(filter=3D"ether src 52:00:0= 0:00:00:00", iface=3D"%s", count=3D%d)' % (rx_interface, len(packets_sent))= ) >+ self.tester.scapy_append('p =3D sniff(iface=3D"%s", count=3D%d)' = %=20 >+ (rx_interface, len(packets_sent))) > self.tester.scapy_append('nr_packets=3Dlen(p)') > self.tester.scapy_append('reslist =3D [p[i].sprintf("%IP.chksum%;= %TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]') > self.tester.scapy_append('import string') @@ -162,16 +162,16 @@ c= lass TestChecksumOffload(TestCase): > traffic generator side. > """ > dmac =3D self.dut.get_mac_address(self.dut_ports[1]) >- pktsChkErr =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:0= 0:00")/IP(chksum=3D0x0)/UDP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:= 00")/IP(chksum=3D0x0)/TCP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IP/SCTP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00= :00")/IP(chksum=3D0x0)/SCTP(chksum=3D0xf)/("X"*48)' % dmac, >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:0= 0:00")/IPv6(src=3D"::1")/UDP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:0= 0:00")/IPv6(src=3D"::1")/TCP(chksum=3D0xf)/("X"*46)' % dmac} >- pkts =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IP(src=3D"127.0.0.2")/UDP()/("X"*46)' % dmac, >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/I= P(src=3D"127.0.0.2")/TCP()/("X"*46)' % dmac, >- 'IP/SCTP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/= IP(src=3D"127.0.0.2")/SCTP()/("X"*48)' % dmac, >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6(src=3D"::2")/UDP()/("X"*46)' % dmac, >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6(src=3D"::2")/TCP()/("X"*46)' % dmac} >+ pktsChkErr =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/UDP= (chksum=3D0xf)/("X"*46)' % dmac, >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/TCP(c= hksum=3D0xf)/("X"*46)' % dmac, >+ 'IP/SCTP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/SCTP= (chksum=3D0xf)/("X"*48)' % dmac, >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/UD= P(chksum=3D0xf)/("X"*46)' % dmac, >+ 'IPv6/TCP': 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/TC= P(chksum=3D0xf)/("X"*46)' % dmac} >+ pkts =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/UDP(= )/("X"*46)' % dmac, >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/TCP()/= ("X"*46)' % dmac, >+ 'IP/SCTP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/SCTP(= )/("X"*48)' % dmac, >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"::2")/UDP()/("= X"*46)' % dmac, >+ 'IPv6/TCP':=20 >+ 'Ether(dst=3D"%s")/IPv6(src=3D"::2")/TCP()/("X"*46)' % dmac} > self.checksum_enablehw(self.dut_ports[0]) > self.checksum_enablehw(self.dut_ports[1]) > self.dut.send_expect("start", "testpmd>") @@ -188,17 +188,17 @@ c= lass TestChecksumOffload(TestCase): > """ > dmac =3D self.dut.get_mac_address(self.dut_ports[1]) >=20 >- pkts =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IP(chksum=3D0x0)/UDP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/I= P(chksum=3D0x0)/TCP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IP/SCTP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/= IP(chksum=3D0x0)/SCTP(chksum=3D0xf)/("X"*48)' % dmac, >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6(src=3D"::1")/UDP(chksum=3D0xf)/("X"*46)' % dmac, >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6(src=3D"::1")/TCP(chksum=3D0xf)/("X"*46)' % dmac} >+ pkts =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/UDP(chksu= m=3D0xf)/("X"*46)' % dmac, >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/TCP(chksum= =3D0xf)/("X"*46)' % dmac, >+ 'IP/SCTP': 'Ether(dst=3D"%s")/IP(chksum=3D0x0)/SCTP(chksu= m=3D0xf)/("X"*48)' % dmac, >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/UDP(chks= um=3D0xf)/("X"*46)' % dmac, >+ 'IPv6/TCP':=20 >+ 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/TCP(chksum=3D0xf)/("X"*46)' % dmac} >=20 >- pkts_ref =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:= 00")/IP(src=3D"127.0.0.2")/UDP()/("X"*46)' % dmac, >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00= ")/IP(src=3D"127.0.0.2")/TCP()/("X"*46)' % dmac, >- 'IP/SCTP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IP(src=3D"127.0.0.2")/SCTP()/("X"*48)' % dmac, >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:= 00")/IPv6(src=3D"::2")/UDP()/("X"*46)' % dmac, >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:= 00")/IPv6(src=3D"::2")/TCP()/("X"*46)' % dmac} >+ pkts_ref =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/= UDP()/("X"*46)' % dmac, >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/TC= P()/("X"*46)' % dmac, >+ 'IP/SCTP': 'Ether(dst=3D"%s")/IP(src=3D"127.0.0.2")/S= CTP()/("X"*48)' % dmac, >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"::2")/UDP(= )/("X"*46)' % dmac, >+ 'IPv6/TCP':=20 >+ 'Ether(dst=3D"%s")/IPv6(src=3D"::2")/TCP()/("X"*46)' % dmac} >=20 > self.checksum_enablehw(self.dut_ports[0]) > self.checksum_enablehw(self.dut_ports[1]) >@@ -221,17 +221,17 @@ class TestChecksumOffload(TestCase): > dmac =3D self.dut.get_mac_address(self.dut_ports[1]) > sndIP =3D '10.0.0.1' > sndIPv6 =3D '::1' >- sndPkts =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IP(src=3D"%s",chksum=3D0x0)/UDP(chksum=3D0xf)/("X"*46)' % (dmac, sndIP)= , >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00"= )/IP(src=3D"%s",chksum=3D0x0)/TCP(chksum=3D0xf)/("X"*46)' % (dmac, sndIP), >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IPv6(src=3D"%s")/UDP(chksum=3D0xf)/("X"*46)' % (dmac, sndIPv6), >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IPv6(src=3D"%s")/TCP(chksum=3D0xf)/("X"*46)' % (dmac, sndIPv6)} >+ sndPkts =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(src=3D"%s",chksum=3D= 0x0)/UDP(chksum=3D0xf)/("X"*46)' % (dmac, sndIP), >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(src=3D"%s",chksum=3D0x= 0)/TCP(chksum=3D0xf)/("X"*46)' % (dmac, sndIP), >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/UDP(ch= ksum=3D0xf)/("X"*46)' % (dmac, sndIPv6), >+ 'IPv6/TCP':=20 >+ 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/TCP(chksum=3D0xf)/("X"*46)' % (dmac,= =20 >+ sndIPv6)} >=20 > expIP =3D "10.0.0.2" > expIPv6 =3D '::2' >- expPkts =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IP(src=3D"%s")/UDP()/("X"*46)' % (dmac, expIP), >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00"= )/IP(src=3D"%s")/TCP()/("X"*46)' % (dmac, expIP), >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IPv6(src=3D"%s")/UDP()/("X"*46)' % (dmac, expIPv6), >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:0= 0")/IPv6(src=3D"%s")/TCP()/("X"*46)' % (dmac, expIPv6)} >+ expPkts =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP(src=3D"%s")/UDP()/("= X"*46)' % (dmac, expIP), >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP(src=3D"%s")/TCP()/("X"= *46)' % (dmac, expIP), >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/UDP()/= ("X"*46)' % (dmac, expIPv6), >+ 'IPv6/TCP':=20 >+ 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/TCP()/("X"*46)' % (dmac, expIPv6)} >=20 > self.dut.send_expect("start", "testpmd>") > result =3D self.checksum_validate(sndPkts, expPkts) @@ -277,11 +2= 77,11 @@ class TestChecksumOffload(TestCase): > """ > # sizes =3D [64, 128, 256, 512, 1024] > sizes =3D [64, 128] >- pkts =3D {'IP/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IP()/UDP()/("X"*(%d-46))', >- 'IP/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/I= P()/TCP()/("X"*(%d-58))', >- 'IP/SCTP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")/= IP()/SCTP()/("X"*(%d-50+2))', >- 'IPv6/UDP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6()/UDP()/("X"* (lambda x: x - 66 if x > 66 else 0)(%d))', >- 'IPv6/TCP': 'Ether(dst=3D"%s", src=3D"52:00:00:00:00:00")= /IPv6()/TCP()/("X"* (lambda x: x - 78 if x > 78 else 0)(%d))'} >+ pkts =3D {'IP/UDP': 'Ether(dst=3D"%s")/IP()/UDP()/("X"*(%d-46))', >+ 'IP/TCP': 'Ether(dst=3D"%s")/IP()/TCP()/("X"*(%d-58))', >+ 'IP/SCTP': 'Ether(dst=3D"%s")/IP()/SCTP()/("X"*(%d-50+2))= ', >+ 'IPv6/UDP': 'Ether(dst=3D"%s")/IPv6()/UDP()/("X"* (lambda= x: x - 66 if x > 66 else 0)(%d))', >+ 'IPv6/TCP': 'Ether(dst=3D"%s")/IPv6()/TCP()/("X"* (lambda= =20 >+ x: x - 78 if x > 78 else 0)(%d))'} >=20 > lcore =3D "1S/2C/1T" > portMask =3D dts.create_mask([self.dut_ports[0], self.dut_ports[1= ]]) >-- >1.9.3 >