From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8D3662C56 for ; Tue, 28 Feb 2017 02:39:51 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 27 Feb 2017 17:39:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,216,1484035200"; d="scan'208";a="53713527" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 27 Feb 2017 17:39:50 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 27 Feb 2017 17:39:50 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 27 Feb 2017 17:39:49 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Tue, 28 Feb 2017 09:39:46 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V2] filter lldp when sniff packet on tester Thread-Index: AQHSjX4gAL7qTUHpeEuhtVijClc03aF1paMAgAgE0CA= Date: Tue, 28 Feb 2017 01:39:45 +0000 Message-ID: References: <1487817654-33916-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D67691@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D67691@SHSMSX103.ccr.corp.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 V2] filter lldp when sniff packet on tester 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, 28 Feb 2017 01:39:52 -0000 Hi yong, If we use sniff_packets for capture packet , we must update test case, beca= use tcpdump capture packet style different sniff by scapy. I think we only = add filter rule in checksum offload case for fileter lldp packet. Thanks a lot > -----Original Message----- > From: Liu, Yong > Sent: Thursday, February 23, 2017 3:07 PM > To: Xu, HuilongX; dts@dpdk.org > Cc: Xu, HuilongX > Subject: RE: [dts] [PATCH V2] filter lldp when sniff packet on tester >=20 > Huilong, > Please try sniff_packets in packet module. LLDP filter has been implement= ed > in this function. >=20 > Thanks, > Marvin >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > Sent: Thursday, February 23, 2017 10:41 AM > > To: dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: [dts] [PATCH V2] filter lldp when sniff packet on tester > > > > in new dpdk.org code, fortville nic will auto send lldp packet when > > the nic setup so should filter lldp packet when sniff packet on tester > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_checksum_offload.py | 2 +- > > tests/TestSuite_nvgre.py | 2 +- > > tests/TestSuite_vxlan.py | 2 +- > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/tests/TestSuite_checksum_offload.py > > b/tests/TestSuite_checksum_offload.py > > index 7989c14..1f01d47 100644 > > --- a/tests/TestSuite_checksum_offload.py > > +++ b/tests/TestSuite_checksum_offload.py > > @@ -105,7 +105,7 @@ class TestChecksumOffload(TestCase): > > self.tester.send_expect("exit()", "#") > > > > self.tester.scapy_background() > > - self.tester.scapy_append('p =3D sniff(filter=3D"ether src %s", > > iface=3D"%s", count=3D%d)' % (sniff_src, rx_interface, len(packets_sent= ))) > > + self.tester.scapy_append('p =3D sniff(filter=3D"ether[12] !=3D= 0x88 > > + or > > ether[13] !=3D 0xcc", 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') diff --git > > a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index > > 015aa9f..f6161e0 100644 > > --- a/tests/TestSuite_nvgre.py > > +++ b/tests/TestSuite_nvgre.py > > @@ -575,7 +575,7 @@ class TestNvgre(TestCase): > > self.tester.send_expect("rm -rf %s" % config.capture_file, "# = ") > > # save the capture packet into pcap format > > self.tester.scapy_background() > > - self.tester.scapy_append('p=3Dsniff(iface=3D"%s",count=3D1,tim= eout=3D5)' % > > self.tester_rx_iface) > > + self.tester.scapy_append('p=3Dsniff(filter=3D"ether[12] !=3D 0= x88 > > + or > > ether[13 !=3D 0xcc]",iface=3D"%s",count=3D1,timeout=3D5)' % self.tester= _rx_iface) > > self.tester.scapy_append('wrpcap(\"%s\", p)' % > > config.capture_file) > > self.tester.scapy_foreground() > > > > diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index > > 5fef9d9..6aa1164 100644 > > --- a/tests/TestSuite_vxlan.py > > +++ b/tests/TestSuite_vxlan.py > > @@ -446,7 +446,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): > > # save the capture packet into pcap format > > self.tester.scapy_background() > > self.tester.scapy_append( > > - 'p=3Dsniff(iface=3D"%s",count=3D1,timeout=3D5)' % self.rec= v_iface) > > + 'p=3Dsniff(filter=3D"ether[12] !=3D 0x88 or ether[13] !=3D > > 0xcc",iface=3D"%s",count=3D1,timeout=3D5)' % self.recv_iface) > > self.tester.scapy_append( > > 'wrpcap(\"%s\", p)' % config.capture_file) > > self.tester.scapy_foreground() > > -- > > 1.9.3