From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8585FA054F; Tue, 18 Feb 2020 08:11:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F1D51C1AC; Tue, 18 Feb 2020 08:11:42 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 35EAC1C10D for ; Tue, 18 Feb 2020 08:11:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 23:11:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="229396434" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga008.fm.intel.com with ESMTP; 17 Feb 2020 23:11:39 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 23:11:39 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 23:11:38 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.201]) with mapi id 14.03.0439.000; Tue, 18 Feb 2020 15:11:36 +0800 From: "Tu, Lijuan" To: "dts@dpdk.org" Thread-Topic: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats Thread-Index: AQHV5glggJlRZDwogkKzz1abb3WPG6ggiTUg Date: Tue, 18 Feb 2020 07:11:35 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCB597@SHSMSX101.ccr.corp.intel.com> References: <1582024917-22003-1-git-send-email-lijuan.tu@intel.com> In-Reply-To: <1582024917-22003-1-git-send-email-lijuan.tu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue stats 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: Tu, Lijuan > Sent: Tuesday, February 18, 2020 7:22 PM > To: dts@dpdk.org > Cc: Tu, Lijuan > Subject: [dts] [PATCH] tests/vmdq: fix pktgen config and get pool/queue s= tats >=20 > * fix pktgen config > * get pool/queues statistics >=20 > Signed-off-by: Lijuan Tu > --- > tests/TestSuite_vmdq.py | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) >=20 > 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)) >=20 > self.tester.pktgen.clear_streams() > + vm_config =3D self.set_fields() > # run packet generator > - streams =3D self.pktgen_helper.prepare_stream_from_tginput(tgen_= input, > 100, > - None, self.teste= r.pktgen) > + streams =3D > self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 10, > + vm_config, > + self.tester.pktgen) > loss =3D self.tester.pktgen.measure_loss(stream_ids=3Dstreams) > self.logger.info("loss is {}!".format(loss)) >=20 > # Verify the accurate > self.verify(loss[0]/100 < 0.001, "Excessive packet loss") > + out =3D self.get_vmdq_stats() > self.validateApproxEqual(out.split("\r\n")) >=20 > + def get_vmdq_stats(self): > + vmdq_dcb_session =3D self.dut.new_session() > + vmdq_dcb_session.send_expect("kill -s SIGHUP `pgrep -fl vmdq_ap= p | > awk '{print $1}'`", "#", 20) > + out =3D 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): >=20 > # clear streams before add new streams > self.tester.pktgen.clear_streams() > + vm_config =3D self.set_fields() > # run packet generator > streams =3D > self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, > - None, self.tester.pk= tgen) > + vm_config, > + self.tester.pktgen) > _, pps =3D > self.tester.pktgen.measure_throughput(stream_ids=3Dstreams) >=20 > config['mpps'][frame_size] =3D pps/1000000.0 > -- > 1.8.3.1