test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script.
Date: Mon, 29 Jul 2019 09:48:41 +0800	[thread overview]
Message-ID: <1564364921-33333-5-git-send-email-yufengx.mo@intel.com> (raw)
In-Reply-To: <1564364921-33333-1-git-send-email-yufengx.mo@intel.com>


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 <yufengx.mo@intel.com>
---
 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


  parent reply	other threads:[~2019-07-29  1:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29  1:48 [dts] [PATCH V1 0/4] dts: update suite nic_single_core_perf and ports config yufengmx
2019-07-29  1:48 ` [dts] [PATCH V1 1/4] [next]config/nic_single_core_perf: fix file format issue yufengmx
2019-07-29  1:48 ` [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment yufengmx
2019-08-08  5:41   ` Tu, Lijuan
2019-07-29  1:48 ` [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port yufengmx
2019-08-08  5:41   ` Tu, Lijuan
2019-07-29  1:48 ` yufengmx [this message]
2019-08-08  5:41   ` [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script Tu, Lijuan

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=1564364921-33333-5-git-send-email-yufengx.mo@intel.com \
    --to=yufengx.mo@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).