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 762628E6E for ; Tue, 3 Nov 2015 10:31:25 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 03 Nov 2015 01:30:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,238,1444719600"; d="scan'208";a="841361255" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 03 Nov 2015 01:27:09 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Nov 2015 01:27:09 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 3 Nov 2015 01:27:08 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.56]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.160]) with mapi id 14.03.0248.002; Tue, 3 Nov 2015 17:27:06 +0800 From: "Liu, Yong" To: "Tang, HaifengX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] tests checksum_offload: remove source mac filter Thread-Index: AQHRFeTGM6RzN+ncpUyAah2MSveZrZ6Ja82AgACb70A= Date: Tue, 3 Nov 2015 09:27:06 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10F4B94B@SHSMSX103.ccr.corp.intel.com> References: <1446520037-20968-1-git-send-email-yong.liu@intel.com> In-Reply-To: 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 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 09:31:27 -0000 Thanks for check the patch, applied in. > -----Original Message----- > From: Tang, HaifengX > Sent: Tuesday, November 03, 2015 4:09 PM > To: Liu, Yong; dts@dpdk.org > Cc: Gu, YongjieX > Subject: RE: [dts] [PATCH] tests checksum_offload: remove source mac > filter >=20 > Hi liuyong: > This patch have been verified by yongjie , and u can merge it toady . >=20 > 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_checksum_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:00: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)= ' % > >+ (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 @@ > class 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: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")/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: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", > 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: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(chksum=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")/UDP(chksum=3D0xf)/("X"*46)' % dmac, > >+ 'IPv6/TCP': > 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/TCP(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': > >+ '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 @@ > class TestChecksumOffload(TestCase): > > """ > > dmac =3D self.dut.get_mac_address(self.dut_ports[1]) > > > >- 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")/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: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(chksum=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(chksum=3D0xf)/("X"*48)' % dmac, > >+ 'IPv6/UDP': > 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/UDP(chksum=3D0xf)/("X"*46)' % dmac, > >+ 'IPv6/TCP': > >+ 'Ether(dst=3D"%s")/IPv6(src=3D"::1")/TCP(chksum=3D0xf)/("X"*46)' % dma= c} > > > >- 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: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} > >+ 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")/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': > >+ '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]) > >@@ -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:00")/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:00")/IPv6(src=3D"%s")/UDP(chksum=3D0xf)/("X"*46)' %= (dmac, > sndIPv6), > >- 'IPv6/TCP': 'Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/IPv6(src=3D"%s")/TCP(chksum=3D0xf)/("X"*46)' %= (dmac, > sndIPv6)} > >+ sndPkts =3D {'IP/UDP': > 'Ether(dst=3D"%s")/IP(src=3D"%s",chksum=3D0x0)/UDP(chksum=3D0xf)/("X"*46)= ' % (dmac, > sndIP), > >+ 'IP/TCP': > 'Ether(dst=3D"%s")/IP(src=3D"%s",chksum=3D0x0)/TCP(chksum=3D0xf)/("X"*46)= ' % (dmac, > sndIP), > >+ 'IPv6/UDP': > 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/UDP(chksum=3D0xf)/("X"*46)' % (dmac, > sndIPv6), > >+ 'IPv6/TCP': > >+ 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/TCP(chksum=3D0xf)/("X"*46)' % (dma= c, > >+ sndIPv6)} > > > > expIP =3D "10.0.0.2" > > expIPv6 =3D '::2' > >- expPkts =3D {'IP/UDP': 'Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/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:00")/IPv6(src=3D"%s")/UDP()/("X"*46)' % (dmac, expI= Pv6), > >- 'IPv6/TCP': 'Ether(dst=3D"%s", > src=3D"52:00:00:00:00:00")/IPv6(src=3D"%s")/TCP()/("X"*46)' % (dmac, expI= Pv6)} > >+ 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': > >+ 'Ether(dst=3D"%s")/IPv6(src=3D"%s")/TCP()/("X"*46)' % (dmac, expIPv6)} > > > > self.dut.send_expect("start", "testpmd>") > > result =3D self.checksum_validate(sndPkts, expPkts) @@ -277,11 > +277,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")/IP()/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"* (lamb= da > x: x - 66 if x > 66 else 0)(%d))', > >+ 'IPv6/TCP': 'Ether(dst=3D"%s")/IPv6()/TCP()/("X"* (lamb= da > >+ x: x - 78 if x > 78 else 0)(%d))'} > > > > lcore =3D "1S/2C/1T" > > portMask =3D dts.create_mask([self.dut_ports[0], > self.dut_ports[1]]) > >-- > >1.9.3 > >