summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/traffic_controller_rfc2544.py10
-rw-r--r--docs/configguide/trafficgen.rst4
-rw-r--r--docs/design/trafficgen_integration_guide.rst10
-rwxr-xr-xdocs/design/vswitchperf_design.rst10
-rw-r--r--docs/requirements/vswitchperf_ltd.rst122
-rwxr-xr-xdocs/userguide/yardstick.rst2
-rwxr-xr-xtools/pkt_gen/dummy/dummy.py10
-rwxr-xr-xtools/pkt_gen/ixia/ixia.py6
-rwxr-xr-xtools/pkt_gen/ixia/pass_fail.tcl5
-rwxr-xr-xtools/pkt_gen/ixnet/ixnet.py16
-rw-r--r--tools/pkt_gen/ixnet/ixnetrfc2544.tcl11
-rwxr-xr-xtools/pkt_gen/ixnet/ixnetrfc2544v2.tcl11
-rw-r--r--tools/pkt_gen/moongen/moongen.py52
-rw-r--r--tools/pkt_gen/testcenter/testcenter.py4
-rwxr-xr-xtools/pkt_gen/trafficgen/trafficgen.py12
-rwxr-xr-xtools/pkt_gen/xena/xena.py24
-rwxr-xr-xvsperf2
17 files changed, 221 insertions, 90 deletions
diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py
index 81e499cd..af09deff 100644
--- a/core/traffic_controller_rfc2544.py
+++ b/core/traffic_controller_rfc2544.py
@@ -39,7 +39,7 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
self._traffic_gen_class = traffic_gen_class()
self._traffic_started = False
self._traffic_started_call_count = 0
- self._trials = int(get_test_param('rfc2544_trials', 1))
+ self._tests = int(get_test_param('rfc2544_tests', 1))
self._duration = int(get_test_param('duration', 30))
self._lossrate = float(get_test_param('lossrate', 0.0))
self._results = []
@@ -101,13 +101,13 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
if traffic['traffic_type'] == 'back2back':
result = self._traffic_gen_class.send_rfc2544_back2back(
- traffic, trials=self._trials, duration=self._duration, lossrate=self._lossrate)
+ traffic, tests=self._tests, duration=self._duration, lossrate=self._lossrate)
elif traffic['traffic_type'] == 'continuous':
result = self._traffic_gen_class.send_cont_traffic(
traffic, duration=self._duration)
else:
result = self._traffic_gen_class.send_rfc2544_throughput(
- traffic, trials=self._trials, duration=self._duration, lossrate=self._lossrate)
+ traffic, tests=self._tests, duration=self._duration, lossrate=self._lossrate)
result = TrafficControllerRFC2544._append_results(result,
packet_size)
@@ -123,7 +123,7 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
traffic['l2'] = {'framesize': packet_size}
self._traffic_gen_class.start_rfc2544_throughput(
traffic,
- trials=self._trials,
+ tests=self._tests,
duration=self._duration)
self._traffic_started = True
if len(function['args']) > 0:
@@ -156,7 +156,7 @@ class TrafficControllerRFC2544(ITrafficController, IResults):
"""
return self._results
- def validate_send_traffic(self, result, traffic):
+ def validate_send_traffic(self, dummy_result, dummy_traffic):
"""Verify that send traffic has succeeded
"""
if len(self._results):
diff --git a/docs/configguide/trafficgen.rst b/docs/configguide/trafficgen.rst
index 302a8d5e..939b6cad 100644
--- a/docs/configguide/trafficgen.rst
+++ b/docs/configguide/trafficgen.rst
@@ -72,12 +72,12 @@ OR from the commandline:
$ ./vsperf --test-params "pkt_sizes=x,y" $TESTNAME
You can also modify the traffic transmission duration and the number
-of trials run by the traffic generator by extending the example
+of tests run by the traffic generator by extending the example
commandline above to:
.. code-block:: console
- $ ./vsperf --test-params "pkt_sizes=x,y;duration=10;rfc2455_trials=3" $TESTNAME
+ $ ./vsperf --test-params "pkt_sizes=x,y;duration=10;rfc2544_tests=1" $TESTNAME
Dummy Setup
------------
diff --git a/docs/design/trafficgen_integration_guide.rst b/docs/design/trafficgen_integration_guide.rst
index a30b2d61..266c6bc0 100644
--- a/docs/design/trafficgen_integration_guide.rst
+++ b/docs/design/trafficgen_integration_guide.rst
@@ -161,9 +161,9 @@ Example of synchronous interfaces:
.. code-block:: python
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
- def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def send_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
def send_cont_traffic(self, traffic=None, duration=20):
@@ -171,11 +171,11 @@ Example of asynchronous interfaces:
.. code-block:: python
- def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def start_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
def wait_rfc2544_throughput(self):
- def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def start_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
def wait_rfc2544_back2back(self):
@@ -221,7 +221,7 @@ functions:
* param **vlan**: A dictionary with vlan specific parameters,
e.g. **priority**, **cfi**, **id** and vlan on/off switch **enabled**.
- * param **trials**: Number of trials to execute.
+ * param **tests**: Number of times the test is executed.
* param **duration**: Duration of continuous test or per iteration duration
in case of RFC2544 throughput or back2back traffic types.
* param **lossrate**: Acceptable lossrate percentage.
diff --git a/docs/design/vswitchperf_design.rst b/docs/design/vswitchperf_design.rst
index 53515249..e61b3ea6 100755
--- a/docs/design/vswitchperf_design.rst
+++ b/docs/design/vswitchperf_design.rst
@@ -53,7 +53,7 @@ for development purposes:
.. code-block:: console
- $ ./vsperf --test-params 'duration=10;rfc2544_trials=1;pkt_sizes=64' --tests 'pvp_tput'
+ $ ./vsperf --test-params 'duration=10;rfc2544_tests=1;pkt_sizes=64' --tests 'pvp_tput'
Typical Test Sequence
=====================
@@ -155,12 +155,12 @@ ITrafficGenerator
start_cont_traffic(traffic, time, framerate)
stop_cont_traffic(self):
- send_rfc2544_throughput(traffic, trials, duration, lossrate)
- start_rfc2544_throughput(traffic, trials, duration, lossrate)
+ send_rfc2544_throughput(traffic, tests, duration, lossrate)
+ start_rfc2544_throughput(traffic, tests, duration, lossrate)
wait_rfc2544_throughput(self)
- send_rfc2544_back2back(traffic, trials, duration, lossrate)
- start_rfc2544_back2back(traffic, , trials, duration, lossrate)
+ send_rfc2544_back2back(traffic, tests, duration, lossrate)
+ start_rfc2544_back2back(traffic, , tests, duration, lossrate)
wait_rfc2544_back2back()
Note ``send_xxx()`` blocks whereas ``start_xxx()`` does not and must be followed by a subsequent call to ``wait_xxx()``.
diff --git a/docs/requirements/vswitchperf_ltd.rst b/docs/requirements/vswitchperf_ltd.rst
index 6b882290..9e26f637 100644
--- a/docs/requirements/vswitchperf_ltd.rst
+++ b/docs/requirements/vswitchperf_ltd.rst
@@ -1947,6 +1947,128 @@ Test ID: LTD.Throughput.Overlay.Network.<tech>.RFC2544.PacketLossRatio
- CPU and memory utilization may also be collected as part of this
test, to determine the vSwitch's performance footprint on the system.
+.. 3.2.3.1.15
+
+Test ID: LTD.Throughput.RFC2544.MatchAction.PacketLossRatio
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ **Title**: RFC 2544 X% packet loss ratio match action Throughput and Latency Test
+
+ **Prerequisite Test**: LTD.Throughput.RFC2544.PacketLossRatio
+
+ **Priority**:
+
+ **Description**:
+
+ The aim of this test is to determine the cost of carrying out match
+ action(s) on the DUT’s RFC2544 Throughput with X% traffic loss for
+ a constant load (fixed length frames at a fixed interval time).
+
+ Each test case requires:
+ * selection of a specific match action(s),
+ * specifying a percentage of total traffic that is elligible
+ for the match action,
+ * determination of the specific test configuration (number
+ of flows, number of test ports, presence of an external
+ controller, etc.), and
+ * measurement of the RFC 2544 Throughput level with X% packet
+ loss: Traffic shall be bi-directional and symmetric.
+
+ Note: It would be ideal to verify that all match action-elligible
+ traffic was forwarded to the correct port, and if forwarded to
+ an unintended port it should be considered lost.
+
+ A match action is an action that is typically carried on a frame
+ or packet that matches a set of flow classification parameters
+ (typically frame/packet header fields). A match action may or may
+ not modify a packet/frame. Match actions include [1]:
+ * output : outputs a packet to a particular port.
+ * normal: Subjects the packet to traditional L2/L3 processing
+ (MAC learning).
+ * flood: Outputs the packet on all switch physical ports
+ other than the port on which it was received and any ports
+ on which flooding is disabled.
+ * all: Outputs the packet on all switch physical ports other
+ than the port on which it was received.
+ * local: Outputs the packet on the ``local port,'' which
+ corresponds to the network device that has the same name as
+ the bridge.
+ * in_port: Outputs the packet on the port from which it was
+ received.
+ * Controller: Sends the packet and its metadata to the
+ OpenFlow controller as a ``packet in'' message.
+ * enqueue: Enqueues the packet on the specified queue
+ within port.
+ * drop: discard the packet.
+
+ Modifications include [1]:
+ * mod vlan: covered by LTD.Throughput.RFC2544.PacketLossRatioFrameModification
+ * mod_dl_src: Sets the source Ethernet address.
+ * mod_dl_dst: Sets the destination Ethernet address.
+ * mod_nw_src: Sets the IPv4 source address.
+ * mod_nw_dst: Sets the IPv4 destination address.
+ * mod_tp_src: Sets the TCP or UDP or SCTP source port.
+ * mod_tp_dst: Sets the TCP or UDP or SCTP destination port.
+ * mod_nw_tos: Sets the DSCP bits in the IPv4 ToS/DSCP or
+ IPv6 traffic class field.
+ * mod_nw_ecn: Sets the ECN bits in the appropriate IPv4 or
+ IPv6 field.
+ * mod_nw_ttl: Sets the IPv4 TTL or IPv6 hop limit field.
+
+ Note: This comprehensive list requires extensive traffic generator
+ capabilities.
+
+ The match action(s) that were applied as part of the test should be
+ reported in the final test report.
+
+ During this test, the DUT must perform the following operations on
+ the traffic flow:
+ * Perform packet parsing on the DUT’s ingress port.
+ * Perform any relevant address look-ups on the DUT’s ingress
+ ports.
+ * Carry out one or more of the match actions specified above.
+
+ The default loss percentages to be tested are: - X = 0% - X = 10^-7%
+ Other values can be tested if required by the user. The selected
+ frame sizes are those previously defined under Default Test
+ Parameters.
+
+ The test can also be used to determine the average latency of the
+ traffic when a match action is applied to packets in a flow. Under
+ the RFC2544 test methodology, the test duration will include a
+ number of trials; each trial should run for a minimum period of 60
+ seconds. A binary search methodology must be applied for each
+ trial to obtain the final result.
+
+ **Expected Result:**
+
+ At the end of each trial, the presence or absence of loss
+ determines the modification of offered load for the next trial,
+ converging on a maximum rate, or RFC2544Throughput with X% loss.
+ The Throughput load is re-used in related RFC2544 tests and other
+ tests.
+
+ **Metrics Collected:**
+
+ The following are the metrics collected for this test:
+ * The RFC 2544 Throughput in Frames Per Second (FPS) and Mbps
+ of the DUT for each frame size with X% packet loss.
+ * The average latency of the traffic flow when passing through
+ the DUT (if testing for latency, note that this average is
+ different from the test specified in Section 26.3 ofRFC2544).
+ * CPU and memory utilization may also be collected as part of
+ this test, to determine the vSwitch’s performance footprint
+ on the system.
+
+ The metrics collected can be compared to that of the prerequisite
+ test to determine the cost of the match action(s) in the pipeline.
+
+ **Deployment scenario**:
+
+ - Physical → virtual switch → physical (and others are possible)
+
+ [1] ovs-ofctl - administer OpenFlow switches
+ [http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt ]
+
.. 3.2.3.2
diff --git a/docs/userguide/yardstick.rst b/docs/userguide/yardstick.rst
index 3d249e1b..ec306d57 100755
--- a/docs/userguide/yardstick.rst
+++ b/docs/userguide/yardstick.rst
@@ -130,7 +130,7 @@ argument. Following options are supported:
- **bidirectional** - specifies if traffic will be uni (False) or bi-directional
(True); Default: False
- **iload** - specifies frame rate; Default: 100
-- **rfc2544_trials** - specifies the number of trials performed for each packet
+- **rfc2544_tests** - specifies the number of tests performed for each packet
size
- **multistream** - specifies the number of simulated streams; Default: 0 (i.e.
multistream feature is disabled)
diff --git a/tools/pkt_gen/dummy/dummy.py b/tools/pkt_gen/dummy/dummy.py
index d3d79974..3324824c 100755
--- a/tools/pkt_gen/dummy/dummy.py
+++ b/tools/pkt_gen/dummy/dummy.py
@@ -146,8 +146,8 @@ class Dummy(trafficgen.ITrafficGenerator):
results = get_user_traffic(
'continuous',
'%dmpps, multistream %s, duration %d' % (traffic['frame_rate'],
- traffic['multistream'],
- duration), traffic_,
+ traffic['multistream'],
+ duration), traffic_,
('frames tx', 'frames rx', 'tx rate %', 'rx rate %', 'min latency',
'max latency', 'avg latency', 'frameloss %'))
@@ -169,7 +169,7 @@ class Dummy(trafficgen.ITrafficGenerator):
result[ResultsConstants.FRAME_LOSS_PERCENT] = float(results[7])
return result
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""
Send traffic per RFC2544 throughput test specifications.
@@ -182,8 +182,8 @@ class Dummy(trafficgen.ITrafficGenerator):
results = get_user_traffic(
'throughput',
- '%d trials, %d seconds iterations, %f packet loss, multistream '
- '%s' % (trials, duration, lossrate, traffic['multistream']),
+ '%d tests, %d seconds iterations, %f packet loss, multistream '
+ '%s' % (tests, duration, lossrate, traffic['multistream']),
traffic_,
('frames tx', 'frames rx', 'tx rate %', 'rx rate %', 'min latency',
'max latency', 'avg latency', 'frameloss %'))
diff --git a/tools/pkt_gen/ixia/ixia.py b/tools/pkt_gen/ixia/ixia.py
index ae5da6d2..cd14a2a7 100755
--- a/tools/pkt_gen/ixia/ixia.py
+++ b/tools/pkt_gen/ixia/ixia.py
@@ -38,9 +38,9 @@ import tkinter
import logging
import os
+from collections import OrderedDict
from tools.pkt_gen import trafficgen
from conf import settings
-from collections import OrderedDict
from core.results.results_constants import ResultsConstants
_ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
@@ -252,13 +252,13 @@ class Ixia(trafficgen.ITrafficGenerator):
"""
return self.run_tcl('stopTraffic')
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20, lossrate=0.0):
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20, lossrate=0.0):
"""See ITrafficGenerator for description
"""
params = {}
params['config'] = {
- 'trials': trials,
+ 'tests': tests,
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
diff --git a/tools/pkt_gen/ixia/pass_fail.tcl b/tools/pkt_gen/ixia/pass_fail.tcl
index acb4443f..79b7f10d 100755
--- a/tools/pkt_gen/ixia/pass_fail.tcl
+++ b/tools/pkt_gen/ixia/pass_fail.tcl
@@ -675,7 +675,10 @@ proc rfcThroughputTest { testSpec trafficSpec } {
# testSpec
- set numTrials [dict get $testSpec trials] ;# we don't use this yet
+ # RFC2544 to IXIA terminology mapping (it affects Ixia configuration below):
+ # Test => Trial
+ # Trial => Iteration
+ set numTrials [dict get $testSpec tests] ;# we don't use this yet
set duration [dict get $testSpec duration]
set lossRate [dict get $testSpec lossrate]
set multipleStream [dict get $testSpec multipleStreams] ;# we don't use this yet
diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py
index 928b5a6e..5e4ae569 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -253,15 +253,15 @@ class IxNet(trafficgen.ITrafficGenerator):
"""
return self._wait_result()
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""See ITrafficGenerator for description
"""
- self.start_rfc2544_throughput(traffic, trials, duration, lossrate)
+ self.start_rfc2544_throughput(traffic, tests, duration, lossrate)
return self.wait_rfc2544_throughput()
- def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def start_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Start transmission.
"""
@@ -270,7 +270,7 @@ class IxNet(trafficgen.ITrafficGenerator):
self._params['config'] = {
'binary': True,
- 'trials': trials,
+ 'tests': tests,
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
@@ -387,18 +387,18 @@ class IxNet(trafficgen.ITrafficGenerator):
# the results file
return parse_ixnet_rfc_results(parse_result_string(output[0]))
- def send_rfc2544_back2back(self, traffic=None, trials=50, duration=2,
+ def send_rfc2544_back2back(self, traffic=None, tests=1, duration=2,
lossrate=0.0):
"""See ITrafficGenerator for description
"""
# NOTE 2 seconds is the recommended duration for a back 2 back
# test in RFC2544. 50 trials is the recommended number from the
# RFC also.
- self.start_rfc2544_back2back(traffic, trials, duration, lossrate)
+ self.start_rfc2544_back2back(traffic, tests, duration, lossrate)
return self.wait_rfc2544_back2back()
- def start_rfc2544_back2back(self, traffic=None, trials=50, duration=2,
+ def start_rfc2544_back2back(self, traffic=None, tests=1, duration=2,
lossrate=0.0):
"""Start transmission.
"""
@@ -407,7 +407,7 @@ class IxNet(trafficgen.ITrafficGenerator):
self._params['config'] = {
'binary': True,
- 'trials': trials,
+ 'tests': tests,
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
diff --git a/tools/pkt_gen/ixnet/ixnetrfc2544.tcl b/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
index 233db040..e70ca874 100644
--- a/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
+++ b/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
@@ -83,13 +83,16 @@ proc startRfc2544Test { testSpec trafficSpec } {
set duration [dict get $testSpec duration]
+ # RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script):
+ # Test => Trial
+ # Trial => Iteration
if {$binary} {
- set numTrials [dict get $testSpec trials]
+ set numTests [dict get $testSpec tests]
set frameRate 100
set tolerance [dict get $testSpec lossrate]
set loadType binary
} else {
- set numTrials 1
+ set numTests 1
set frameRate [dict get $testSpec framerate]
set tolerance 0.0
set loadType custom
@@ -7778,7 +7781,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-framesize $frameSize \
-reportTputRateUnit mbps \
-duration $duration \
- -numtrials $numTrials \
+ -numtrials $numTests \
-trafficType constantLoading \
-burstSize 1 \
-framesPerBurstGap 1 \
@@ -7951,7 +7954,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-rfc2889ordering noOrdering \
-floodedFramesEnabled False \
-duration $duration \
- -numtrials $numTrials \
+ -numtrials $numTests \
-trafficType constantLoading \
-burstSize 1 \
-framesPerBurstGap 1 \
diff --git a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
index 0bdba9cd..539c5a5b 100755
--- a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
+++ b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
@@ -83,13 +83,16 @@ proc startRfc2544Test { testSpec trafficSpec } {
set duration [dict get $testSpec duration]
+ # RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script):
+ # Test => Trial
+ # Trial => Iteration
if {$binary} {
- set numTrials [dict get $testSpec trials]
+ set numTests [dict get $testSpec tests]
set frameRate 100
set tolerance [dict get $testSpec lossrate]
set loadType binary
} else {
- set numTrials 1
+ set numTests 1
set frameRate [dict get $testSpec framerate]
set tolerance 0.0
set loadType custom
@@ -3218,7 +3221,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-framesize $frameSize \
-reportTputRateUnit mbps \
-duration $duration \
- -numtrials $numTrials \
+ -numtrials $numTests \
-trafficType constantLoading \
-burstSize 1 \
-framesPerBurstGap 1 \
@@ -3391,7 +3394,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-rfc2889ordering noOrdering \
-floodedFramesEnabled False \
-duration $duration \
- -numtrials $numTrials \
+ -numtrials $numTests \
-trafficType constantLoading \
-burstSize 1 \
-framesPerBurstGap 1 \
diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py
index 1d2fdee5..790286d8 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -502,7 +502,7 @@ class Moongen(ITrafficGenerator):
if results_match and parameters_match and num_traffic_streams:
# Assume for now 10G link speed
max_theoretical_fps = (
- num_traffic_streams * (10000000000 / 8) / (frame_size + 20))
+ num_traffic_streams * (self._moongen_line_speed / 8) / (frame_size + 20))
moongen_results[ResultsConstants.THROUGHPUT_RX_FPS] = (
float(results_match.group(6)) * 1000000)
@@ -537,7 +537,7 @@ class Moongen(ITrafficGenerator):
return moongen_results
def send_rfc2544_throughput(self, traffic=None, duration=20,
- lossrate=0.0, trials=1):
+ lossrate=0.0, tests=1):
#
# Send traffic per RFC2544 throughput test specifications.
#
@@ -546,7 +546,7 @@ class Moongen(ITrafficGenerator):
# detected is found.
#
# :param traffic: Detailed "traffic" spec, see design docs for details
- # :param trials: Number of trials to execute
+ # :param tests: Number of tests to execute
# :param duration: Per iteration duration
# :param lossrate: Acceptable lossrate percentage
# :returns: dictionary of strings with following data:
@@ -582,7 +582,7 @@ class Moongen(ITrafficGenerator):
total_max_latency_ns = 0
total_avg_latency_ns = 0
- for test_run in range(1, trials+1):
+ for test_run in range(1, tests+1):
collected_results = (
Moongen.run_moongen_and_collect_results(self, test_run=test_run))
@@ -611,35 +611,35 @@ class Moongen(ITrafficGenerator):
results = OrderedDict()
results[ResultsConstants.THROUGHPUT_RX_FPS] = (
- '{:.6f}'.format(total_throughput_rx_fps / trials))
+ '{:.6f}'.format(total_throughput_rx_fps / tests))
results[ResultsConstants.THROUGHPUT_RX_MBPS] = (
- '{:.3f}'.format(total_throughput_rx_mbps / trials))
+ '{:.3f}'.format(total_throughput_rx_mbps / tests))
results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
- '{:.3f}'.format(total_throughput_rx_pct / trials))
+ '{:.3f}'.format(total_throughput_rx_pct / tests))
results[ResultsConstants.TX_RATE_FPS] = (
- '{:.6f}'.format(total_throughput_tx_fps / trials))
+ '{:.6f}'.format(total_throughput_tx_fps / tests))
results[ResultsConstants.TX_RATE_MBPS] = (
- '{:.3f}'.format(total_throughput_tx_mbps / trials))
+ '{:.3f}'.format(total_throughput_tx_mbps / tests))
results[ResultsConstants.TX_RATE_PERCENT] = (
- '{:.3f}'.format(total_throughput_tx_pct / trials))
+ '{:.3f}'.format(total_throughput_tx_pct / tests))
results[ResultsConstants.MIN_LATENCY_NS] = (
- '{:.3f}'.format(total_min_latency_ns / trials))
+ '{:.3f}'.format(total_min_latency_ns / tests))
results[ResultsConstants.MAX_LATENCY_NS] = (
- '{:.3f}'.format(total_max_latency_ns / trials))
+ '{:.3f}'.format(total_max_latency_ns / tests))
results[ResultsConstants.AVG_LATENCY_NS] = (
- '{:.3f}'.format(total_avg_latency_ns / trials))
+ '{:.3f}'.format(total_avg_latency_ns / tests))
return results
- def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def start_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Non-blocking version of 'send_rfc2544_throughput'.
@@ -655,14 +655,14 @@ class Moongen(ITrafficGenerator):
self._logger.info('In moongen wait_rfc2544_throughput')
def send_rfc2544_back2back(self, traffic=None, duration=60,
- lossrate=0.0, trials=1):
+ lossrate=0.0, tests=1):
"""Send traffic per RFC2544 back2back test specifications.
Send packets at a fixed rate, using ``traffic``
configuration, for duration seconds.
:param traffic: Detailed "traffic" spec, see design docs for details
- :param trials: Number of trials to execute
+ :param tests: Number of tests to execute
:param duration: Per iteration duration
:param lossrate: Acceptable loss percentage
@@ -696,7 +696,7 @@ class Moongen(ITrafficGenerator):
results[ResultsConstants.SCAL_STREAM_TYPE] = 0
results[ResultsConstants.SCAL_PRE_INSTALLED_FLOWS] = 0
- for test_run in range(1, trials+1):
+ for test_run in range(1, tests+1):
collected_results = (
Moongen.run_moongen_and_collect_results(self, test_run=test_run))
@@ -726,28 +726,28 @@ class Moongen(ITrafficGenerator):
# Calculate average results
results[ResultsConstants.B2B_RX_FPS] = (
- results[ResultsConstants.B2B_RX_FPS] / trials)
+ results[ResultsConstants.B2B_RX_FPS] / tests)
results[ResultsConstants.B2B_RX_PERCENT] = (
- results[ResultsConstants.B2B_RX_PERCENT] / trials)
+ results[ResultsConstants.B2B_RX_PERCENT] / tests)
results[ResultsConstants.B2B_TX_FPS] = (
- results[ResultsConstants.B2B_TX_FPS] / trials)
+ results[ResultsConstants.B2B_TX_FPS] / tests)
results[ResultsConstants.B2B_TX_PERCENT] = (
- results[ResultsConstants.B2B_TX_PERCENT] / trials)
+ results[ResultsConstants.B2B_TX_PERCENT] / tests)
results[ResultsConstants.B2B_TX_COUNT] = (
- results[ResultsConstants.B2B_TX_COUNT] / trials)
+ results[ResultsConstants.B2B_TX_COUNT] / tests)
results[ResultsConstants.B2B_FRAMES] = (
- results[ResultsConstants.B2B_FRAMES] / trials)
+ results[ResultsConstants.B2B_FRAMES] / tests)
results[ResultsConstants.B2B_FRAME_LOSS_FRAMES] = (
- results[ResultsConstants.B2B_FRAME_LOSS_FRAMES] / trials)
+ results[ResultsConstants.B2B_FRAME_LOSS_FRAMES] / tests)
results[ResultsConstants.B2B_FRAME_LOSS_PERCENT] = (
- results[ResultsConstants.B2B_FRAME_LOSS_PERCENT] / trials)
+ results[ResultsConstants.B2B_FRAME_LOSS_PERCENT] / tests)
results[ResultsConstants.SCAL_STREAM_COUNT] = 0
results[ResultsConstants.SCAL_STREAM_TYPE] = 0
@@ -755,7 +755,7 @@ class Moongen(ITrafficGenerator):
return results
- def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def start_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
#
# Non-blocking version of 'send_rfc2544_back2back'.
diff --git a/tools/pkt_gen/testcenter/testcenter.py b/tools/pkt_gen/testcenter/testcenter.py
index a1f38d8b..c242269a 100644
--- a/tools/pkt_gen/testcenter/testcenter.py
+++ b/tools/pkt_gen/testcenter/testcenter.py
@@ -211,7 +211,7 @@ class TestCenter(trafficgen.ITrafficGenerator):
return self.get_rfc2544_results(filec)
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""
Send traffic per RFC2544 throughput test specifications.
@@ -243,7 +243,7 @@ class TestCenter(trafficgen.ITrafficGenerator):
return self.get_rfc2544_results(filec)
- def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def send_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""
Send traffic per RFC2544 BacktoBack test specifications.
diff --git a/tools/pkt_gen/trafficgen/trafficgen.py b/tools/pkt_gen/trafficgen/trafficgen.py
index 3953bbb1..fb40cd92 100755
--- a/tools/pkt_gen/trafficgen/trafficgen.py
+++ b/tools/pkt_gen/trafficgen/trafficgen.py
@@ -133,7 +133,7 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Send traffic per RFC2544 throughput test specifications.
@@ -142,7 +142,7 @@ class ITrafficGenerator(object):
detected is found.
:param traffic: Detailed "traffic" spec, see design docs for details
- :param trials: Number of trials to execute
+ :param tests: Number of tests to execute
:param duration: Per iteration duration
:param lossrate: Acceptable lossrate percentage
:returns: dictionary of strings with following data:
@@ -158,7 +158,7 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def start_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Non-blocking version of 'send_rfc2544_throughput'.
@@ -172,7 +172,7 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def send_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Send traffic per RFC2544 back2back test specifications.
@@ -180,7 +180,7 @@ class ITrafficGenerator(object):
configuration, for duration seconds.
:param traffic: Detailed "traffic" spec, see design docs for details
- :param trials: Number of trials to execute
+ :param tests: Number of tests to execute
:param duration: Per iteration duration
:param lossrate: Acceptable loss percentage
@@ -191,7 +191,7 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def start_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Non-blocking version of 'send_rfc2544_back2back'.
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py
index 67e9984f..449ef5b4 100755
--- a/tools/pkt_gen/xena/xena.py
+++ b/tools/pkt_gen/xena/xena.py
@@ -275,10 +275,10 @@ class Xena(ITrafficGenerator):
return result_dict
- def _setup_json_config(self, trials, loss_rate, testtype=None):
+ def _setup_json_config(self, tests, loss_rate, testtype=None):
"""
Create a 2bUsed json file that will be used for xena2544.exe execution.
- :param trials: Number of trials
+ :param tests: Number of tests
:param loss_rate: The acceptable loss rate as float
:param testtype: Either '2544_b2b' or '2544_throughput' as string
:return: None
@@ -305,7 +305,7 @@ class Xena(ITrafficGenerator):
if testtype == '2544_throughput':
j_file.set_test_options_tput(
packet_sizes=self._params['traffic']['l2']['framesize'],
- iterations=trials, loss_rate=loss_rate,
+ iterations=tests, loss_rate=loss_rate,
duration=self._duration, micro_tpld=True if self._params[
'traffic']['l2']['framesize'] == 64 else False)
j_file.enable_throughput_test()
@@ -313,7 +313,7 @@ class Xena(ITrafficGenerator):
elif testtype == '2544_b2b':
j_file.set_test_options_back2back(
packet_sizes=self._params['traffic']['l2']['framesize'],
- iterations=trials, duration=self._duration,
+ iterations=tests, duration=self._duration,
startvalue=self._params['traffic']['frame_rate'],
endvalue=self._params['traffic']['frame_rate'],
micro_tpld=True if self._params[
@@ -590,7 +590,7 @@ class Xena(ITrafficGenerator):
"""
return self._stop_api_traffic()
- def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def send_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Send traffic per RFC2544 throughput test specifications.
@@ -603,14 +603,14 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
- self._setup_json_config(trials, lossrate, '2544_throughput')
+ self._setup_json_config(tests, lossrate, '2544_throughput')
self._start_xena_2544()
self._wait_xena_2544_complete()
root = ET.parse(r'./tools/pkt_gen/xena/xena2544-report.xml').getroot()
return Xena._create_throughput_result(root)
- def start_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
+ def start_rfc2544_throughput(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Non-blocking version of 'send_rfc2544_throughput'.
@@ -622,7 +622,7 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
- self._setup_json_config(trials, lossrate, '2544_throughput')
+ self._setup_json_config(tests, lossrate, '2544_throughput')
self._start_xena_2544()
def wait_rfc2544_throughput(self):
@@ -634,7 +634,7 @@ class Xena(ITrafficGenerator):
root = ET.parse(r'./tools/pkt_gen/xena/xena2544-report.xml').getroot()
return Xena._create_throughput_result(root)
- def send_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def send_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Send traffic per RFC2544 back2back test specifications.
@@ -647,13 +647,13 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
- self._setup_json_config(trials, lossrate, '2544_b2b')
+ self._setup_json_config(tests, lossrate, '2544_b2b')
self._start_xena_2544()
self._wait_xena_2544_complete()
root = ET.parse(r'./tools/pkt_gen/xena/xena2544-report.xml').getroot()
return Xena._create_throughput_result(root)
- def start_rfc2544_back2back(self, traffic=None, trials=1, duration=20,
+ def start_rfc2544_back2back(self, traffic=None, tests=1, duration=20,
lossrate=0.0):
"""Non-blocking version of 'send_rfc2544_back2back'.
@@ -665,7 +665,7 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
- self._setup_json_config(trials, lossrate, '2544_b2b')
+ self._setup_json_config(tests, lossrate, '2544_b2b')
self._start_xena_2544()
def wait_rfc2544_back2back(self):
diff --git a/vsperf b/vsperf
index d41b92f2..1f693a55 100755
--- a/vsperf
+++ b/vsperf
@@ -180,7 +180,7 @@ def parse_arguments():
group.add_argument('--test-params', action=_SplitTestParamsAction,
help='csv list of test parameters: key=val; e.g.'
'including pkt_sizes=x,y; duration=x; '
- 'rfc2544_trials=x ...')
+ 'rfc2544_tests=x ...')
group.add_argument('--opnfvpod', help='name of POD in opnfv')
args = vars(parser.parse_args())