From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id BE6DD559C for ; Fri, 2 Dec 2016 03:46:08 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7F25216; Thu, 1 Dec 2016 18:46:07 -0800 (PST) Received: from ubuntu-jianbo.shanghai.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0D5A23F220; Thu, 1 Dec 2016 18:46:06 -0800 (PST) From: Jianbo Liu To: dts@dpdk.org Cc: Jianbo Liu Date: Fri, 2 Dec 2016 10:45:57 +0800 Message-Id: <1480646757-13829-1-git-send-email-jianbo.liu@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [dts] [PATCH] tests mac_filter: use scapy to send packets 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: Fri, 02 Dec 2016 02:46:09 -0000 Signed-off-by: Jianbo Liu --- tests/TestSuite_mac_filter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py index 1c58b87..a06b812 100644 --- a/tests/TestSuite_mac_filter.py +++ b/tests/TestSuite_mac_filter.py @@ -86,9 +86,10 @@ class TestWhitelist(TestCase): Send 1 packet to portid. """ itf = self.tester.get_interface(self.tester.get_local_port(portid)) - pkt = Packet(pkt_type='UDP') - pkt.config_layer('ether', {'src': '52:00:00:00:00:00', 'dst': destMac}) - pkt.send_pkt(tx_port=itf) + pkt = 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)' % destMac + self.tester.send_expect("scapy", ">>> ") + self.tester.scapy_append('sendp([%s], iface="%s")' % (pkt, itf)) + self.tester.scapy_execute() def test_add_remove_mac_address(self): """ -- 1.9.1