From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Zhao, XinfengX" <xinfengx.zhao@intel.com>,
"dts@dpdk.org" <dts@dpdk.org>
Cc: "Zhao, XinfengX" <xinfengx.zhao@intel.com>
Subject: Re: [dts] [PATCH] tests: fix the issue of using scapy to send packet
Date: Fri, 30 Aug 2019 03:26:35 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB078F6@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1566328538-190992-1-git-send-email-xinfengx.zhao@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xinfeng Zhao
> Sent: Wednesday, August 21, 2019 3:16 AM
> To: dts@dpdk.org
> Cc: Zhao, XinfengX <xinfengx.zhao@intel.com>
> Subject: [dts] [PATCH] tests: fix the issue of using scapy to send packet
>
> failed to send packet using the method, because there should be delayed a
> few seconds bettwen sending packet and exiting scapy, and now instead it
> with dts scapy method
>
> Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
> ---
> tests/TestSuite_vlan_ethertype_config.py | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/tests/TestSuite_vlan_ethertype_config.py
> b/tests/TestSuite_vlan_ethertype_config.py
> index 1cb1083..727067f 100644
> --- a/tests/TestSuite_vlan_ethertype_config.py
> +++ b/tests/TestSuite_vlan_ethertype_config.py
> @@ -46,7 +46,6 @@ from pmd_output import PmdOutput from scapy.utils
> import struct, socket, wrpcap, rdpcap from scapy.layers.inet import Ether, IP,
> TCP, UDP, ICMP from scapy.layers.l2 import Dot1Q, ARP, GRE -from
> scapy.sendrecv import sendp from settings import DPDK_RXMODE_SETTING
> from settings import load_global_setting
>
> @@ -145,11 +144,10 @@ class TestVlanEthertypeConfig(TestCase):
> out = self.tester.send_expect("hexdump -ve '%s' '%s' |sed
> 's/8100000181000002/%s/' |xxd -r -p > '%s'" % (
> fmt, self.tpid_ori_file, replace, self.tpid_new_file), "# ")
>
> - self.tester.send_expect("scapy", ">>> ")
> - self.tester.send_expect(
> - "pkt=rdpcap('%s')" % self.tpid_new_file, ">>> ")
> - self.tester.send_expect("sendp(pkt, iface='%s')" % self.txItf, ">>> ")
> - self.tester.send_expect("quit()", "# ")
> + self.tester.scapy_foreground()
> + self.tester.scapy_append("pkt=rdpcap('%s')" % self.tpid_new_file)
> + self.tester.scapy_append("sendp(pkt, iface='%s')" % self.txItf)
> + self.tester.scapy_execute()
>
> def check_vlan_packets(self, vlan, tpid, rxItf, result=True):
>
> --
> 2.17.1
prev parent reply other threads:[~2019-08-30 3:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 19:15 Xinfeng Zhao
2019-08-30 3:26 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BB078F6@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=xinfengx.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).