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 44B87A0554; Tue, 18 Feb 2020 04:13:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CE7B1D979; Tue, 18 Feb 2020 04:13:13 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id D78481D6AC for ; Tue, 18 Feb 2020 04:13:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 19:13:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="239225892" Received: from unknown (HELO dpdk-lijuan.sh.intel.com) ([10.67.119.192]) by orsmga006.jf.intel.com with ESMTP; 17 Feb 2020 19:13:09 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Tue, 18 Feb 2020 19:21:57 +0800 Message-Id: <1582024917-22003-1-git-send-email-lijuan.tu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [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" * fix pktgen config * get pool/queues statistics Signed-off-by: Lijuan Tu --- 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