From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id EBE18952 for ; Thu, 23 Feb 2017 02:50:27 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2017 17:50:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,197,1484035200"; d="scan'208";a="51561521" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 22 Feb 2017 17:50:25 -0800 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Thu, 23 Feb 2017 09:51:32 +0800 Message-Id: <1487814692-33842-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] 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: Thu, 23 Feb 2017 01:50:28 -0000 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 = sniff(filter="ether src %s", iface="%s", count=%d)' % (sniff_src, rx_interface, len(packets_sent))) + self.tester.scapy_append('p = sniff(filter="ether[12] != 0x88 or ether[13] != 0xcc", iface="%s", count=%d)' % (sniff_src, rx_interface, len(packets_sent))) self.tester.scapy_append('nr_packets=len(p)') self.tester.scapy_append('reslist = [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=sniff(iface="%s",count=1,timeout=5)' % self.tester_rx_iface) + self.tester.scapy_append('p=sniff(filter="ether[12] != 0x88 or ether[13 != 0xcc]",iface="%s",count=1,timeout=5)' % 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=sniff(iface="%s",count=1,timeout=5)' % self.recv_iface) + 'p=sniff(filter="ether[12] != 0x88 or ether[13] != 0xcc",iface="%s",count=1,timeout=5)' % self.recv_iface) self.tester.scapy_append( 'wrpcap(\"%s\", p)' % config.capture_file) self.tester.scapy_foreground() -- 1.9.3