From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Ma, LihongX" <lihongx.ma@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: update code to support trex
Date: Mon, 12 Aug 2019 06:52:41 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB0181E@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1565285713-20031-1-git-send-email-lihongx.ma@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Friday, August 9, 2019 1:35 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: update code to
> support trex
>
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
> tests/TestSuite_pvp_vhost_user_reconnect.py | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py
> b/tests/TestSuite_pvp_vhost_user_reconnect.py
> index 5568376..69c4bed 100644
> --- a/tests/TestSuite_pvp_vhost_user_reconnect.py
> +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
> @@ -40,8 +40,8 @@ import re
> import utils
> import time
> from test_case import TestCase
> -from settings import HEADER_SIZE
> from virt_common import VM
> +from packet import Packet, save_packets
> from pktgen import PacketGeneratorHelper
>
>
> @@ -76,8 +76,11 @@ class TestPVPVhostUserReconnect(TestCase):
> self.src1 = "192.168.4.1"
> self.dst1 = "192.168.3.1"
> self.checked_vm = False
> - self.header_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip'] +
> HEADER_SIZE['udp']
>
> + self.out_path = '/tmp/%s' % self.suite_name
> + out = self.tester.send_expect('ls -d %s' % self.out_path, '# ')
> + if 'No such file or directory' in out:
> + self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
> # create an instance to set stream field setting
> self.pktgen_helper = PacketGeneratorHelper()
>
> @@ -266,15 +269,14 @@ class TestPVPVhostUserReconnect(TestCase):
>
> def send_and_verify(self, cycle=0, tinfo=""):
> for frame_size in self.frame_sizes:
> - payload = frame_size - self.header_size
> - flow = '[Ether(dst="%s")/IP(src="%s",dst="%s")/UDP()/("X"*%d)]' % (
> - self.dst_mac, self.src1, self.dst1, payload)
> - self.tester.scapy_append('wrpcap("reconnect.pcap", %s)' % flow)
> - self.tester.scapy_execute()
> + pkt = Packet(pkt_type = 'UDP', pkt_len = frame_size)
> + pkt.config_layers([('ether', {'dst': '%s' % self.dst_mac}),
> + ('ipv4', {'dst': '%s' % self.dst1, 'src': '%s' % self.src1})])
> + save_packets([pkt], "%s/reconnect.pcap" % self.out_path)
>
> tgenInput = []
> port = self.tester.get_local_port(self.pf)
> - tgenInput.append((port, port, "reconnect.pcap"))
> + tgenInput.append((port, port, "%s/reconnect.pcap" % self.out_path))
>
> self.tester.pktgen.clear_streams()
> streams =
> self.pktgen_helper.prepare_stream_from_tginput(tgenInput, 100,
> --
> 2.7.4
prev parent reply other threads:[~2019-08-12 6:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 17:35 lihong
2019-08-12 6:52 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BB0181E@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@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).