From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats
Date: Tue, 18 Feb 2020 07:11:35 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCB597@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1582024917-22003-1-git-send-email-lijuan.tu@intel.com>
Applied, thanks
> -----Original Message-----
> From: Tu, Lijuan
> Sent: Tuesday, February 18, 2020 7:22 PM
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats
>
> * fix pktgen config
> * get pool/queues statistics
>
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
> ---
> tests/TestSuite_vmdq.py | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py index
> bb5aaf4..623d728 100644
> --- a/tests/TestSuite_vmdq.py
> +++ b/tests/TestSuite_vmdq.py
> @@ -122,16 +122,26 @@ class TestVmdq(TestCase):
> tgen_input.append((tx_port, rx_port, "%s" %pcap))
>
> self.tester.pktgen.clear_streams()
> + vm_config = self.set_fields()
> # run packet generator
> - streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input,
> 100,
> - None, self.tester.pktgen)
> + streams =
> self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 10,
> + vm_config,
> + self.tester.pktgen)
> loss = self.tester.pktgen.measure_loss(stream_ids=streams)
> self.logger.info("loss is {}!".format(loss))
>
> # Verify the accurate
> self.verify(loss[0]/100 < 0.001, "Excessive packet loss")
> + out = self.get_vmdq_stats()
> self.validateApproxEqual(out.split("\r\n"))
>
> + def get_vmdq_stats(self):
> + vmdq_dcb_session = self.dut.new_session()
> + vmdq_dcb_session.send_expect("kill -s SIGHUP `pgrep -fl vmdq_app |
> awk '{print $1}'`", "#", 20)
> + out = self.dut.get_session_output()
> + self.logger.info(out)
> + vmdq_dcb_session.close()
> + return out
> +
> def set_up(self):
> """
> Run before each test case.
> @@ -237,9 +247,10 @@ class TestVmdq(TestCase):
>
> # clear streams before add new streams
> self.tester.pktgen.clear_streams()
> + vm_config = self.set_fields()
> # run packet generator
> streams =
> self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100,
> - None, self.tester.pktgen)
> + vm_config,
> + self.tester.pktgen)
> _, pps =
> self.tester.pktgen.measure_throughput(stream_ids=streams)
>
> config['mpps'][frame_size] = pps/1000000.0
> --
> 1.8.3.1
prev parent reply other threads:[~2020-02-18 7:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 11:21 Lijuan Tu
2020-02-18 7:11 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BBCB597@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
/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).