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 E5AA3A0487 for ; Mon, 29 Jul 2019 03:47:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5342C1BF42; Mon, 29 Jul 2019 03:47:56 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5E4951BEE1 for ; Mon, 29 Jul 2019 03:47:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2019 18:47:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,320,1559545200"; d="scan'208";a="255062984" Received: from dpdk-moyufen01.sh.intel.com ([10.67.111.77]) by orsmga001.jf.intel.com with ESMTP; 28 Jul 2019 18:47:54 -0700 From: yufengmx To: dts@dpdk.org Cc: yufengmx Date: Mon, 29 Jul 2019 09:48:41 +0800 Message-Id: <1564364921-33333-5-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1564364921-33333-1-git-send-email-yufengx.mo@intel.com> References: <1564364921-33333-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script. 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" update suite nic_single_core_perf with new pktgen measure_throughput input parameter definition. for pktgen testing belongs to performance test case, change test_nic_single_core_perf to test_perf_nic_single_core. Signed-off-by: yufengmx --- tests/TestSuite_nic_single_core_perf.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py index 847a94c..6b530bc 100644 --- a/tests/TestSuite_nic_single_core_perf.py +++ b/tests/TestSuite_nic_single_core_perf.py @@ -42,6 +42,7 @@ from time import sleep from exception import VerifyFailure from settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting from pmd_output import PmdOutput +from pktgen import TRANSMIT_CONT from copy import deepcopy from prettytable import PrettyTable import rst @@ -112,7 +113,7 @@ class TestNicSingleCorePerf(TestCase): 'Expected Throughput', 'Throughput Difference'] self.test_result = {} - def test_nic_single_core_perf(self): + def test_perf_nic_single_core(self): """ Run nic single core performance """ @@ -181,8 +182,9 @@ class TestNicSingleCorePerf(TestCase): # measure throughput stream_ids = self.prepare_stream(frame_size) + traffic_opt = {'delay': self.test_duration} _, packets_received = self.tester.pktgen.measure_throughput( - stream_ids = stream_ids, delay = self.test_duration) + stream_ids, traffic_opt) throughput = packets_received / 1000000.0 self.throughput[frame_size][nb_desc] = throughput @@ -247,11 +249,6 @@ class TestNicSingleCorePerf(TestCase): ''' create streams for ports, one port two streams, and configure them. ''' - # traffic option - options = { - 'rate': '100%', - } - # create pcap file payload_size = frame_size - self.headers_size self.tester.scapy_append( @@ -271,6 +268,13 @@ class TestNicSingleCorePerf(TestCase): # this's fine for other NIC too. for k in range(2): # txport -> rxport + pcap = '/tmp/test{}.pcap'.format(k) + options = { + 'pcap': pcap, + 'stream_config':{ + 'txmode' : {}, + 'transmit_mode': TRANSMIT_CONT, + 'rate': 100,}} stream_id = self.tester.pktgen.add_stream( txport, rxport, '/tmp/test{}.pcap'.format(k)) self.tester.pktgen.config_stream(stream_id, options) @@ -280,7 +284,7 @@ class TestNicSingleCorePerf(TestCase): rxport, txport, '/tmp/test{}.pcap'.format(k)) self.tester.pktgen.config_stream(stream_id, options) stream_ids.append(stream_id) - + return stream_ids def save_result(self, data): -- 1.9.3