aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/build-vsperf.sh17
-rw-r--r--conf/02_vswitch.conf5
-rw-r--r--conf/03_traffic.conf15
-rw-r--r--conf/04_vnf.conf5
-rw-r--r--conf/06_pktfwd.conf5
-rw-r--r--conf/10_custom.conf14
-rw-r--r--conf/integration/01_testcases.conf2
-rw-r--r--core/traffic_controller_rfc2544.py10
-rwxr-xr-xdocs/configguide/installation.rst28
-rw-r--r--docs/configguide/trafficgen.rst107
-rw-r--r--docs/design/trafficgen_integration_guide.rst10
-rwxr-xr-xdocs/design/vswitchperf_design.rst10
-rw-r--r--docs/release/NEWS.rst9
-rw-r--r--docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.txt1232
-rw-r--r--docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.xml1016
-rw-r--r--docs/requirements/vswitchperf_ltd.rst122
-rwxr-xr-xdocs/userguide/integration.rst328
-rwxr-xr-xdocs/userguide/testusage.rst7
-rwxr-xr-xdocs/userguide/yardstick.rst6
-rw-r--r--fuel-plugin-vsperf/vagrant/README.md8
-rwxr-xr-xfuel-plugin-vsperf/vagrant/build_fuel_plugin.sh9
-rw-r--r--src/dpdk/dpdk.py13
-rw-r--r--src/ovs/ofctl.py15
-rwxr-xr-xsystems/centos/build_base_machine.sh2
-rwxr-xr-xsystems/fedora/20/build_base_machine.sh6
-rwxr-xr-xsystems/fedora/21/build_base_machine.sh4
-rwxr-xr-xsystems/fedora/22/build_base_machine.sh6
-rwxr-xr-xsystems/rhel/7.2/build_base_machine.sh4
-rwxr-xr-xsystems/ubuntu/14.04/build_base_machine.sh4
-rwxr-xr-xsystems/ubuntu/build_base_machine.sh2
-rw-r--r--testcases/integration.py173
-rw-r--r--testcases/testcase.py92
-rw-r--r--tools/hugepages.py133
-rw-r--r--tools/namespace.py4
-rw-r--r--tools/networkcard.py2
-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.py20
-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.py167
-rw-r--r--tools/pkt_gen/testcenter/testcenter.py4
-rwxr-xr-xtools/pkt_gen/trafficgen/trafficgen.py12
-rw-r--r--tools/pkt_gen/xena/XenaDriver.py16
-rwxr-xr-xtools/pkt_gen/xena/xena.py138
-rw-r--r--tools/pkt_gen/xena/xena_json.py16
-rw-r--r--tools/systeminfo.py41
-rw-r--r--vnfs/qemu/qemu.py8
-rw-r--r--vnfs/qemu/qemu_pci_passthrough.py7
-rwxr-xr-xvsperf8
-rw-r--r--vswitches/ovs.py6
-rw-r--r--vswitches/ovs_dpdk_vhost.py1
-rw-r--r--vswitches/ovs_vanilla.py1
54 files changed, 3561 insertions, 352 deletions
diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh
index 5370898a..8fb69072 100755
--- a/ci/build-vsperf.sh
+++ b/ci/build-vsperf.sh
@@ -227,15 +227,15 @@ function generate_report() {
# ...and remove original log files
find "${TEST_REPORT_LOG_DIR}" -mindepth 1 -maxdepth 1 -type d -exec rm -rf \{\} \;
- # clone releng repository
- echo "Cloning releng repository..."
- [ -d releng ] && rm -rf releng
- git clone https://gerrit.opnfv.org/gerrit/releng &> /dev/null
+ # clone opnfvdocs repository
+ echo "Cloning opnfvdocs repository..."
+ [ -d opnfvdocs ] && rm -rf opnfvdocs
+ git clone https://gerrit.opnfv.org/gerrit/opnfvdocs &> /dev/null
# generate final docs with test results
echo "Generating test report..."
- sed -ie 's,python ,python2 ,g' ./releng/utils/docs-build.sh
- ./releng/utils/docs-build.sh &> /dev/null
+ sed -ie 's,python ,python2 ,g' ./opnfvdocs/scripts/docs-build.sh
+ OPNFVDOCS_DIR='./opnfvdocs' ./opnfvdocs/scripts/docs-build.sh &> /dev/null
# store PDF with test results into dedicated directory
if [ -f $TEST_REPORT_FILE ] ; then
@@ -248,6 +248,11 @@ function generate_report() {
# pushes test report and logs collected during test execution into artifactory
function push_results_to_artifactory() {
+ # clone releng repository
+ echo "Cloning releng repository..."
+ [ -d releng ] && rm -rf releng
+ git clone https://gerrit.opnfv.org/gerrit/releng &> /dev/null
+
echo "Pushing results and logs into artifactory..."
. ./releng/utils/push-test-logs.sh "$DATE"
diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf
index 79f0afbd..81632d56 100644
--- a/conf/02_vswitch.conf
+++ b/conf/02_vswitch.conf
@@ -100,6 +100,11 @@ VSWITCH_BRIDGE_NAME = 'br0'
# directory where hugepages will be mounted on system init
HUGEPAGE_DIR = '/dev/hugepages'
+# If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
+# Default is 10 GB.
+# 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
+HUGEPAGE_RAM_ALLOCATION = 10485760
+
# Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
# Note that the '0x' notation should not be used.
VSWITCH_PMD_CPU_MASK = '30'
diff --git a/conf/03_traffic.conf b/conf/03_traffic.conf
index 01e3e5cf..fd0f589d 100644
--- a/conf/03_traffic.conf
+++ b/conf/03_traffic.conf
@@ -28,7 +28,7 @@ TRAFFICGEN = 'Dummy'
#TRAFFICGEN = 'IxNet'
#TRAFFICGEN = 'Ixia'
#TRAFFICGEN = 'Xena'
-#TRAFFICGEN = 'MoonGen'
+#TRAFFICGEN = 'Moongen'
# List of packet sizes to send.
# Expand like this: (64, 128, 256, 512, 1024)
@@ -179,13 +179,26 @@ TRAFFICGEN_XENA_PORT1_IP = '192.168.199.11'
TRAFFICGEN_XENA_PORT1_CIDR = 24
TRAFFICGEN_XENA_PORT1_GATEWAY = '192.168.199.1'
+# Xena RFC 2544 options
+# Please reference xena documentation before making changes to these settings
+TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE = '10.0'
+TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE = '0.1'
+TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE = '100.0'
+TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
+TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
+TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+
###################################################
# MoonGen Configuration and Connection Info-- BEGIN
+# Ex: TRAFFICGEN_MOONGEN_HOST_IP_ADDR = "192.10.1.1"
TRAFFICGEN_MOONGEN_HOST_IP_ADDR = ''
TRAFFICGEN_MOONGEN_USER = ''
TRAFFICGEN_MOONGEN_BASE_DIR = ''
TRAFFICGEN_MOONGEN_PORTS = ''
+# Ex. 10 Gbps: TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
+# Today only 10 Gbps is supported
+TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = ''
# MoonGen Configuration and Connection Info-- END
###################################################
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index 0a80c1af..ff110d93 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -35,7 +35,10 @@ GUEST_IMAGE = ['', '']
# For 2 VNFs you may use [180, 180]
GUEST_TIMEOUT = [180, 180]
-# packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+# packet forwarding mode supported by testpmd; Please see DPDK documentation
+# for comprehensive list of modes supported by your version.
+# e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+# Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
GUEST_TESTPMD_FWD_MODE = 'csum'
# guest loopback application method; supported options are:
diff --git a/conf/06_pktfwd.conf b/conf/06_pktfwd.conf
index d6a83d07..6175aa6a 100644
--- a/conf/06_pktfwd.conf
+++ b/conf/06_pktfwd.conf
@@ -24,7 +24,10 @@ PKTFWD = 'TestPMD'
# ############################
TESTPMD_ARGS = []
-# packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+# packet forwarding mode supported by testpmd; Please see DPDK documentation
+# for comprehensive list of modes supported by your version.
+# e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+# Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
TESTPMD_FWD_MODE = 'csum'
# checksum calculation layer: ip|udp|tcp|sctp|outer-ip
TESTPMD_CSUM_LAYER = 'ip'
diff --git a/conf/10_custom.conf b/conf/10_custom.conf
index 4ffe470e..b3707149 100644
--- a/conf/10_custom.conf
+++ b/conf/10_custom.conf
@@ -20,7 +20,7 @@ TRAFFICGEN = 'Dummy'
#TRAFFICGEN = 'IxNet'
#TRAFFICGEN = 'Ixia'
#TRAFFICGEN = 'Xena'
-#TRAFFICGEN = 'MoonGen'
+#TRAFFICGEN = 'Moongen'
###########################################
# Spirent TestCenter Configuration -- BEGIN
@@ -79,6 +79,15 @@ TRAFFICGEN_XENA_PORT1_IP = '192.168.199.11'
TRAFFICGEN_XENA_PORT1_CIDR = 24
TRAFFICGEN_XENA_PORT1_GATEWAY = '192.168.199.1'
+# Xena RFC 2544 options
+# Please reference xena documentation before making changes to these settings
+TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE = '10.0'
+TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE = '0.1'
+TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE = '100.0'
+TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
+TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
+TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+
###################################################
# MoonGen Configuration and Connection Info-- BEGIN
@@ -87,6 +96,9 @@ TRAFFICGEN_MOONGEN_HOST_IP_ADDR = ""
TRAFFICGEN_MOONGEN_USER = "root"
TRAFFICGEN_MOONGEN_BASE_DIR = "/root/MoonGen"
TRAFFICGEN_MOONGEN_PORTS = "{0,1}"
+# Ex. 10 Gbps: TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
+# Today only 10 Gbps is supported
+TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
# MoonGen Configuration and Connection Info-- END
###################################################
diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf
index 2edbe08b..e050e358 100644
--- a/conf/integration/01_testcases.conf
+++ b/conf/integration/01_testcases.conf
@@ -430,7 +430,7 @@ INTEGRATION_TESTS = [
# "vSwitch" : "OvsVanilla",
# "VNF" : "QemuVirtioNet",
# "Trafficgen": "IxNet",
-# "Test Parameters": {"guest_loopback" : "linux_bridge"},
+# "Parameters": {"guest_loopback" : "linux_bridge"},
# "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
# [
# ['vnf', 'start'],
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/installation.rst b/docs/configguide/installation.rst
index 5072dee0..70572b07 100755
--- a/docs/configguide/installation.rst
+++ b/docs/configguide/installation.rst
@@ -42,6 +42,12 @@ download at OPNFV website.
vloop-vnf changelog:
====================
+* `vloop-vnf-ubuntu-14.04_20160804`_
+
+ * Linux kernel 4.4.0 installed
+ * libnuma-dev installed
+ * security updates applied
+
* `vloop-vnf-ubuntu-14.04_20160303`_
* snmpd service is disabled by default to avoid error messages during VM boot
@@ -107,24 +113,28 @@ Fedora, RedHat and Ubuntu
Gotcha
^^^^^^
.. code:: bash
+
$ source bin/activate
Badly placed ()'s.
Check what type of shell you are using
.. code:: bash
+
echo $shell
/bin/tcsh
See what scripts are available in $HOME/vsperfenv/bin
.. code:: bash
+
$ ls bin/
activate activate.csh activate.fish activate_this.py
source the appropriate script
.. code:: bash
+
$ source bin/activate.csh
Working Behind a Proxy
@@ -140,6 +150,7 @@ running any of the above. For example:
.. _a link: http://www.softwarecollections.org/en/scls/rhscl/python33/
.. _virtualenv: https://virtualenv.readthedocs.org/en/latest/
+.. _vloop-vnf-ubuntu-14.04_20160804: http://artifacts.opnfv.org/vswitchperf/vnf/vloop-vnf-ubuntu-14.04_20160804.qcow2
.. _vloop-vnf-ubuntu-14.04_20160303: http://artifacts.opnfv.org/vswitchperf/vnf/vloop-vnf-ubuntu-14.04_20160303.qcow2
.. _vloop-vnf-ubuntu-14.04_20151216: http://artifacts.opnfv.org/vswitchperf/vnf/vloop-vnf-ubuntu-14.04_20151216.qcow2
@@ -175,9 +186,19 @@ parameter. In recent vswitchd versions, option VSWITCHD_DPDK_CONFIG will be
used to configure vswitchd via ovs-vsctl calls.
With the --socket-mem argument set to use 1 hugepage on the specified sockets as
-seen above, the configuration will need 9 hugepages total to run all tests
+seen above, the configuration will need 10 hugepages total to run all tests
within vsperf if the pagesize is set correctly to 1GB.
+VSPerf will verify hugepage amounts are free before executing test
+environments. In case of hugepage amounts not being free, test initialization
+will fail and testing will stop.
+
+**Please Note**: In some instances on a test failure dpdk resources may not
+release hugepages used in dpdk configuration. It is recommended to configure a
+few extra hugepages to prevent a false detection by VSPerf that not enough free
+hugepages are available to execute the test environment. Normally dpdk would use
+previously allocated hugepages upon initialization.
+
Depending on your OS selection configuration of hugepages may vary. Please refer
to your OS documentation to set hugepages correctly. It is recommended to set
the required amount of hugepages to be allocated by default on reboots.
@@ -190,3 +211,8 @@ You can review your hugepage amounts by executing the following command
.. code:: bash
cat /proc/meminfo | grep Huge
+
+If no hugepages are available vsperf will try to automatically allocate some.
+Allocation is controlled by HUGEPAGE_RAM_ALLOCATION configuration parameter in
+``02_vswitch.conf`` file. Default is 2GB, resulting in either 2 1GB hugepages
+or 1024 2MB hugepages.
diff --git a/docs/configguide/trafficgen.rst b/docs/configguide/trafficgen.rst
index 63560b9c..c323ae9d 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
------------
@@ -176,6 +176,88 @@ need it for the 10\_custom.conf file).
Hit Ok and start the TCL server application
+VSPERF configuration
+~~~~~~~~~~~~~~~~~~~~
+
+There are several configuration options specific to the IxNetworks traffic generator
+from IXIA. It is essential to set them correctly, before the VSPERF is executed
+for the first time.
+
+Detailed description of options follows:
+
+ * TRAFFICGEN_IXNET_MACHINE - IP address of server, where IxNetwork TCL Server is running
+ * TRAFFICGEN_IXNET_PORT - PORT, where IxNetwork TCL Server is accepting connections from
+ TCL clients
+ * TRAFFICGEN_IXNET_USER - username, which will be used during communication with IxNetwork
+ TCL Server and IXIA chassis
+ * TRAFFICGEN_IXIA_HOST - IP address of IXIA traffic generator chassis
+ * TRAFFICGEN_IXIA_CARD - identification of card with dedicated ports at IXIA chassis
+ * TRAFFICGEN_IXIA_PORT1 - identification of the first dedicated port at TRAFFICGEN_IXIA_CARD
+ at IXIA chassis; VSPERF uses two separated ports for traffic generation. In case of
+ unidirectional traffic, it is essential to correctly connect 1st IXIA port to the 1st NIC
+ at DUT, i.e. to the first PCI handle from WHITELIST_NICS list. Otherwise traffic may not
+ be able to pass through the vSwitch.
+ * TRAFFICGEN_IXIA_PORT2 - identification of the second dedicated port at TRAFFICGEN_IXIA_CARD
+ at IXIA chassis; VSPERF uses two separated ports for traffic generation. In case of
+ unidirectional traffic, it is essential to correctly connect 2nd IXIA port to the 2nd NIC
+ at DUT, i.e. to the second PCI handle from WHITELIST_NICS list. Otherwise traffic may not
+ be able to pass through the vSwitch.
+ * TRAFFICGEN_IXNET_LIB_PATH - path to the DUT specific installation of IxNetwork TCL API
+ * TRAFFICGEN_IXNET_TCL_SCRIPT - name of the TCL script, which VSPERF will use for
+ communication with IXIA TCL server
+ * TRAFFICGEN_IXNET_TESTER_RESULT_DIR - folder accessible from IxNetwork TCL server,
+ where test results are stored, e.g. ``c:/ixia_results``; see test-results-share_
+ * TRAFFICGEN_IXNET_DUT_RESULT_DIR - directory accessible from the DUT, where test
+ results from IxNetwork TCL server are stored, e.g. ``/mnt/ixia_results``; see
+ test-results-share_
+
+.. _test-results-share:
+
+Test results share
+~~~~~~~~~~~~~~~~~~
+
+VSPERF is not able to retrieve test results via TCL API directly. Instead, all test
+results are stored at IxNetwork TCL server. Results are stored at folder defined by
+``TRAFFICGEN_IXNET_TESTER_RESULT_DIR`` configuration parameter. Content of this
+folder must be shared (e.g. via samba protocol) between TCL Server and DUT, where
+VSPERF is executed. VSPERF expects, that test results will be available at directory
+configured by ``TRAFFICGEN_IXNET_DUT_RESULT_DIR`` configuration parameter.
+
+Example of sharing configuration:
+
+ * Create a new folder at IxNetwork TCL server machine, e.g. ``c:\ixia_results``
+ * Modify sharing options of ``ixia_results`` folder to share it with everybody
+ * Create a new directory at DUT, where shared directory with results
+ will be mounted, e.g. ``/mnt/ixia_results``
+ * Update your custom VSPERF configuration file as follows:
+
+ .. code-block:: python
+
+ TRAFFICGEN_IXNET_TESTER_RESULT_DIR = 'c:/ixia_results'
+ TRAFFICGEN_IXNET_DUT_RESULT_DIR = '/mnt/ixia_results'
+
+ Note: It is essential to use slashes '/' also in path
+ configured by ``TRAFFICGEN_IXNET_TESTER_RESULT_DIR`` parameter.
+ * Install cifs-utils package.
+
+ e.g. at rpm based Linux distribution:
+
+ .. code-block:: console
+
+ yum install cifs-utils
+
+ * Mount shared directory, so VSPERF can access test results.
+
+ e.g. by adding new record into ``/etc/fstab``
+
+ .. code-block:: console
+
+ mount -t cifs //_TCL_SERVER_IP_OR_FQDN_/ixia_results /mnt/ixia_results
+ -o file_mode=0777,dir_mode=0777,nounix
+
+It is recommended to verify, that any new file inserted into ``c:/ixia_results`` folder
+is visible at DUT inside ``/mnt/ixia_results`` directory.
+
Spirent Setup
-------------
@@ -291,6 +373,25 @@ set to allow for proper connections to the chassis.
TRAFFICGEN_XENA_MODULE1 = ''
TRAFFICGEN_XENA_MODULE2 = ''
+RFC2544 Throughput Testing
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Xena traffic generator testing for rfc2544 throughput can be modified for
+different behaviors if needed. The default options for the following are
+optimized for best results.
+
+.. code-block:: console
+
+ TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE = '10.0'
+ TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE = '0.1'
+ TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE = '100.0'
+ TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
+ TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
+ TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+
+Each value modifies the behavior of rfc 2544 throughput testing. Refer to your
+Xena documentation to understand the behavior changes in modifying these
+values.
MoonGen
-------
@@ -303,6 +404,8 @@ can be found here:
https://github.com/emmericp/MoonGen
+* Note: Today, MoonGen with VSPERF only supports 10Gbps line speeds.
+
For VSPerf use, MoonGen should be cloned from here (as opposed to the afore
mentioned GitHub):
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/release/NEWS.rst b/docs/release/NEWS.rst
index 19ad3240..47ede0a3 100644
--- a/docs/release/NEWS.rst
+++ b/docs/release/NEWS.rst
@@ -4,9 +4,18 @@
OPNFV Colorado Release
======================
+* Support for DPDK v16.07
+* Support for yardstick testing framework
+* Support for stp/rstp configuration
+* Support for veth ports and network namespaces
+* Support for multi-queue usage by testpmd loopback app
+* Support for reporting of test execution length
+* Support for MoonGen traffic generator.
* Support for OVS version 2.5 + DPDK 2.2.
* Support for DPDK v16.04
* Support for Xena traffic generator.
+* Support for Red Hat Enterprise Linux
+* Support for mode of operation (trafficgen, trafficgen-off)
* Support for Integration tests for OVS with DPDK including:
* Physical ports.
* Virtual ports (vhost user and vhost cuse).
diff --git a/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.txt b/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.txt
new file mode 100644
index 00000000..7fb0562b
--- /dev/null
+++ b/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.txt
@@ -0,0 +1,1232 @@
+
+
+
+
+Network Working Group M. Tahhan
+Internet-Draft B. O'Mahony
+Intended status: Informational Intel
+Expires: January 9, 2017 A. Morton
+ AT&T Labs
+ July 8, 2016
+
+
+ Benchmarking Virtual Switches in OPNFV
+ draft-ietf-bmwg-vswitch-opnfv-00
+
+Abstract
+
+ This memo describes the progress of the Open Platform for NFV (OPNFV)
+ project on virtual switch performance "VSWITCHPERF". This project
+ intends to build on the current and completed work of the
+ Benchmarking Methodology Working Group in IETF, by referencing
+ existing literature. The Benchmarking Methodology Working Group has
+ traditionally conducted laboratory characterization of dedicated
+ physical implementations of internetworking functions. Therefore,
+ this memo begins to describe the additional considerations when
+ virtual switches are implemented in general-purpose hardware. The
+ expanded tests and benchmarks are also influenced by the OPNFV
+ mission to support virtualization of the "telco" infrastructure.
+
+Requirements Language
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in RFC 2119 [RFC2119].
+
+Status of This Memo
+
+ This Internet-Draft is submitted in full conformance with the
+ provisions of BCP 78 and BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF). Note that other groups may also distribute
+ working documents as Internet-Drafts. The list of current Internet-
+ Drafts is at http://datatracker.ietf.org/drafts/current/.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ This Internet-Draft will expire on January 9, 2017.
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 1]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+Copyright Notice
+
+ Copyright (c) 2016 IETF Trust and the persons identified as the
+ document authors. All rights reserved.
+
+ This document is subject to BCP 78 and the IETF Trust's Legal
+ Provisions Relating to IETF Documents
+ (http://trustee.ietf.org/license-info) in effect on the date of
+ publication of this document. Please review these documents
+ carefully, as they describe your rights and restrictions with respect
+ to this document. Code Components extracted from this document must
+ include Simplified BSD License text as described in Section 4.e of
+ the Trust Legal Provisions and are provided without warranty as
+ described in the Simplified BSD License.
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
+ 2. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
+ 3. Benchmarking Considerations . . . . . . . . . . . . . . . . . 4
+ 3.1. Comparison with Physical Network Functions . . . . . . . 4
+ 3.2. Continued Emphasis on Black-Box Benchmarks . . . . . . . 4
+ 3.3. New Configuration Parameters . . . . . . . . . . . . . . 4
+ 3.4. Flow classification . . . . . . . . . . . . . . . . . . . 6
+ 3.5. Benchmarks using Baselines with Resource Isolation . . . 7
+ 4. VSWITCHPERF Specification Summary . . . . . . . . . . . . . . 8
+ 5. 3x3 Matrix Coverage . . . . . . . . . . . . . . . . . . . . . 16
+ 5.1. Speed of Activation . . . . . . . . . . . . . . . . . . . 17
+ 5.2. Accuracy of Activation section . . . . . . . . . . . . . 17
+ 5.3. Reliability of Activation . . . . . . . . . . . . . . . . 17
+ 5.4. Scale of Activation . . . . . . . . . . . . . . . . . . . 17
+ 5.5. Speed of Operation . . . . . . . . . . . . . . . . . . . 17
+ 5.6. Accuracy of Operation . . . . . . . . . . . . . . . . . . 17
+ 5.7. Reliability of Operation . . . . . . . . . . . . . . . . 17
+ 5.8. Scalability of Operation . . . . . . . . . . . . . . . . 18
+ 5.9. Summary . . . . . . . . . . . . . . . . . . . . . . . . . 18
+ 6. Security Considerations . . . . . . . . . . . . . . . . . . . 18
+ 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19
+ 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19
+ 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 19
+ 9.1. Normative References . . . . . . . . . . . . . . . . . . 19
+ 9.2. Informative References . . . . . . . . . . . . . . . . . 21
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 2]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+1. Introduction
+
+ Benchmarking Methodology Working Group (BMWG) has traditionally
+ conducted laboratory characterization of dedicated physical
+ implementations of internetworking functions. The Black-box
+ Benchmarks of Throughput, Latency, Forwarding Rates and others have
+ served our industry for many years. Now, Network Function
+ Virtualization (NFV) has the goal to transform how internetwork
+ functions are implemented, and therefore has garnered much attention.
+
+ This memo summarizes the progress of the Open Platform for NFV
+ (OPNFV) project on virtual switch performance characterization,
+ "VSWITCHPERF", through the Brahmaputra (second) release [BrahRel].
+ This project intends to build on the current and completed work of
+ the Benchmarking Methodology Working Group in IETF, by referencing
+ existing literature. For example, currently the most often
+ referenced RFC is [RFC2544] (which depends on [RFC1242]) and
+ foundation of the benchmarking work in OPNFV is common and strong.
+
+ See https://wiki.opnfv.org/
+ characterize_vswitch_performance_for_telco_nfv_use_cases for more
+ background, and the OPNFV website for general information:
+ https://www.opnfv.org/
+
+ The authors note that OPNFV distinguishes itself from other open
+ source compute and networking projects through its emphasis on
+ existing "telco" services as opposed to cloud-computing. There are
+ many ways in which telco requirements have different emphasis on
+ performance dimensions when compared to cloud computing: support for
+ and transfer of isochronous media streams is one example.
+
+ Note also that the move to NFV Infrastructure has resulted in many
+ new benchmarking initiatives across the industry. The authors are
+ currently doing their best to maintain alignment with many other
+ projects, and this Internet Draft is one part of the efforts. We
+ acknowledge the early work in
+ [I-D.huang-bmwg-virtual-network-performance], and useful discussion
+ with the authors.
+
+2. Scope
+
+ The primary purpose and scope of the memo is to inform the industry
+ of work-in-progress that builds on the body of extensive BMWG
+ literature and experience, and describe the extensions needed for
+ benchmarking virtual switches. Inital feedback indicates that many
+ of these extensions may be applicable beyond the current scope (to
+ hardware switches in the NFV Infrastructure and to virtual routers,
+ for example). Additionally, this memo serves as a vehicle to include
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 3]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ more detail and commentary from BMWG and other Open Source
+ communities, under BMWG's chartered work to characterize the NFV
+ Infrastructure (a virtual switch is an important aspect of that
+ infrastructure).
+
+3. Benchmarking Considerations
+
+ This section highlights some specific considerations (from
+ [I-D.ietf-bmwg-virtual-net])related to Benchmarks for virtual
+ switches. The OPNFV project is sharing its present view on these
+ areas, as they develop their specifications in the Level Test Design
+ (LTD) document.
+
+3.1. Comparison with Physical Network Functions
+
+ To compare the performance of virtual designs and implementations
+ with their physical counterparts, identical benchmarks are needed.
+ BMWG has developed specifications for many network functions this
+ memo re-uses existing benchmarks through references, and expands them
+ during development of new methods. A key configuration aspect is the
+ number of parallel cores required to achieve comparable performance
+ with a given physical device, or whether some limit of scale was
+ reached before the cores could achieve the comparable level.
+
+ It's unlikely that the virtual switch will be the only application
+ running on the SUT, so CPU utilization, Cache utilization, and Memory
+ footprint should also be recorded for the virtual implementations of
+ internetworking functions.
+
+3.2. Continued Emphasis on Black-Box Benchmarks
+
+ External observations remain essential as the basis for Benchmarks.
+ Internal observations with fixed specification and interpretation
+ will be provided in parallel to assist the development of operations
+ procedures when the technology is deployed.
+
+3.3. New Configuration Parameters
+
+ A key consideration when conducting any sort of benchmark is trying
+ to ensure the consistency and repeatability of test results. When
+ benchmarking the performance of a vSwitch there are many factors that
+ can affect the consistency of results, one key factor is matching the
+ various hardware and software details of the SUT. This section lists
+ some of the many new parameters which this project believes are
+ critical to report in order to achieve repeatability.
+
+ Hardware details including:
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 4]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ o Platform details
+
+ o Processor details
+
+ o Memory information (type and size)
+
+ o Number of enabled cores
+
+ o Number of cores used for the test
+
+ o Number of physical NICs, as well as their details (manufacturer,
+ versions, type and the PCI slot they are plugged into)
+
+ o NIC interrupt configuration
+
+ o BIOS version, release date and any configurations that were
+ modified
+
+ o CPU microcode level
+
+ o Memory DIMM configurations (quad rank performance may not be the
+ same as dual rank) in size, freq and slot locations
+
+ o PCI configuration parameters (payload size, early ack option...)
+
+ o Power management at all levels (ACPI sleep states, processor
+ package, OS...)
+
+ Software details including:
+
+ o OS parameters and behavior (text vs graphical no one typing at the
+ console on one system)
+
+ o OS version (for host and VNF)
+
+ o Kernel version (for host and VNF)
+
+ o GRUB boot parameters (for host and VNF)
+
+ o Hypervisor details (Type and version)
+
+ o Selected vSwitch, version number or commit id used
+
+ o vSwitch launch command line if it has been parameterised
+
+ o Memory allocation to the vSwitch
+
+ o which NUMA node it is using, and how many memory channels
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 5]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ o DPDK or any other SW dependency version number or commit id used
+
+ o Memory allocation to a VM - if it's from Hugpages/elsewhere
+
+ o VM storage type: snapshot/independent persistent/independent non-
+ persistent
+
+ o Number of VMs
+
+ o Number of Virtual NICs (vNICs), versions, type and driver
+
+ o Number of virtual CPUs and their core affinity on the host
+
+ o Number vNIC interrupt configuration
+
+ o Thread affinitization for the applications (including the vSwitch
+ itself) on the host
+
+ o Details of Resource isolation, such as CPUs designated for Host/
+ Kernel (isolcpu) and CPUs designated for specific processes
+ (taskset). - Test duration. - Number of flows.
+
+ Test Traffic Information:
+
+ o Traffic type - UDP, TCP, IMIX / Other
+
+ o Packet Sizes
+
+ o Deployment Scenario
+
+3.4. Flow classification
+
+ Virtual switches group packets into flows by processing and matching
+ particular packet or frame header information, or by matching packets
+ based on the input ports. Thus a flow can be thought of a sequence
+ of packets that have the same set of header field values (5-tuple) or
+ have arrived on the same port. Performance results can vary based on
+ the parameters the vSwitch uses to match for a flow. The recommended
+ flow classification parameters for any vSwitch performance tests are:
+ the input port, the source IP address, the destination IP address and
+ the Ethernet protocol type field. It is essential to increase the
+ flow timeout time on a vSwitch before conducting any performance
+ tests that do not measure the flow setup time. Normally the first
+ packet of a particular stream will install the flow in the virtual
+ switch which adds an additional latency, subsequent packets of the
+ same flow are not subject to this latency if the flow is already
+ installed on the vSwitch.
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 6]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+3.5. Benchmarks using Baselines with Resource Isolation
+
+ This outline describes measurement of baseline with isolated
+ resources at a high level, which is the intended approach at this
+ time.
+
+ 1. Baselines:
+
+ * Optional: Benchmark platform forwarding capability without a
+ vswitch or VNF for at least 72 hours (serves as a means of
+ platform validation and a means to obtain the base performance
+ for the platform in terms of its maximum forwarding rate and
+ latency).
+
+ Benchmark platform forwarding capability
+
+ __
+ +--------------------------------------------------+ |
+ | +------------------------------------------+ | |
+ | | | | |
+ | | Simple Forwarding App | | Host
+ | | | | |
+ | +------------------------------------------+ | |
+ | | NIC | | |
+ +---+------------------------------------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+ * Benchmark VNF forwarding capability with direct connectivity
+ (vSwitch bypass, e.g., SR/IOV) for at least 72 hours (serves
+ as a means of VNF validation and a means to obtain the base
+ performance for the VNF in terms of its maximum forwarding
+ rate and latency). The metrics gathered from this test will
+ serve as a key comparison point for vSwitch bypass
+ technologies performance and vSwitch performance.
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 7]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ Benchmark VNF forwarding capability
+
+ __
+ +--------------------------------------------------+ |
+ | +------------------------------------------+ | |
+ | | | | |
+ | | VNF | | |
+ | | | | |
+ | +------------------------------------------+ | |
+ | | Passthrough/SR-IOV | | Host
+ | +------------------------------------------+ | |
+ | | NIC | | |
+ +---+------------------------------------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+ * Benchmarking with isolated resources alone, with other
+ resources (both HW&SW) disabled Example, vSw and VM are SUT
+
+ * Benchmarking with isolated resources alone, leaving some
+ resources unused
+
+ * Benchmark with isolated resources and all resources occupied
+
+ 2. Next Steps
+
+ * Limited sharing
+
+ * Production scenarios
+
+ * Stressful scenarios
+
+4. VSWITCHPERF Specification Summary
+
+ The overall specification in preparation is referred to as a Level
+ Test Design (LTD) document, which will contain a suite of performance
+ tests. The base performance tests in the LTD are based on the pre-
+ existing specifications developed by BMWG to test the performance of
+ physical switches. These specifications include:
+
+ o [RFC2544] Benchmarking Methodology for Network Interconnect
+ Devices
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 8]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ o [RFC2889] Benchmarking Methodology for LAN Switching
+
+ o [RFC6201] Device Reset Characterization
+
+ o [RFC5481] Packet Delay Variation Applicability Statement
+
+ Some of the above/newer RFCs are being applied in benchmarking for
+ the first time, and represent a development challenge for test
+ equipment developers. Fortunately, many members of the testing
+ system community have engaged on the VSPERF project, including an
+ open source test system.
+
+ In addition to this, the LTD also re-uses the terminology defined by:
+
+ o [RFC2285] Benchmarking Terminology for LAN Switching Devices
+
+ o [RFC5481] Packet Delay Variation Applicability Statement
+
+ Specifications to be included in future updates of the LTD include:
+
+ o [RFC3918] Methodology for IP Multicast Benchmarking
+
+ o [RFC4737] Packet Reordering Metrics
+
+ As one might expect, the most fundamental internetworking
+ characteristics of Throughput and Latency remain important when the
+ switch is virtualized, and these benchmarks figure prominently in the
+ specification.
+
+ When considering characteristics important to "telco" network
+ functions, we must begin to consider additional performance metrics.
+ In this case, the project specifications have referenced metrics from
+ the IETF IP Performance Metrics (IPPM) literature. This means that
+ the [RFC2544] test of Latency is replaced by measurement of a metric
+ derived from IPPM's [RFC2679], where a set of statistical summaries
+ will be provided (mean, max, min, etc.). Further metrics planned to
+ be benchmarked include packet delay variation as defined by [RFC5481]
+ , reordering, burst behaviour, DUT availability, DUT capacity and
+ packet loss in long term testing at Throughput level, where some low-
+ level of background loss may be present and characterized.
+
+ Tests have been (or will be) designed to collect the metrics below:
+
+ o Throughput Tests to measure the maximum forwarding rate (in frames
+ per second or fps) and bit rate (in Mbps) for a constant load (as
+ defined by [RFC1242]) without traffic loss.
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 9]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ o Packet and Frame Delay Distribution Tests to measure average, min
+ and max packet and frame delay for constant loads.
+
+ o Packet Delay Tests to understand latency distribution for
+ different packet sizes and over an extended test run to uncover
+ outliers.
+
+ o Scalability Tests to understand how the virtual switch performs as
+ the number of flows, active ports, complexity of the forwarding
+ logic's configuration... it has to deal with increases.
+
+ o Stream Performance Tests (TCP, UDP) to measure bulk data transfer
+ performance, i.e. how fast systems can send and receive data
+ through the switch.
+
+ o Control Path and Datapath Coupling Tests, to understand how
+ closely coupled the datapath and the control path are as well as
+ the effect of this coupling on the performance of the DUT
+ (example: delay of the initial packet of a flow).
+
+ o CPU and Memory Consumption Tests to understand the virtual
+ switch's footprint on the system, usually conducted as auxiliary
+ measurements with benchmarks above. They include: CPU
+ utilization, Cache utilization and Memory footprint.
+
+ o The so-called "Soak" tests, where the selected test is conducted
+ over a long period of time (with an ideal duration of 24 hours,
+ and at least 6 hours). The purpose of soak tests is to capture
+ transient changes in performance which may occur due to infrequent
+ processes or the low probability coincidence of two or more
+ processes. The performance must be evaluated periodically during
+ continuous testing, and this results in use of [RFC2889] Frame
+ Rate metrics instead of [RFC2544] Throughput (which requires
+ stopping traffic to allow time for all traffic to exit internal
+ queues).
+
+ Future/planned test specs include:
+
+ o Request/Response Performance Tests (TCP, UDP) which measure the
+ transaction rate through the switch.
+
+ o Noisy Neighbour Tests, to understand the effects of resource
+ sharing on the performance of a virtual switch.
+
+ o Tests derived from examination of ETSI NFV Draft GS IFA003
+ requirements [IFA003] on characterization of acceleration
+ technologies applied to vswitches.
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 10]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ The flexibility of deployment of a virtual switch within a network
+ means that the BMWG IETF existing literature needs to be used to
+ characterize the performance of a switch in various deployment
+ scenarios. The deployment scenarios under consideration include:
+
+ Physical port to virtual switch to physical port
+
+ __
+ +--------------------------------------------------+ |
+ | +--------------------+ | |
+ | | | | |
+ | | v | | Host
+ | +--------------+ +--------------+ | |
+ | | phy port | vSwitch | phy port | | |
+ +---+--------------+------------+--------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 11]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ Physical port to virtual switch to VNF to virtual switch to physical
+ port
+
+ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | ^ : | |
+ | | | | | Guest
+ | : v | |
+ | +---------------+ +---------------+ | |
+ | | logical port 0| | logical port 1| | |
+ +---+---------------+-----------+---------------+---+ __|
+ ^ :
+ | |
+ : v __
+ +---+---------------+----------+---------------+---+ |
+ | | logical port 0| | logical port 1| | |
+ | +---------------+ +---------------+ | |
+ | ^ : | |
+ | | | | | Host
+ | : v | |
+ | +--------------+ +--------------+ | |
+ | | phy port | vSwitch | phy port | | |
+ +---+--------------+------------+--------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 12]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ Physical port to virtual switch to VNF to virtual switch to VNF to
+ virtual switch to physical port
+
+ __
+ +----------------------+ +----------------------+ |
+ | Guest 1 | | Guest 2 | |
+ | +---------------+ | | +---------------+ | |
+ | | Application | | | | Application | | |
+ | +---------------+ | | +---------------+ | |
+ | ^ | | | ^ | | |
+ | | v | | | v | | Guests
+ | +---------------+ | | +---------------+ | |
+ | | logical ports | | | | logical ports | | |
+ | | 0 1 | | | | 0 1 | | |
+ +---+---------------+--+ +---+---------------+--+__|
+ ^ : ^ :
+ | | | |
+ : v : v _
+ +---+---------------+---------+---------------+--+ |
+ | | 0 1 | | 3 4 | | |
+ | | logical ports | | logical ports | | |
+ | +---------------+ +---------------+ | |
+ | ^ | ^ | | | Host
+ | | |-----------------| v | |
+ | +--------------+ +--------------+ | |
+ | | phy ports | vSwitch | phy ports | | |
+ +---+--------------+----------+--------------+---+_|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 13]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ Physical port to virtual switch to VNF
+
+ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | ^ | |
+ | | | | Guest
+ | : | |
+ | +---------------+ | |
+ | | logical port 0| | |
+ +---+---------------+-------------------------------+ __|
+ ^
+ |
+ : __
+ +---+---------------+------------------------------+ |
+ | | logical port 0| | |
+ | +---------------+ | |
+ | ^ | |
+ | | | | Host
+ | : | |
+ | +--------------+ | |
+ | | phy port | vSwitch | |
+ +---+--------------+------------ -------------- ---+ __|
+ ^
+ |
+ :
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 14]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ VNF to virtual switch to physical port
+
+ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | : | |
+ | | | | Guest
+ | v | |
+ | +---------------+ | |
+ | | logical port | | |
+ +-------------------------------+---------------+---+ __|
+ :
+ |
+ v __
+ +------------------------------+---------------+---+ |
+ | | logical port | | |
+ | +---------------+ | |
+ | : | |
+ | | | | Host
+ | v | |
+ | +--------------+ | |
+ | vSwitch | phy port | | |
+ +-------------------------------+--------------+---+ __|
+ :
+ |
+ v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 15]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ VNF to virtual switch to VNF
+
+ __
+ +----------------------+ +----------------------+ |
+ | Guest 1 | | Guest 2 | |
+ | +---------------+ | | +---------------+ | |
+ | | Application | | | | Application | | |
+ | +---------------+ | | +---------------+ | |
+ | | | | ^ | |
+ | v | | | | | Guests
+ | +---------------+ | | +---------------+ | |
+ | | logical ports | | | | logical ports | | |
+ | | 0 | | | | 0 | | |
+ +---+---------------+--+ +---+---------------+--+__|
+ : ^
+ | |
+ v : _
+ +---+---------------+---------+---------------+--+ |
+ | | 1 | | 1 | | |
+ | | logical ports | | logical ports | | |
+ | +---------------+ +---------------+ | |
+ | | ^ | | Host
+ | L-----------------+ | |
+ | | |
+ | vSwitch | |
+ +------------------------------------------------+_|
+
+ A set of Deployment Scenario figures is available on the VSPERF Test
+ Methodology Wiki page [TestTopo].
+
+5. 3x3 Matrix Coverage
+
+ This section organizes the many existing test specifications into the
+ "3x3" matrix (introduced in [I-D.ietf-bmwg-virtual-net]). Because
+ the LTD specification ID names are quite long, this section is
+ organized into lists for each occupied cell of the matrix (not all
+ are occupied, also the matrix has grown to 3x4 to accommodate scale
+ metrics when displaying the coverage of many metrics/benchmarks).
+ The current version of the LTD specification is available [LTD].
+
+ The tests listed below assess the activation of paths in the data
+ plane, rather than the control plane.
+
+ A complete list of tests with short summaries is available on the
+ VSPERF "LTD Test Spec Overview" Wiki page [LTDoverV].
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 16]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+5.1. Speed of Activation
+
+ o Activation.RFC2889.AddressLearningRate
+
+ o PacketLatency.InitialPacketProcessingLatency
+
+5.2. Accuracy of Activation section
+
+ o CPDP.Coupling.Flow.Addition
+
+5.3. Reliability of Activation
+
+ o Throughput.RFC2544.SystemRecoveryTime
+
+ o Throughput.RFC2544.ResetTime
+
+5.4. Scale of Activation
+
+ o Activation.RFC2889.AddressCachingCapacity
+
+5.5. Speed of Operation
+
+ o Throughput.RFC2544.PacketLossRate
+
+ o CPU.RFC2544.0PacketLoss
+
+ o Throughput.RFC2544.PacketLossRateFrameModification
+
+ o Throughput.RFC2544.BackToBackFrames
+
+ o Throughput.RFC2889.MaxForwardingRate
+
+ o Throughput.RFC2889.ForwardPressure
+
+ o Throughput.RFC2889.BroadcastFrameForwarding
+
+5.6. Accuracy of Operation
+
+ o Throughput.RFC2889.ErrorFramesFiltering
+
+ o Throughput.RFC2544.Profile
+
+5.7. Reliability of Operation
+
+ o Throughput.RFC2889.Soak
+
+ o Throughput.RFC2889.SoakFrameModification
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 17]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ o PacketDelayVariation.RFC3393.Soak
+
+5.8. Scalability of Operation
+
+ o Scalability.RFC2544.0PacketLoss
+
+ o MemoryBandwidth.RFC2544.0PacketLoss.Scalability
+
+5.9. Summary
+
+|------------------------------------------------------------------------|
+| | | | | |
+| | SPEED | ACCURACY | RELIABILITY | SCALE |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| Activation | X | X | X | X |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| Operation | X | X | X | X |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| De-activation | | | | |
+| | | | | |
+|------------------------------------------------------------------------|
+
+6. Security Considerations
+
+ Benchmarking activities as described in this memo are limited to
+ technology characterization of a Device Under Test/System Under Test
+ (DUT/SUT) using controlled stimuli in a laboratory environment, with
+ dedicated address space and the constraints specified in the sections
+ above.
+
+ The benchmarking network topology will be an independent test setup
+ and MUST NOT be connected to devices that may forward the test
+ traffic into a production network, or misroute traffic to the test
+ management network.
+
+ Further, benchmarking is performed on a "black-box" basis, relying
+ solely on measurements observable external to the DUT/SUT.
+
+ Special capabilities SHOULD NOT exist in the DUT/SUT specifically for
+ benchmarking purposes. Any implications for network security arising
+ from the DUT/SUT SHOULD be identical in the lab and in production
+ networks.
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 18]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+7. IANA Considerations
+
+ No IANA Action is requested at this time.
+
+8. Acknowledgements
+
+ The authors appreciate and acknowledge comments from Scott Bradner,
+ Marius Georgescu, Ramki Krishnan, Doug Montgomery, Martin Klozik,
+ Christian Trautman, and others for their reviews.
+
+9. References
+
+9.1. Normative References
+
+ [NFV.PER001]
+ "Network Function Virtualization: Performance and
+ Portability Best Practices", Group Specification ETSI GS
+ NFV-PER 001 V1.1.1 (2014-06), June 2014.
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119,
+ DOI 10.17487/RFC2119, March 1997,
+ <http://www.rfc-editor.org/info/rfc2119>.
+
+ [RFC2285] Mandeville, R., "Benchmarking Terminology for LAN
+ Switching Devices", RFC 2285, DOI 10.17487/RFC2285,
+ February 1998, <http://www.rfc-editor.org/info/rfc2285>.
+
+ [RFC2330] Paxson, V., Almes, G., Mahdavi, J., and M. Mathis,
+ "Framework for IP Performance Metrics", RFC 2330,
+ DOI 10.17487/RFC2330, May 1998,
+ <http://www.rfc-editor.org/info/rfc2330>.
+
+ [RFC2544] Bradner, S. and J. McQuaid, "Benchmarking Methodology for
+ Network Interconnect Devices", RFC 2544,
+ DOI 10.17487/RFC2544, March 1999,
+ <http://www.rfc-editor.org/info/rfc2544>.
+
+ [RFC2679] Almes, G., Kalidindi, S., and M. Zekauskas, "A One-way
+ Delay Metric for IPPM", RFC 2679, DOI 10.17487/RFC2679,
+ September 1999, <http://www.rfc-editor.org/info/rfc2679>.
+
+ [RFC2680] Almes, G., Kalidindi, S., and M. Zekauskas, "A One-way
+ Packet Loss Metric for IPPM", RFC 2680,
+ DOI 10.17487/RFC2680, September 1999,
+ <http://www.rfc-editor.org/info/rfc2680>.
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 19]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ [RFC2681] Almes, G., Kalidindi, S., and M. Zekauskas, "A Round-trip
+ Delay Metric for IPPM", RFC 2681, DOI 10.17487/RFC2681,
+ September 1999, <http://www.rfc-editor.org/info/rfc2681>.
+
+ [RFC2889] Mandeville, R. and J. Perser, "Benchmarking Methodology
+ for LAN Switching Devices", RFC 2889,
+ DOI 10.17487/RFC2889, August 2000,
+ <http://www.rfc-editor.org/info/rfc2889>.
+
+ [RFC3393] Demichelis, C. and P. Chimento, "IP Packet Delay Variation
+ Metric for IP Performance Metrics (IPPM)", RFC 3393,
+ DOI 10.17487/RFC3393, November 2002,
+ <http://www.rfc-editor.org/info/rfc3393>.
+
+ [RFC3432] Raisanen, V., Grotefeld, G., and A. Morton, "Network
+ performance measurement with periodic streams", RFC 3432,
+ DOI 10.17487/RFC3432, November 2002,
+ <http://www.rfc-editor.org/info/rfc3432>.
+
+ [RFC3918] Stopp, D. and B. Hickman, "Methodology for IP Multicast
+ Benchmarking", RFC 3918, DOI 10.17487/RFC3918, October
+ 2004, <http://www.rfc-editor.org/info/rfc3918>.
+
+ [RFC4689] Poretsky, S., Perser, J., Erramilli, S., and S. Khurana,
+ "Terminology for Benchmarking Network-layer Traffic
+ Control Mechanisms", RFC 4689, DOI 10.17487/RFC4689,
+ October 2006, <http://www.rfc-editor.org/info/rfc4689>.
+
+ [RFC4737] Morton, A., Ciavattone, L., Ramachandran, G., Shalunov,
+ S., and J. Perser, "Packet Reordering Metrics", RFC 4737,
+ DOI 10.17487/RFC4737, November 2006,
+ <http://www.rfc-editor.org/info/rfc4737>.
+
+ [RFC5357] Hedayat, K., Krzanowski, R., Morton, A., Yum, K., and J.
+ Babiarz, "A Two-Way Active Measurement Protocol (TWAMP)",
+ RFC 5357, DOI 10.17487/RFC5357, October 2008,
+ <http://www.rfc-editor.org/info/rfc5357>.
+
+ [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch,
+ "Network Time Protocol Version 4: Protocol and Algorithms
+ Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010,
+ <http://www.rfc-editor.org/info/rfc5905>.
+
+ [RFC6201] Asati, R., Pignataro, C., Calabria, F., and C. Olvera,
+ "Device Reset Characterization", RFC 6201,
+ DOI 10.17487/RFC6201, March 2011,
+ <http://www.rfc-editor.org/info/rfc6201>.
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 20]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+9.2. Informative References
+
+ [BrahRel] "Brahmaputra, Second OPNFV Release https://www.opnfv.org/
+ brahmaputra".
+
+ [I-D.huang-bmwg-virtual-network-performance]
+ Huang, L., Rong, G., Mandeville, B., and B. Hickman,
+ "Benchmarking Methodology for Virtualization Network
+ Performance", draft-huang-bmwg-virtual-network-
+ performance-01 (work in progress), April 2015.
+
+ [I-D.ietf-bmwg-virtual-net]
+ Morton, A., "Considerations for Benchmarking Virtual
+ Network Functions and Their Infrastructure", draft-ietf-
+ bmwg-virtual-net-03 (work in progress), June 2016.
+
+ [IFA003] "https://docbox.etsi.org/ISG/NFV/Open/Drafts/
+ IFA003_Acceleration_-_vSwitch_Spec/".
+
+ [LTD] "LTD Test Specification
+ http://artifacts.opnfv.org/vswitchperf/docs/requirements/
+ index.html".
+
+ [LTDoverV]
+ "LTD Test Spec Overview https://wiki.opnfv.org/wiki/
+ vswitchperf_test_spec_review".
+
+ [RFC1242] Bradner, S., "Benchmarking Terminology for Network
+ Interconnection Devices", RFC 1242, DOI 10.17487/RFC1242,
+ July 1991, <http://www.rfc-editor.org/info/rfc1242>.
+
+ [RFC5481] Morton, A. and B. Claise, "Packet Delay Variation
+ Applicability Statement", RFC 5481, DOI 10.17487/RFC5481,
+ March 2009, <http://www.rfc-editor.org/info/rfc5481>.
+
+ [RFC6049] Morton, A. and E. Stephan, "Spatial Composition of
+ Metrics", RFC 6049, DOI 10.17487/RFC6049, January 2011,
+ <http://www.rfc-editor.org/info/rfc6049>.
+
+ [RFC6248] Morton, A., "RFC 4148 and the IP Performance Metrics
+ (IPPM) Registry of Metrics Are Obsolete", RFC 6248,
+ DOI 10.17487/RFC6248, April 2011,
+ <http://www.rfc-editor.org/info/rfc6248>.
+
+ [RFC6390] Clark, A. and B. Claise, "Guidelines for Considering New
+ Performance Metric Development", BCP 170, RFC 6390,
+ DOI 10.17487/RFC6390, October 2011,
+ <http://www.rfc-editor.org/info/rfc6390>.
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 21]
+
+Internet-Draft Benchmarking vSwitches July 2016
+
+
+ [TestTopo]
+ "Test Topologies https://wiki.opnfv.org/vsperf/
+ test_methodology".
+
+Authors' Addresses
+
+ Maryam Tahhan
+ Intel
+
+ Email: maryam.tahhan@intel.com
+
+
+ Billy O'Mahony
+ Intel
+
+ Email: billy.o.mahony@intel.com
+
+
+ Al Morton
+ AT&T Labs
+ 200 Laurel Avenue South
+ Middletown,, NJ 07748
+ USA
+
+ Phone: +1 732 420 1571
+ Fax: +1 732 368 1192
+ Email: acmorton@att.com
+ URI: http://home.comcast.net/~acmacm/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tahhan, et al. Expires January 9, 2017 [Page 22]
diff --git a/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.xml b/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.xml
new file mode 100644
index 00000000..2259b23c
--- /dev/null
+++ b/docs/requirements/ietf_draft/draft-ietf-bmwg-vswitch-opnfv-00.xml
@@ -0,0 +1,1016 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
+<?rfc toc="yes"?>
+<?rfc tocompact="yes"?>
+<?rfc tocdepth="3"?>
+<?rfc tocindent="yes"?>
+<?rfc symrefs="yes"?>
+<?rfc sortrefs="yes"?>
+<?rfc comments="yes"?>
+<?rfc inline="yes"?>
+<?rfc compact="yes"?>
+<?rfc subcompact="no"?>
+<rfc category="info" docName="draft-ietf-bmwg-vswitch-opnfv-00"
+ ipr="trust200902">
+ <front>
+ <title abbrev="Benchmarking vSwitches">Benchmarking Virtual Switches in
+ OPNFV</title>
+
+ <author fullname="Maryam Tahhan" initials="M." surname="Tahhan">
+ <organization>Intel</organization>
+
+ <address>
+ <postal>
+ <street/>
+
+ <city/>
+
+ <region/>
+
+ <code/>
+
+ <country/>
+ </postal>
+
+ <phone/>
+
+ <facsimile/>
+
+ <email>maryam.tahhan@intel.com</email>
+
+ <uri/>
+ </address>
+ </author>
+
+ <author fullname="Billy O'Mahony" initials="B." surname="O'Mahony">
+ <organization>Intel</organization>
+
+ <address>
+ <postal>
+ <street/>
+
+ <city/>
+
+ <region/>
+
+ <code/>
+
+ <country/>
+ </postal>
+
+ <phone/>
+
+ <facsimile/>
+
+ <email>billy.o.mahony@intel.com</email>
+
+ <uri/>
+ </address>
+ </author>
+
+ <author fullname="Al Morton" initials="A." surname="Morton">
+ <organization>AT&amp;T Labs</organization>
+
+ <address>
+ <postal>
+ <street>200 Laurel Avenue South</street>
+
+ <city>Middletown,</city>
+
+ <region>NJ</region>
+
+ <code>07748</code>
+
+ <country>USA</country>
+ </postal>
+
+ <phone>+1 732 420 1571</phone>
+
+ <facsimile>+1 732 368 1192</facsimile>
+
+ <email>acmorton@att.com</email>
+
+ <uri>http://home.comcast.net/~acmacm/</uri>
+ </address>
+ </author>
+
+ <date day="8" month="July" year="2016"/>
+
+ <abstract>
+ <t>This memo describes the progress of the Open Platform for NFV (OPNFV)
+ project on virtual switch performance "VSWITCHPERF". This project
+ intends to build on the current and completed work of the Benchmarking
+ Methodology Working Group in IETF, by referencing existing literature.
+ The Benchmarking Methodology Working Group has traditionally conducted
+ laboratory characterization of dedicated physical implementations of
+ internetworking functions. Therefore, this memo begins to describe the
+ additional considerations when virtual switches are implemented in
+ general-purpose hardware. The expanded tests and benchmarks are also
+ influenced by the OPNFV mission to support virtualization of the "telco"
+ infrastructure.</t>
+ </abstract>
+
+ <note title="Requirements Language">
+ <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in <xref
+ target="RFC2119">RFC 2119</xref>.</t>
+
+ <t/>
+ </note>
+ </front>
+
+ <middle>
+ <section title="Introduction">
+ <t>Benchmarking Methodology Working Group (BMWG) has traditionally
+ conducted laboratory characterization of dedicated physical
+ implementations of internetworking functions. The Black-box Benchmarks
+ of Throughput, Latency, Forwarding Rates and others have served our
+ industry for many years. Now, Network Function Virtualization (NFV) has
+ the goal to transform how internetwork functions are implemented, and
+ therefore has garnered much attention.</t>
+
+ <t>This memo summarizes the progress of the Open Platform for NFV
+ (OPNFV) project on virtual switch performance characterization,
+ "VSWITCHPERF", through the Brahmaputra (second) release <xref
+ target="BrahRel"/>. This project intends to build on the current and
+ completed work of the Benchmarking Methodology Working Group in IETF, by
+ referencing existing literature. For example, currently the most often
+ referenced RFC is <xref target="RFC2544"/> (which depends on <xref
+ target="RFC1242"/>) and foundation of the benchmarking work in OPNFV is
+ common and strong.</t>
+
+ <t>See
+ https://wiki.opnfv.org/characterize_vswitch_performance_for_telco_nfv_use_cases
+ for more background, and the OPNFV website for general information:
+ https://www.opnfv.org/</t>
+
+ <t>The authors note that OPNFV distinguishes itself from other open
+ source compute and networking projects through its emphasis on existing
+ "telco" services as opposed to cloud-computing. There are many ways in
+ which telco requirements have different emphasis on performance
+ dimensions when compared to cloud computing: support for and transfer of
+ isochronous media streams is one example.</t>
+
+ <t>Note also that the move to NFV Infrastructure has resulted in many
+ new benchmarking initiatives across the industry. The authors are
+ currently doing their best to maintain alignment with many other
+ projects, and this Internet Draft is one part of the efforts. We
+ acknowledge the early work in <xref
+ target="I-D.huang-bmwg-virtual-network-performance"/>, and useful
+ discussion with the authors.</t>
+ </section>
+
+ <section title="Scope">
+ <t>The primary purpose and scope of the memo is to inform the industry
+ of work-in-progress that builds on the body of extensive BMWG literature
+ and experience, and describe the extensions needed for benchmarking
+ virtual switches. Inital feedback indicates that many of these
+ extensions may be applicable beyond the current scope (to hardware
+ switches in the NFV Infrastructure and to virtual routers, for example).
+ Additionally, this memo serves as a vehicle to include more detail and
+ commentary from BMWG and other Open Source communities, under BMWG's
+ chartered work to characterize the NFV Infrastructure (a virtual switch
+ is an important aspect of that infrastructure).</t>
+ </section>
+
+ <section title="Benchmarking Considerations">
+ <t>This section highlights some specific considerations (from <xref
+ target="I-D.ietf-bmwg-virtual-net"/>)related to Benchmarks for virtual
+ switches. The OPNFV project is sharing its present view on these areas,
+ as they develop their specifications in the Level Test Design (LTD)
+ document.</t>
+
+ <section title="Comparison with Physical Network Functions">
+ <t>To compare the performance of virtual designs and implementations
+ with their physical counterparts, identical benchmarks are needed.
+ BMWG has developed specifications for many network functions this memo
+ re-uses existing benchmarks through references, and expands them
+ during development of new methods. A key configuration aspect is the
+ number of parallel cores required to achieve comparable performance
+ with a given physical device, or whether some limit of scale was
+ reached before the cores could achieve the comparable level.</t>
+
+ <t>It's unlikely that the virtual switch will be the only application
+ running on the SUT, so CPU utilization, Cache utilization, and Memory
+ footprint should also be recorded for the virtual implementations of
+ internetworking functions.</t>
+ </section>
+
+ <section title="Continued Emphasis on Black-Box Benchmarks">
+ <t>External observations remain essential as the basis for Benchmarks.
+ Internal observations with fixed specification and interpretation will
+ be provided in parallel to assist the development of operations
+ procedures when the technology is deployed.</t>
+ </section>
+
+ <section title="New Configuration Parameters">
+ <t>A key consideration when conducting any sort of benchmark is trying
+ to ensure the consistency and repeatability of test results. When
+ benchmarking the performance of a vSwitch there are many factors that
+ can affect the consistency of results, one key factor is matching the
+ various hardware and software details of the SUT. This section lists
+ some of the many new parameters which this project believes are
+ critical to report in order to achieve repeatability.</t>
+
+ <t>Hardware details including:</t>
+
+ <t><list style="symbols">
+ <t>Platform details</t>
+
+ <t>Processor details</t>
+
+ <t>Memory information (type and size)</t>
+
+ <t>Number of enabled cores</t>
+
+ <t>Number of cores used for the test</t>
+
+ <t>Number of physical NICs, as well as their details
+ (manufacturer, versions, type and the PCI slot they are plugged
+ into)</t>
+
+ <t>NIC interrupt configuration</t>
+
+ <t>BIOS version, release date and any configurations that were
+ modified</t>
+
+ <t>CPU microcode level</t>
+
+ <t>Memory DIMM configurations (quad rank performance may not be
+ the same as dual rank) in size, freq and slot locations</t>
+
+ <t>PCI configuration parameters (payload size, early ack
+ option...)</t>
+
+ <t>Power management at all levels (ACPI sleep states, processor
+ package, OS...)</t>
+ </list>Software details including:</t>
+
+ <t><list style="symbols">
+ <t>OS parameters and behavior (text vs graphical no one typing at
+ the console on one system)</t>
+
+ <t>OS version (for host and VNF)</t>
+
+ <t>Kernel version (for host and VNF)</t>
+
+ <t>GRUB boot parameters (for host and VNF)</t>
+
+ <t>Hypervisor details (Type and version)</t>
+
+ <t>Selected vSwitch, version number or commit id used</t>
+
+ <t>vSwitch launch command line if it has been parameterised</t>
+
+ <t>Memory allocation to the vSwitch</t>
+
+ <t>which NUMA node it is using, and how many memory channels</t>
+
+ <t>DPDK or any other SW dependency version number or commit id
+ used</t>
+
+ <t>Memory allocation to a VM - if it's from Hugpages/elsewhere</t>
+
+ <t>VM storage type: snapshot/independent persistent/independent
+ non-persistent</t>
+
+ <t>Number of VMs</t>
+
+ <t>Number of Virtual NICs (vNICs), versions, type and driver</t>
+
+ <t>Number of virtual CPUs and their core affinity on the host</t>
+
+ <t>Number vNIC interrupt configuration</t>
+
+ <t>Thread affinitization for the applications (including the
+ vSwitch itself) on the host</t>
+
+ <t>Details of Resource isolation, such as CPUs designated for
+ Host/Kernel (isolcpu) and CPUs designated for specific processes
+ (taskset). - Test duration. - Number of flows.</t>
+ </list></t>
+
+ <t>Test Traffic Information:<list style="symbols">
+ <t>Traffic type - UDP, TCP, IMIX / Other</t>
+
+ <t>Packet Sizes</t>
+
+ <t>Deployment Scenario</t>
+ </list></t>
+
+ <t/>
+ </section>
+
+ <section title="Flow classification">
+ <t>Virtual switches group packets into flows by processing and
+ matching particular packet or frame header information, or by matching
+ packets based on the input ports. Thus a flow can be thought of a
+ sequence of packets that have the same set of header field values
+ (5-tuple) or have arrived on the same port. Performance results can
+ vary based on the parameters the vSwitch uses to match for a flow. The
+ recommended flow classification parameters for any vSwitch performance
+ tests are: the input port, the source IP address, the destination IP
+ address and the Ethernet protocol type field. It is essential to
+ increase the flow timeout time on a vSwitch before conducting any
+ performance tests that do not measure the flow setup time. Normally
+ the first packet of a particular stream will install the flow in the
+ virtual switch which adds an additional latency, subsequent packets of
+ the same flow are not subject to this latency if the flow is already
+ installed on the vSwitch.</t>
+ </section>
+
+ <section title="Benchmarks using Baselines with Resource Isolation">
+ <t>This outline describes measurement of baseline with isolated
+ resources at a high level, which is the intended approach at this
+ time.</t>
+
+ <t><list style="numbers">
+ <t>Baselines: <list style="symbols">
+ <t>Optional: Benchmark platform forwarding capability without
+ a vswitch or VNF for at least 72 hours (serves as a means of
+ platform validation and a means to obtain the base performance
+ for the platform in terms of its maximum forwarding rate and
+ latency). <figure>
+ <preamble>Benchmark platform forwarding
+ capability</preamble>
+
+ <artwork align="right"><![CDATA[ __
+ +--------------------------------------------------+ |
+ | +------------------------------------------+ | |
+ | | | | |
+ | | Simple Forwarding App | | Host
+ | | | | |
+ | +------------------------------------------+ | |
+ | | NIC | | |
+ +---+------------------------------------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+
+ <postamble/>
+ </figure></t>
+
+ <t>Benchmark VNF forwarding capability with direct
+ connectivity (vSwitch bypass, e.g., SR/IOV) for at least 72
+ hours (serves as a means of VNF validation and a means to
+ obtain the base performance for the VNF in terms of its
+ maximum forwarding rate and latency). The metrics gathered
+ from this test will serve as a key comparison point for
+ vSwitch bypass technologies performance and vSwitch
+ performance. <figure align="right">
+ <preamble>Benchmark VNF forwarding capability</preamble>
+
+ <artwork><![CDATA[ __
+ +--------------------------------------------------+ |
+ | +------------------------------------------+ | |
+ | | | | |
+ | | VNF | | |
+ | | | | |
+ | +------------------------------------------+ | |
+ | | Passthrough/SR-IOV | | Host
+ | +------------------------------------------+ | |
+ | | NIC | | |
+ +---+------------------------------------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+
+ <postamble/>
+ </figure></t>
+
+ <t>Benchmarking with isolated resources alone, with other
+ resources (both HW&amp;SW) disabled Example, vSw and VM are
+ SUT</t>
+
+ <t>Benchmarking with isolated resources alone, leaving some
+ resources unused</t>
+
+ <t>Benchmark with isolated resources and all resources
+ occupied</t>
+ </list></t>
+
+ <t>Next Steps<list style="symbols">
+ <t>Limited sharing</t>
+
+ <t>Production scenarios</t>
+
+ <t>Stressful scenarios</t>
+ </list></t>
+ </list></t>
+ </section>
+ </section>
+
+ <section title="VSWITCHPERF Specification Summary">
+ <t>The overall specification in preparation is referred to as a Level
+ Test Design (LTD) document, which will contain a suite of performance
+ tests. The base performance tests in the LTD are based on the
+ pre-existing specifications developed by BMWG to test the performance of
+ physical switches. These specifications include:</t>
+
+ <t><list style="symbols">
+ <t><xref target="RFC2544"/> Benchmarking Methodology for Network
+ Interconnect Devices</t>
+
+ <t><xref target="RFC2889"/> Benchmarking Methodology for LAN
+ Switching</t>
+
+ <t><xref target="RFC6201"/> Device Reset Characterization</t>
+
+ <t><xref target="RFC5481"/> Packet Delay Variation Applicability
+ Statement</t>
+ </list></t>
+
+ <t>Some of the above/newer RFCs are being applied in benchmarking for
+ the first time, and represent a development challenge for test equipment
+ developers. Fortunately, many members of the testing system community
+ have engaged on the VSPERF project, including an open source test
+ system.</t>
+
+ <t>In addition to this, the LTD also re-uses the terminology defined
+ by:</t>
+
+ <t><list style="symbols">
+ <t><xref target="RFC2285"/> Benchmarking Terminology for LAN
+ Switching Devices</t>
+
+ <t><xref target="RFC5481"/> Packet Delay Variation Applicability
+ Statement</t>
+ </list></t>
+
+ <t/>
+
+ <t>Specifications to be included in future updates of the LTD
+ include:<list style="symbols">
+ <t><xref target="RFC3918"/> Methodology for IP Multicast
+ Benchmarking</t>
+
+ <t><xref target="RFC4737"/> Packet Reordering Metrics</t>
+ </list></t>
+
+ <t>As one might expect, the most fundamental internetworking
+ characteristics of Throughput and Latency remain important when the
+ switch is virtualized, and these benchmarks figure prominently in the
+ specification.</t>
+
+ <t>When considering characteristics important to "telco" network
+ functions, we must begin to consider additional performance metrics. In
+ this case, the project specifications have referenced metrics from the
+ IETF IP Performance Metrics (IPPM) literature. This means that the <xref
+ target="RFC2544"/> test of Latency is replaced by measurement of a
+ metric derived from IPPM's <xref target="RFC2679"/>, where a set of
+ statistical summaries will be provided (mean, max, min, etc.). Further
+ metrics planned to be benchmarked include packet delay variation as
+ defined by <xref target="RFC5481"/> , reordering, burst behaviour, DUT
+ availability, DUT capacity and packet loss in long term testing at
+ Throughput level, where some low-level of background loss may be present
+ and characterized.</t>
+
+ <t>Tests have been (or will be) designed to collect the metrics
+ below:</t>
+
+ <t><list style="symbols">
+ <t>Throughput Tests to measure the maximum forwarding rate (in
+ frames per second or fps) and bit rate (in Mbps) for a constant load
+ (as defined by <xref target="RFC1242"/>) without traffic loss.</t>
+
+ <t>Packet and Frame Delay Distribution Tests to measure average, min
+ and max packet and frame delay for constant loads.</t>
+
+ <t>Packet Delay Tests to understand latency distribution for
+ different packet sizes and over an extended test run to uncover
+ outliers.</t>
+
+ <t>Scalability Tests to understand how the virtual switch performs
+ as the number of flows, active ports, complexity of the forwarding
+ logic&rsquo;s configuration&hellip; it has to deal with
+ increases.</t>
+
+ <t>Stream Performance Tests (TCP, UDP) to measure bulk data transfer
+ performance, i.e. how fast systems can send and receive data through
+ the switch.</t>
+
+ <t>Control Path and Datapath Coupling Tests, to understand how
+ closely coupled the datapath and the control path are as well as the
+ effect of this coupling on the performance of the DUT (example:
+ delay of the initial packet of a flow).</t>
+
+ <t>CPU and Memory Consumption Tests to understand the virtual
+ switch&rsquo;s footprint on the system, usually conducted as
+ auxiliary measurements with benchmarks above. They include: CPU
+ utilization, Cache utilization and Memory footprint.</t>
+
+ <t>The so-called "Soak" tests, where the selected test is conducted
+ over a long period of time (with an ideal duration of 24 hours, and
+ at least 6 hours). The purpose of soak tests is to capture transient
+ changes in performance which may occur due to infrequent processes
+ or the low probability coincidence of two or more processes. The
+ performance must be evaluated periodically during continuous
+ testing, and this results in use of <xref target="RFC2889"/> Frame
+ Rate metrics instead of <xref target="RFC2544"/> Throughput (which
+ requires stopping traffic to allow time for all traffic to exit
+ internal queues).</t>
+ </list></t>
+
+ <t>Future/planned test specs include:<list style="symbols">
+ <t>Request/Response Performance Tests (TCP, UDP) which measure the
+ transaction rate through the switch.</t>
+
+ <t>Noisy Neighbour Tests, to understand the effects of resource
+ sharing on the performance of a virtual switch.</t>
+
+ <t>Tests derived from examination of ETSI NFV Draft GS IFA003
+ requirements <xref target="IFA003"/> on characterization of
+ acceleration technologies applied to vswitches.</t>
+ </list>The flexibility of deployment of a virtual switch within a
+ network means that the BMWG IETF existing literature needs to be used to
+ characterize the performance of a switch in various deployment
+ scenarios. The deployment scenarios under consideration include:</t>
+
+ <t><figure>
+ <preamble>Physical port to virtual switch to physical
+ port</preamble>
+
+ <artwork><![CDATA[ __
+ +--------------------------------------------------+ |
+ | +--------------------+ | |
+ | | | | |
+ | | v | | Host
+ | +--------------+ +--------------+ | |
+ | | phy port | vSwitch | phy port | | |
+ +---+--------------+------------+--------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+ </figure></t>
+
+ <t><figure>
+ <preamble>Physical port to virtual switch to VNF to virtual switch
+ to physical port</preamble>
+
+ <artwork><![CDATA[ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | ^ : | |
+ | | | | | Guest
+ | : v | |
+ | +---------------+ +---------------+ | |
+ | | logical port 0| | logical port 1| | |
+ +---+---------------+-----------+---------------+---+ __|
+ ^ :
+ | |
+ : v __
+ +---+---------------+----------+---------------+---+ |
+ | | logical port 0| | logical port 1| | |
+ | +---------------+ +---------------+ | |
+ | ^ : | |
+ | | | | | Host
+ | : v | |
+ | +--------------+ +--------------+ | |
+ | | phy port | vSwitch | phy port | | |
+ +---+--------------+------------+--------------+---+ __|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+ </figure><figure>
+ <preamble>Physical port to virtual switch to VNF to virtual switch
+ to VNF to virtual switch to physical port</preamble>
+
+ <artwork><![CDATA[ __
+ +----------------------+ +----------------------+ |
+ | Guest 1 | | Guest 2 | |
+ | +---------------+ | | +---------------+ | |
+ | | Application | | | | Application | | |
+ | +---------------+ | | +---------------+ | |
+ | ^ | | | ^ | | |
+ | | v | | | v | | Guests
+ | +---------------+ | | +---------------+ | |
+ | | logical ports | | | | logical ports | | |
+ | | 0 1 | | | | 0 1 | | |
+ +---+---------------+--+ +---+---------------+--+__|
+ ^ : ^ :
+ | | | |
+ : v : v _
+ +---+---------------+---------+---------------+--+ |
+ | | 0 1 | | 3 4 | | |
+ | | logical ports | | logical ports | | |
+ | +---------------+ +---------------+ | |
+ | ^ | ^ | | | Host
+ | | |-----------------| v | |
+ | +--------------+ +--------------+ | |
+ | | phy ports | vSwitch | phy ports | | |
+ +---+--------------+----------+--------------+---+_|
+ ^ :
+ | |
+ : v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+ </figure><figure>
+ <preamble>Physical port to virtual switch to VNF</preamble>
+
+ <artwork><![CDATA[ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | ^ | |
+ | | | | Guest
+ | : | |
+ | +---------------+ | |
+ | | logical port 0| | |
+ +---+---------------+-------------------------------+ __|
+ ^
+ |
+ : __
+ +---+---------------+------------------------------+ |
+ | | logical port 0| | |
+ | +---------------+ | |
+ | ^ | |
+ | | | | Host
+ | : | |
+ | +--------------+ | |
+ | | phy port | vSwitch | |
+ +---+--------------+------------ -------------- ---+ __|
+ ^
+ |
+ :
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+ </figure><figure>
+ <preamble>VNF to virtual switch to physical port</preamble>
+
+ <artwork><![CDATA[ __
+ +---------------------------------------------------+ |
+ | | |
+ | +-------------------------------------------+ | |
+ | | Application | | |
+ | +-------------------------------------------+ | |
+ | : | |
+ | | | | Guest
+ | v | |
+ | +---------------+ | |
+ | | logical port | | |
+ +-------------------------------+---------------+---+ __|
+ :
+ |
+ v __
+ +------------------------------+---------------+---+ |
+ | | logical port | | |
+ | +---------------+ | |
+ | : | |
+ | | | | Host
+ | v | |
+ | +--------------+ | |
+ | vSwitch | phy port | | |
+ +-------------------------------+--------------+---+ __|
+ :
+ |
+ v
+ +--------------------------------------------------+
+ | |
+ | traffic generator |
+ | |
+ +--------------------------------------------------+]]></artwork>
+ </figure><figure>
+ <preamble>VNF to virtual switch to VNF</preamble>
+
+ <artwork><![CDATA[ __
+ +----------------------+ +----------------------+ |
+ | Guest 1 | | Guest 2 | |
+ | +---------------+ | | +---------------+ | |
+ | | Application | | | | Application | | |
+ | +---------------+ | | +---------------+ | |
+ | | | | ^ | |
+ | v | | | | | Guests
+ | +---------------+ | | +---------------+ | |
+ | | logical ports | | | | logical ports | | |
+ | | 0 | | | | 0 | | |
+ +---+---------------+--+ +---+---------------+--+__|
+ : ^
+ | |
+ v : _
+ +---+---------------+---------+---------------+--+ |
+ | | 1 | | 1 | | |
+ | | logical ports | | logical ports | | |
+ | +---------------+ +---------------+ | |
+ | | ^ | | Host
+ | L-----------------+ | |
+ | | |
+ | vSwitch | |
+ +------------------------------------------------+_|]]></artwork>
+ </figure></t>
+
+ <t>A set of Deployment Scenario figures is available on the VSPERF Test
+ Methodology Wiki page <xref target="TestTopo"/>.</t>
+ </section>
+
+ <section title="3x3 Matrix Coverage">
+ <t>This section organizes the many existing test specifications into the
+ "3x3" matrix (introduced in <xref target="I-D.ietf-bmwg-virtual-net"/>).
+ Because the LTD specification ID names are quite long, this section is
+ organized into lists for each occupied cell of the matrix (not all are
+ occupied, also the matrix has grown to 3x4 to accommodate scale metrics
+ when displaying the coverage of many metrics/benchmarks). The current
+ version of the LTD specification is available <xref target="LTD"/>.</t>
+
+ <t>The tests listed below assess the activation of paths in the data
+ plane, rather than the control plane.</t>
+
+ <t>A complete list of tests with short summaries is available on the
+ VSPERF "LTD Test Spec Overview" Wiki page <xref target="LTDoverV"/>.</t>
+
+ <section title="Speed of Activation">
+ <t><list style="symbols">
+ <t>Activation.RFC2889.AddressLearningRate</t>
+
+ <t>PacketLatency.InitialPacketProcessingLatency</t>
+ </list></t>
+ </section>
+
+ <section title="Accuracy of Activation section">
+ <t><list style="symbols">
+ <t>CPDP.Coupling.Flow.Addition</t>
+ </list></t>
+ </section>
+
+ <section title="Reliability of Activation">
+ <t><list style="symbols">
+ <t>Throughput.RFC2544.SystemRecoveryTime</t>
+
+ <t>Throughput.RFC2544.ResetTime</t>
+ </list></t>
+ </section>
+
+ <section title="Scale of Activation">
+ <t><list style="symbols">
+ <t>Activation.RFC2889.AddressCachingCapacity</t>
+ </list></t>
+ </section>
+
+ <section title="Speed of Operation">
+ <t><list style="symbols">
+ <t>Throughput.RFC2544.PacketLossRate</t>
+
+ <t>CPU.RFC2544.0PacketLoss</t>
+
+ <t>Throughput.RFC2544.PacketLossRateFrameModification</t>
+
+ <t>Throughput.RFC2544.BackToBackFrames</t>
+
+ <t>Throughput.RFC2889.MaxForwardingRate</t>
+
+ <t>Throughput.RFC2889.ForwardPressure</t>
+
+ <t>Throughput.RFC2889.BroadcastFrameForwarding</t>
+ </list></t>
+ </section>
+
+ <section title="Accuracy of Operation">
+ <t><list style="symbols">
+ <t>Throughput.RFC2889.ErrorFramesFiltering</t>
+
+ <t>Throughput.RFC2544.Profile</t>
+ </list></t>
+ </section>
+
+ <section title="Reliability of Operation">
+ <t><list style="symbols">
+ <t>Throughput.RFC2889.Soak</t>
+
+ <t>Throughput.RFC2889.SoakFrameModification</t>
+
+ <t>PacketDelayVariation.RFC3393.Soak</t>
+ </list></t>
+ </section>
+
+ <section title="Scalability of Operation">
+ <t><list style="symbols">
+ <t>Scalability.RFC2544.0PacketLoss</t>
+
+ <t>MemoryBandwidth.RFC2544.0PacketLoss.Scalability</t>
+ </list></t>
+ </section>
+
+ <section title="Summary">
+ <t><figure>
+ <artwork><![CDATA[|------------------------------------------------------------------------|
+| | | | | |
+| | SPEED | ACCURACY | RELIABILITY | SCALE |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| Activation | X | X | X | X |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| Operation | X | X | X | X |
+| | | | | |
+|------------------------------------------------------------------------|
+| | | | | |
+| De-activation | | | | |
+| | | | | |
+|------------------------------------------------------------------------|]]></artwork>
+ </figure></t>
+ </section>
+ </section>
+
+ <section title="Security Considerations">
+ <t>Benchmarking activities as described in this memo are limited to
+ technology characterization of a Device Under Test/System Under Test
+ (DUT/SUT) using controlled stimuli in a laboratory environment, with
+ dedicated address space and the constraints specified in the sections
+ above.</t>
+
+ <t>The benchmarking network topology will be an independent test setup
+ and MUST NOT be connected to devices that may forward the test traffic
+ into a production network, or misroute traffic to the test management
+ network.</t>
+
+ <t>Further, benchmarking is performed on a "black-box" basis, relying
+ solely on measurements observable external to the DUT/SUT.</t>
+
+ <t>Special capabilities SHOULD NOT exist in the DUT/SUT specifically for
+ benchmarking purposes. Any implications for network security arising
+ from the DUT/SUT SHOULD be identical in the lab and in production
+ networks.</t>
+ </section>
+
+ <section anchor="IANA" title="IANA Considerations">
+ <t>No IANA Action is requested at this time.</t>
+ </section>
+
+ <section title="Acknowledgements">
+ <t>The authors appreciate and acknowledge comments from Scott Bradner,
+ Marius Georgescu, Ramki Krishnan, Doug Montgomery, Martin Klozik,
+ Christian Trautman, and others for their reviews.</t>
+ </section>
+ </middle>
+
+ <back>
+ <references title="Normative References">
+ <?rfc ?>
+
+ <?rfc include="reference.RFC.2119"?>
+
+ <?rfc ?>
+
+ <?rfc include="reference.RFC.2330"?>
+
+ <?rfc include='reference.RFC.2544'?>
+
+ <?rfc include="reference.RFC.2679"?>
+
+ <?rfc include='reference.RFC.2680'?>
+
+ <?rfc include='reference.RFC.3393'?>
+
+ <?rfc include='reference.RFC.3432'?>
+
+ <?rfc include='reference.RFC.2681'?>
+
+ <?rfc include='reference.RFC.5905'?>
+
+ <?rfc include='reference.RFC.4689'?>
+
+ <?rfc include='reference.RFC.4737'?>
+
+ <?rfc include='reference.RFC.5357'?>
+
+ <?rfc include='reference.RFC.2889'?>
+
+ <?rfc include='reference.RFC.3918'?>
+
+ <?rfc include='reference.RFC.6201'?>
+
+ <?rfc include='reference.RFC.2285'?>
+
+ <reference anchor="NFV.PER001">
+ <front>
+ <title>Network Function Virtualization: Performance and Portability
+ Best Practices</title>
+
+ <author fullname="ETSI NFV" initials="" surname="">
+ <organization/>
+ </author>
+
+ <date month="June" year="2014"/>
+ </front>
+
+ <seriesInfo name="Group Specification"
+ value="ETSI GS NFV-PER 001 V1.1.1 (2014-06)"/>
+
+ <format type="PDF"/>
+ </reference>
+ </references>
+
+ <references title="Informative References">
+ <?rfc include='reference.RFC.1242'?>
+
+ <?rfc include='reference.RFC.5481'?>
+
+ <?rfc include='reference.RFC.6049'?>
+
+ <?rfc include='reference.RFC.6248'?>
+
+ <?rfc include='reference.RFC.6390'?>
+
+ <?rfc include='reference.I-D.ietf-bmwg-virtual-net'?>
+
+ <?rfc include='reference.I-D.huang-bmwg-virtual-network-performance'?>
+
+ <reference anchor="TestTopo">
+ <front>
+ <title>Test Topologies
+ https://wiki.opnfv.org/vsperf/test_methodology</title>
+
+ <author>
+ <organization/>
+ </author>
+
+ <date/>
+ </front>
+ </reference>
+
+ <reference anchor="LTDoverV">
+ <front>
+ <title>LTD Test Spec Overview
+ https://wiki.opnfv.org/wiki/vswitchperf_test_spec_review</title>
+
+ <author>
+ <organization/>
+ </author>
+
+ <date/>
+ </front>
+ </reference>
+
+ <reference anchor="LTD">
+ <front>
+ <title>LTD Test Specification
+ http://artifacts.opnfv.org/vswitchperf/docs/requirements/index.html</title>
+
+ <author>
+ <organization/>
+ </author>
+
+ <date/>
+ </front>
+ </reference>
+
+ <reference anchor="BrahRel">
+ <front>
+ <title>Brahmaputra, Second OPNFV Release
+ https://www.opnfv.org/brahmaputra</title>
+
+ <author>
+ <organization/>
+ </author>
+
+ <date/>
+ </front>
+ </reference>
+
+ <reference anchor="IFA003">
+ <front>
+ <title>https://docbox.etsi.org/ISG/NFV/Open/Drafts/IFA003_Acceleration_-_vSwitch_Spec/</title>
+
+ <author>
+ <organization/>
+ </author>
+
+ <date/>
+ </front>
+ </reference>
+ </references>
+ </back>
+</rfc>
diff --git a/docs/requirements/vswitchperf_ltd.rst b/docs/requirements/vswitchperf_ltd.rst
index ddd3574b..5464c381 100644
--- a/docs/requirements/vswitchperf_ltd.rst
+++ b/docs/requirements/vswitchperf_ltd.rst
@@ -935,6 +935,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.2.2
diff --git a/docs/userguide/integration.rst b/docs/userguide/integration.rst
index eccd0c76..e45f2dc1 100755
--- a/docs/userguide/integration.rst
+++ b/docs/userguide/integration.rst
@@ -71,7 +71,7 @@ test step calls returns a value it can be later recalled, for example:
]
}
-This test profile uses the the vswitch add_vport method which returns a string
+This test profile uses the vswitch add_vport method which returns a string
value of the port added. This is later called by the del_port method using the
name from step 1.
@@ -103,6 +103,332 @@ This profile can then be used inside other testcases
STEP_VSWITCH_PVP_FINIT
}
+HelloWorld and other basic Testcases
+------------------------------------
+
+The following examples are for demonstration purposes.
+You can run them by copying and pasting into the
+conf/integration/01_testcases.conf file.
+A command-line instruction is shown at the end of each
+example.
+
+HelloWorld
+^^^^^^^^^^
+
+The first example is a HelloWorld testcase.
+It simply creates a bridge with 2 physical ports, then sets up a flow to drop
+incoming packets from the port that was instantiated at the STEP #1.
+There's no interaction with the traffic generator.
+Then the flow, the 2 ports and the bridge are deleted.
+'add_phy_port' method creates a 'dpdk' type interface that will manage the
+physical port. The string value returned is the port name that will be referred
+by 'del_port' later on.
+
+.. code-block:: python
+
+ {
+ "Name": "HelloWorld",
+ "Description": "My first testcase",
+ "Deployment": "clean",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'actions': ['drop'], 'idle_timeout': '0'}],
+ ['vswitch', 'del_flow', 'int_br0'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+
+ }
+
+To run HelloWorld test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --integration HelloWorld
+
+Specify a Flow by the IP address
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The next example shows how to explicitly set up a flow by specifying a
+destination IP address.
+All packets received from the port created at STEP #1 that have a destination
+IP address = 90.90.90.90 will be forwarded to the port created at the STEP #2.
+
+.. code-block:: python
+
+ {
+ "Name": "p2p_rule_l3da",
+ "Description": "Phy2Phy with rule on L3 Dest Addr",
+ "Deployment": "clean",
+ "biDirectional": "False",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_dst': '90.90.90.90', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous'}],
+ ['vswitch', 'dump_flows', 'int_br0'], # STEP 5
+ ['vswitch', 'del_flow', 'int_br0'], # STEP 7 == del-flows
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+
+To run the test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --integration p2p_rule_l3da
+
+Multistream feature
+^^^^^^^^^^^^^^^^^^^
+
+The next testcase uses the multistream feature.
+The traffic generator will send packets with different UDP ports.
+That is accomplished by using "Stream Type" and "MultiStream" keywords.
+4 different flows are set to forward all incoming packets.
+
+.. code-block:: python
+
+ {
+ "Name": "multistream_l4",
+ "Description": "Multistream on UDP ports",
+ "Deployment": "clean",
+ "Stream Type": "L4",
+ "MultiStream": 4,
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ # Setup Flows
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '2', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '3', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ # Send mono-dir traffic
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'False'}],
+ # Clean up
+ ['vswitch', 'del_flow', 'int_br0'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+
+To run the test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --integration multistream_l4
+
+PVP with a VM Replacement
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This example launches a 1st VM in a PVP topology, then the VM is replaced
+by another VM.
+When VNF setup parameter in ./conf/04_vnf.conf is "QemuDpdkVhostUser"
+'add_vport' method creates a 'dpdkvhostuser' type port to connect a VM.
+
+.. code-block:: python
+
+ {
+ "Name": "ex_replace_vm",
+ "Description": "PVP with VM replacement",
+ "Deployment": "clean",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 4
+
+ # Setup Flows
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', \
+ 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', \
+ 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
+
+ # Start VM 1
+ ['vnf1', 'start'],
+ # Now we want to replace VM 1 with another VM
+ ['vnf1', 'stop'],
+
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 11 vm2
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 12
+ ['vswitch', 'del_flow', 'int_br0'],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[12][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+
+ # Start VM 2
+ ['vnf2', 'start'],
+ ['vnf2', 'stop'],
+ ['vswitch', 'dump_flows', 'int_br0'],
+
+ # Clean up
+ ['vswitch', 'del_flow', 'int_br0'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1
+ ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[11][0]'], # vm2
+ ['vswitch', 'del_port', 'int_br0', '#STEP[12][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+
+To run the test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --integration ex_replace_vm
+
+VM with a Linux bridge
+^^^^^^^^^^^^^^^^^^^^^^
+
+In this example a command-line parameter allows to set up a Linux bridge into
+the guest VM.
+That's one of the available ways to specify the guest application.
+Packets matching the flow will be forwarded to the VM.
+
+.. code-block:: python
+
+ {
+ "Name": "ex_pvp_rule_l3da",
+ "Description": "PVP with flow on L3 Dest Addr",
+ "Deployment": "clean",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 4
+ # Setup Flows
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_dst': '90.90.90.90', \
+ 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
+ # Each pkt from the VM is forwarded to the 2nd dpdk port
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ # Start VMs
+ ['vnf1', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'False'}],
+ ['vnf1', 'stop'],
+ # Clean up
+ ['vswitch', 'dump_flows', 'int_br0'], # STEP 10
+ ['vswitch', 'del_flow', 'int_br0'], # STEP 11
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+
+To run the test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --test-params
+ "guest_loopback=linux_bridge" --integration ex_pvp_rule_l3da
+
+Forward packets based on UDP port
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This examples launches 2 VMs connected in parallel.
+Incoming packets will be forwarded to one specific VM depending on the
+destination UDP port.
+
+.. code-block:: python
+
+ {
+ "Name": "ex_2pvp_rule_l4dp",
+ "Description": "2 PVP with flows on L4 Dest Port",
+ "Deployment": "clean",
+ "Stream Type": "L4", # loop UDP ports
+ "MultiStream": 2,
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'], # STEP 0
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
+ ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 4
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 6
+ # Setup Flows to reply ICMPv6 and similar packets, so to
+ # avoid flooding internal port with their re-transmissions
+ ['vswitch', 'add_flow', 'int_br0', \
+ {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
+ 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', \
+ {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
+ 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', \
+ {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
+ 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', \
+ {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
+ 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
+ # Forward UDP packets depending on dest port
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
+ 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
+ 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
+ # Send VM output to phy port #2
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ # Start VMs
+ ['vnf1', 'start'], # STEP 16
+ ['vnf2', 'start'], # STEP 17
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'False'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vswitch', 'dump_flows', 'int_br0'],
+ # Clean up
+ ['vswitch', 'del_flow', 'int_br0'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], # vm2 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+
+To run the test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --integration ex_2pvp_rule_l4dp
+
Executing Tunnel encapsulation tests
------------------------------------
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index d807590d..b5f47998 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -396,7 +396,7 @@ Execution of test with PCI passthrough with vswitch disabled:
.. code-block:: console
$ ./vsperf --conf-file=<path_to_custom_conf>/10_custom.conf
- --vswtich none --vnf QemuPciPassthrough pvp_tput
+ --vswitch none --vnf QemuPciPassthrough pvp_tput
Any of supported guest-loopback-application_ can be used inside VM with
PCI passthrough support.
@@ -526,7 +526,10 @@ for selected Packet Forwarder:
# testpmd configuration
TESTPMD_ARGS = []
- # packet forwarding mode: io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho
+ # packet forwarding mode supported by testpmd; Please see DPDK documentation
+ # for comprehensive list of modes supported by your version.
+ # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|...
+ # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07
TESTPMD_FWD_MODE = 'csum'
# checksum calculation layer: ip|udp|tcp|sctp|outer-ip
TESTPMD_CSUM_LAYER = 'ip'
diff --git a/docs/userguide/yardstick.rst b/docs/userguide/yardstick.rst
index 7f09668d..ec306d57 100755
--- a/docs/userguide/yardstick.rst
+++ b/docs/userguide/yardstick.rst
@@ -13,7 +13,7 @@ validation of installation of OPNFV platform. In the future, Yardstick will
support two options of vswitchperf testcase execution:
- plugin mode, which will execute native vswitchperf testcases; Tests will
- be executed the same way as today, but test results will be processed and
+ be executed natively by vsperf, and test results will be processed and
reported by yardstick.
- traffic generator mode, which will run vswitchperf in **trafficgen**
mode only; Yardstick framework will be used to launch VNFs and to configure
@@ -71,7 +71,7 @@ Testcase customization
Yardstick testcases are described by YAML files. vswitchperf specific testcases
are part of the vswitchperf repository and their yaml files can be found at
-``yardstick/tests`` directory. For detailed description of yaml file sctructure,
+``yardstick/tests`` directory. For detailed description of yaml file structure,
please see yardstick documentation and testcase samples. Only vswitchperf specific
parts will be discussed here.
@@ -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/fuel-plugin-vsperf/vagrant/README.md b/fuel-plugin-vsperf/vagrant/README.md
new file mode 100644
index 00000000..fa0fd823
--- /dev/null
+++ b/fuel-plugin-vsperf/vagrant/README.md
@@ -0,0 +1,8 @@
+Build fuel plugin
+==================
+
+The plugin build support Ubuntu 14.04
+
+1. sudo apt-get install vagrant virtualbox
+
+2. vagrant up
diff --git a/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh b/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh
index 77b6a33d..80fc3353 100755
--- a/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh
+++ b/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh
@@ -1,11 +1,6 @@
#!/bin/bash
sudo apt-get update -y
-sudo apt-get install createrepo rpm dpkg-dev -y
-sudo apt-get install python-setuptools -y
-sudo apt-get install python-pip -y
-sudo easy_install pip
-sudo pip install fuel-plugin-builder
-sudo apt-get install ruby -y
-sudo gem install rubygems-update
+sudo apt-get install -y ruby-dev rubygems-integration python-pip rpm createrepo dpkg-dev
sudo gem install fpm
+sudo pip install fuel-plugin-builder
fpb --debug --build /vswitchperf/fuel-plugin-vsperf
diff --git a/src/dpdk/dpdk.py b/src/dpdk/dpdk.py
index 30f228f7..477c1de4 100644
--- a/src/dpdk/dpdk.py
+++ b/src/dpdk/dpdk.py
@@ -14,7 +14,7 @@
"""Automation of system configuration for DPDK use.
-Parts of this based on ``tools/dpdk_nic_bind.py`` script from Intel(R)
+Parts of this based on ``tools/dpdk*bind.py`` script from Intel(R)
DPDK.
"""
@@ -23,14 +23,15 @@ from sys import platform as _platform
import os
import subprocess
import logging
+import glob
from tools import tasks
from conf import settings
from tools.module_manager import ModuleManager
_LOGGER = logging.getLogger(__name__)
-RTE_PCI_TOOL = os.path.join(
- settings.getValue('RTE_SDK_USER'), 'tools', 'dpdk_nic_bind.py')
+RTE_PCI_TOOL = glob.glob(os.path.join(
+ settings.getValue('RTE_SDK_USER'), 'tools', 'dpdk*bind.py'))[0]
_DPDK_MODULE_MANAGER = ModuleManager()
@@ -168,7 +169,7 @@ def _vhost_user_cleanup():
def _bind_nics():
- """Bind NICs using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ """Bind NICs using the Intel DPDK ``dpdk*bind.py`` tool.
"""
try:
_driver = 'igb_uio'
@@ -189,7 +190,7 @@ def _bind_nics():
_LOGGER.error('Unable to bind NICs %s', str(_NICS_PCI))
def _unbind_nics():
- """Unbind NICs using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ """Unbind NICs using the Intel DPDK ``dpdk*bind.py`` tool.
"""
try:
tasks.run_task(['sudo', RTE_PCI_TOOL, '--unbind'] +
@@ -199,7 +200,7 @@ def _unbind_nics():
except subprocess.CalledProcessError:
_LOGGER.error('Unable to unbind NICs %s', str(_NICS_PCI))
# Rebind NICs to their original drivers
- # using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ # using the Intel DPDK ``dpdk*bind.py`` tool.
for nic in _NICS:
try:
if nic['driver']:
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py
index d7a2b320..a75d0be2 100644
--- a/src/ovs/ofctl.py
+++ b/src/ovs/ofctl.py
@@ -439,6 +439,21 @@ def flow_match(flow_dump, flow_src):
# perform unifications on both source and destination flows
flow_dump = flow_dump.replace('actions=', 'action=')
flow_src = flow_src.replace('actions=', 'action=')
+ # For complex flows the output of "ovs-ofctl dump-flows" can use the
+ # shorthand notation.
+ # eg if we set a flow with constraints on UDP ports like in the following
+ # {'dl_type': '0x0800', 'nw_proto': '17', 'in_port': '1', 'udp_dst': '0', 'actions': ['output:2']}
+ # dump-flows output can combine the first 2 constraints into 'udp' and translate
+ # 'udp_dst' into 'tp_dst' like
+ # "udp,in_port=1,tp_dst=0 actions=output:2".
+ # So the next replacements are needed.
+ flow_dump = flow_dump.replace('ip', 'dl_type=0x0800')
+ flow_dump = flow_dump.replace('tcp', 'nw_proto=6,dl_type=0x0800')
+ flow_dump = flow_dump.replace('udp', 'nw_proto=17,dl_type=0x0800')
+ flow_src = flow_src.replace('udp_src', 'tp_src')
+ flow_src = flow_src.replace('udp_dst', 'tp_dst')
+ flow_src = flow_src.replace('tcp_src', 'tp_src')
+ flow_src = flow_src.replace('tcp_dst', 'tp_dst')
# split flow strings into lists of comparable elements
flow_dump_list = re.findall(r"[\w.:=()]+", flow_dump)
diff --git a/systems/centos/build_base_machine.sh b/systems/centos/build_base_machine.sh
index d3ac3e2b..d94dc975 100755
--- a/systems/centos/build_base_machine.sh
+++ b/systems/centos/build_base_machine.sh
@@ -58,6 +58,8 @@ zlib-devel
glib2-devel
pixman-devel
socat
+numactl
+numactl-devel
# install gvim
vim-X11
diff --git a/systems/fedora/20/build_base_machine.sh b/systems/fedora/20/build_base_machine.sh
index 96bb17df..839d2bee 100755
--- a/systems/fedora/20/build_base_machine.sh
+++ b/systems/fedora/20/build_base_machine.sh
@@ -62,6 +62,10 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
-" | grep -v ^#) \ No newline at end of file
+" | grep -v ^#)
diff --git a/systems/fedora/21/build_base_machine.sh b/systems/fedora/21/build_base_machine.sh
index 69b067f9..e4969893 100755
--- a/systems/fedora/21/build_base_machine.sh
+++ b/systems/fedora/21/build_base_machine.sh
@@ -65,6 +65,10 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
" | grep -v ^#) || exit 1
diff --git a/systems/fedora/22/build_base_machine.sh b/systems/fedora/22/build_base_machine.sh
index 0ca565f3..3cfe0c78 100755
--- a/systems/fedora/22/build_base_machine.sh
+++ b/systems/fedora/22/build_base_machine.sh
@@ -66,9 +66,13 @@ libreport-python3
abrt-python3
abrt-addon-python3
+# libs
+numactl
+numactl-devel
+
# install git-review tool
git-review
" | grep -v ^#)
# Create hugepage dirs
-mkdir -p /dev/hugepages \ No newline at end of file
+mkdir -p /dev/hugepages
diff --git a/systems/rhel/7.2/build_base_machine.sh b/systems/rhel/7.2/build_base_machine.sh
index 86608066..2319535b 100755
--- a/systems/rhel/7.2/build_base_machine.sh
+++ b/systems/rhel/7.2/build_base_machine.sh
@@ -50,6 +50,8 @@ pkglist=(
socat\
tk-devel\
wget\
+ numactl\
+ numactl-devel\
)
# python tools for proper QEMU, DPDK, and OVS make
@@ -95,4 +97,4 @@ rm -f Python-3.4.2.tar.xz
pip3.4 install virtualenv
# Create hugepage dirs
-mkdir -p /dev/hugepages \ No newline at end of file
+mkdir -p /dev/hugepages
diff --git a/systems/ubuntu/14.04/build_base_machine.sh b/systems/ubuntu/14.04/build_base_machine.sh
index 9fa8511c..04f4a7e1 100755
--- a/systems/ubuntu/14.04/build_base_machine.sh
+++ b/systems/ubuntu/14.04/build_base_machine.sh
@@ -77,6 +77,10 @@ python3-tk
libpython3.4
python3-reportlab
+# libs
+libnuma1
+libnuma-dev
+
# install git-review tool
git-review
" | grep -v ^#)
diff --git a/systems/ubuntu/build_base_machine.sh b/systems/ubuntu/build_base_machine.sh
index a2b48a26..1b42a790 100755
--- a/systems/ubuntu/build_base_machine.sh
+++ b/systems/ubuntu/build_base_machine.sh
@@ -44,6 +44,8 @@ apt-get -y install autoconf libtool
apt-get -y install libpcap-dev
apt-get -y install libglib2.0
apt-get -y install libfuse-dev
+apt-get -y install libnuma1
+apt-get -y install libnuma-dev
# Some useful tools you may optionally install
#apt-get -y install ctags
diff --git a/testcases/integration.py b/testcases/integration.py
index ffde5822..f3f684ba 100644
--- a/testcases/integration.py
+++ b/testcases/integration.py
@@ -94,99 +94,100 @@ class IntegrationTestCase(TestCase):
# prepare test execution environment
self.run_initialize()
- with self._vswitch_ctl, self._loadgen:
- with self._vnf_ctl, self._collector:
- if not self._vswitch_none:
- self._add_flows()
-
- # run traffic generator if requested, otherwise wait for manual termination
- if S.getValue('mode') == 'trafficgen-off':
- time.sleep(2)
- self._logger.debug("All is set. Please run traffic generator manually.")
- input(os.linesep + "Press Enter to terminate vswitchperf..." + os.linesep + os.linesep)
- else:
- with self._traffic_ctl:
- if not self.test:
- self._traffic_ctl.send_traffic(self._traffic)
- else:
- vnf_list = {}
- loader = Loader()
- # execute test based on TestSteps definition
- if self.test:
- step_result = [None] * len(self.test)
- for i, step in enumerate(self.test):
- step_ok = False
- if step[0] == 'vswitch':
- test_object = self._vswitch_ctl.get_vswitch()
- elif step[0] == 'namespace':
- test_object = namespace
- elif step[0] == 'veth':
- test_object = veth
- elif step[0] == 'trafficgen':
- test_object = self._traffic_ctl
- # in case of send_traffic method, ensure that specified
- # traffic values are merged with existing self._traffic
- if step[1] == 'send_traffic':
- tmp_traffic = copy.deepcopy(self._traffic)
- tmp_traffic.update(step[2])
- step[2] = tmp_traffic
- elif step[0].startswith('vnf'):
- if not step[0] in vnf_list:
- # initialize new VM and copy data to its shared dir
- vnf_list[step[0]] = loader.get_vnf_class()()
- self._copy_fwd_tools_for_guest(len(vnf_list))
- test_object = vnf_list[step[0]]
- else:
- self._logger.error("Unsupported test object %s", step[0])
- self._inttest = {'status' : False, 'details' : ' '.join(step)}
- self.report_status("Step '{}'".format(' '.join(step)), self._inttest['status'])
- break
-
- test_method = getattr(test_object, step[1])
- test_method_check = getattr(test_object, CHECK_PREFIX + step[1])
-
- step_params = []
- if test_method and test_method_check and \
- callable(test_method) and callable(test_method_check):
-
- try:
- step_params = eval_step_params(step[2:], step_result)
- step_log = '{} {}'.format(' '.join(step[:2]), step_params)
- step_result[i] = test_method(*step_params)
- self._logger.debug("Step %s '%s' results '%s'", i,
- step_log, step_result[i])
- time.sleep(5)
- step_ok = test_method_check(step_result[i], *step_params)
- except AssertionError:
- self._inttest = {'status' : False, 'details' : step_log}
- self._logger.error("Step %s raised assertion error", i)
- # stop vnfs in case of error
- for vnf in vnf_list:
- vnf_list[vnf].stop()
+ try:
+ with self._vswitch_ctl, self._loadgen:
+ with self._vnf_ctl, self._collector:
+ if not self._vswitch_none:
+ self._add_flows()
+
+ # run traffic generator if requested, otherwise wait for manual termination
+ if S.getValue('mode') == 'trafficgen-off':
+ time.sleep(2)
+ self._logger.debug("All is set. Please run traffic generator manually.")
+ input(os.linesep + "Press Enter to terminate vswitchperf..." + os.linesep + os.linesep)
+ else:
+ with self._traffic_ctl:
+ if not self.test:
+ self._traffic_ctl.send_traffic(self._traffic)
+ else:
+ vnf_list = {}
+ loader = Loader()
+ # execute test based on TestSteps definition
+ if self.test:
+ step_result = [None] * len(self.test)
+ for i, step in enumerate(self.test):
+ step_ok = False
+ if step[0] == 'vswitch':
+ test_object = self._vswitch_ctl.get_vswitch()
+ elif step[0] == 'namespace':
+ test_object = namespace
+ elif step[0] == 'veth':
+ test_object = veth
+ elif step[0] == 'trafficgen':
+ test_object = self._traffic_ctl
+ # in case of send_traffic method, ensure that specified
+ # traffic values are merged with existing self._traffic
+ if step[1] == 'send_traffic':
+ tmp_traffic = copy.deepcopy(self._traffic)
+ tmp_traffic.update(step[2])
+ step[2] = tmp_traffic
+ elif step[0].startswith('vnf'):
+ if not step[0] in vnf_list:
+ # initialize new VM and copy data to its shared dir
+ vnf_list[step[0]] = loader.get_vnf_class()()
+ self._copy_fwd_tools_for_guest(len(vnf_list))
+ test_object = vnf_list[step[0]]
+ else:
+ self._logger.error("Unsupported test object %s", step[0])
+ self._inttest = {'status' : False, 'details' : ' '.join(step)}
+ self.report_status("Step '{}'".format(' '.join(step)), self._inttest['status'])
break
- except IndexError:
+
+ test_method = getattr(test_object, step[1])
+ test_method_check = getattr(test_object, CHECK_PREFIX + step[1])
+
+ step_params = []
+ if test_method and test_method_check and \
+ callable(test_method) and callable(test_method_check):
+
+ try:
+ step_params = eval_step_params(step[2:], step_result)
+ step_log = '{} {}'.format(' '.join(step[:2]), step_params)
+ step_result[i] = test_method(*step_params)
+ self._logger.debug("Step %s '%s' results '%s'", i,
+ step_log, step_result[i])
+ time.sleep(5)
+ step_ok = test_method_check(step_result[i], *step_params)
+ except AssertionError:
+ self._inttest = {'status' : False, 'details' : step_log}
+ self._logger.error("Step %s raised assertion error", i)
+ # stop vnfs in case of error
+ for vnf in vnf_list:
+ vnf_list[vnf].stop()
+ break
+ except IndexError:
+ self._inttest = {'status' : False, 'details' : step_log}
+ self._logger.error("Step %s result index error %s", i,
+ ' '.join(step[2:]))
+ # stop vnfs in case of error
+ for vnf in vnf_list:
+ vnf_list[vnf].stop()
+ break
+
+ self.report_status("Step {} - '{}'".format(i, step_log), step_ok)
+ if not step_ok:
self._inttest = {'status' : False, 'details' : step_log}
- self._logger.error("Step %s result index error %s", i,
- ' '.join(step[2:]))
# stop vnfs in case of error
for vnf in vnf_list:
vnf_list[vnf].stop()
break
- self.report_status("Step {} - '{}'".format(i, step_log), step_ok)
- if not step_ok:
- self._inttest = {'status' : False, 'details' : step_log}
- # stop vnfs in case of error
- for vnf in vnf_list:
- vnf_list[vnf].stop()
- break
-
- # dump vswitch flows before they are affected by VNF termination
- if not self._vswitch_none:
- self._vswitch_ctl.dump_vswitch_flows()
-
- # tear down test execution environment and log results
- self.run_finalize()
+ # dump vswitch flows before they are affected by VNF termination
+ if not self._vswitch_none:
+ self._vswitch_ctl.dump_vswitch_flows()
+ finally:
+ # tear down test execution environment and log results
+ self.run_finalize()
# report test results
self.run_report()
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 5f5c9358..d88840d7 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -14,14 +14,18 @@
"""TestCase base class
"""
+from collections import OrderedDict
+import copy
import csv
+import logging
+import math
import os
+import re
import time
-import logging
import subprocess
-import copy
-from collections import OrderedDict
+from conf import settings as S
+from conf import get_test_param
import core.component_factory as component_factory
from core.loader import Loader
from core.results.results_constants import ResultsConstants
@@ -29,8 +33,7 @@ from tools import tasks
from tools import hugepages
from tools import functions
from tools.pkt_gen.trafficgen.trafficgenhelper import TRAFFIC_DEFAULTS
-from conf import settings as S
-from conf import get_test_param
+
class TestCase(object):
"""TestCase base class
@@ -189,6 +192,10 @@ class TestCase(object):
# mount hugepages if needed
self._mount_hugepages()
+ # verify enough hugepages are free to run the testcase
+ if not self._check_for_enough_hugepages():
+ raise RuntimeError('Not enough hugepages free to run test.')
+
# copy sources of l2 forwarding tools into VM shared dir if needed
self._copy_fwd_tools_for_all_guests()
@@ -391,7 +398,6 @@ class TestCase(object):
except subprocess.CalledProcessError:
self._logger.error('Unable to copy DPDK and l2fwd to shared directory')
-
def _mount_hugepages(self):
"""Mount hugepages if usage of DPDK or Qemu is detected
"""
@@ -411,6 +417,80 @@ class TestCase(object):
hugepages.umount_hugepages()
self._hugepages_mounted = False
+ def _check_for_enough_hugepages(self):
+ """Check to make sure enough hugepages are free to satisfy the
+ test environment.
+ """
+ hugepages_needed = 0
+ hugepage_size = hugepages.get_hugepage_size()
+ # get hugepage amounts per guest
+ for guest in range(self.deployment.count('v')):
+ hugepages_needed += math.ceil((int(S.getValue(
+ 'GUEST_MEMORY')[guest]) * 1000) / hugepage_size)
+
+ # get hugepage amounts for each socket on dpdk
+ sock0_mem, sock1_mem = 0, 0
+ if S.getValue('VSWITCH').lower().count('dpdk'):
+ # the import below needs to remain here and not put into the module
+ # imports because of an exception due to settings not yet loaded
+ from vswitches import ovs_dpdk_vhost
+ if ovs_dpdk_vhost.OvsDpdkVhost.old_dpdk_config():
+ match = re.search(
+ '-socket-mem\s+(\d+),(\d+)',
+ ''.join(S.getValue('VSWITCHD_DPDK_ARGS')))
+ if match:
+ sock0_mem, sock1_mem = (int(match.group(1)) / 1024,
+ int(match.group(2)) / 1024)
+ else:
+ logging.info(
+ 'Could not parse socket memory config in dpdk params.')
+ else:
+ sock0_mem, sock1_mem = (
+ S.getValue(
+ 'VSWITCHD_DPDK_CONFIG')['dpdk-socket-mem'].split(','))
+ sock0_mem, sock1_mem = (int(sock0_mem) / 1024,
+ int(sock1_mem) / 1024)
+
+ # If hugepages needed, verify the amounts are free
+ if any([hugepages_needed, sock0_mem, sock1_mem]):
+ free_hugepages = hugepages.get_free_hugepages()
+ if hugepages_needed:
+ logging.info('Need %s hugepages free for guests',
+ hugepages_needed)
+ result1 = free_hugepages >= hugepages_needed
+ free_hugepages -= hugepages_needed
+ else:
+ result1 = True
+
+ if sock0_mem:
+ logging.info('Need %s hugepages free for dpdk socket 0',
+ sock0_mem)
+ result2 = hugepages.get_free_hugepages('0') >= sock0_mem
+ free_hugepages -= sock0_mem
+ else:
+ result2 = True
+
+ if sock1_mem:
+ logging.info('Need %s hugepages free for dpdk socket 1',
+ sock1_mem)
+ result3 = hugepages.get_free_hugepages('1') >= sock1_mem
+ free_hugepages -= sock1_mem
+ else:
+ result3 = True
+
+ logging.info('Need a total of {} total hugepages'.format(
+ hugepages_needed + sock1_mem + sock0_mem))
+
+ # The only drawback here is sometimes dpdk doesn't release
+ # its hugepages on a test failure. This could cause a test
+ # to fail when dpdk would be OK to start because it will just
+ # use the previously allocated hugepages.
+ result4 = True if free_hugepages >= 0 else False
+
+ return all([result1, result2, result3, result4])
+ else:
+ return True
+
@staticmethod
def write_result_to_file(results, output):
"""Write list of dictionaries to a CSV file.
diff --git a/tools/hugepages.py b/tools/hugepages.py
index 3a434d6e..bba40122 100644
--- a/tools/hugepages.py
+++ b/tools/hugepages.py
@@ -20,40 +20,133 @@ import re
import subprocess
import logging
import locale
+import math
from tools import tasks
from conf import settings
_LOGGER = logging.getLogger(__name__)
-
+_allocated_hugepages = False
#
# hugepage management
#
+def get_hugepage_size():
+ """Return the size of the configured hugepages
+ """
+ hugepage_size_re = re.compile(r'^Hugepagesize:\s+(?P<size_hp>\d+)\s+kB',
+ re.IGNORECASE)
+ with open('/proc/meminfo', 'r') as fh:
+ data = fh.readlines()
+ for line in data:
+ match = hugepage_size_re.search(line)
+ if match:
+ _LOGGER.info('Hugepages size: %s', match.group('size_hp'))
+ return int(match.group('size_hp'))
+ else:
+ _LOGGER.error('Could not parse for hugepage size')
+ return 0
+
+
+def allocate_hugepages():
+ """Allocate hugepages on the fly
+ """
+ hp_size = get_hugepage_size()
+ if hp_size > 0:
+ nr_hp = int(math.ceil(settings.getValue('HUGEPAGE_RAM_ALLOCATION')/hp_size))
+ _LOGGER.info('Will allocate %s hugepages.', nr_hp)
+
+ nr_hugepages = 'vm.nr_hugepages=' + str(nr_hp)
+ try:
+ tasks.run_task(['sudo', 'sysctl', nr_hugepages],
+ _LOGGER, 'Trying to allocate hugepages..', True)
+ except subprocess.CalledProcessError:
+ _LOGGER.error('Unable to allocate hugepages.')
+ return False
+ global _allocated_hugepages
+ _allocated_hugepages = True
+ return True
+
+ else:
+ _LOGGER.error('Division by 0 will be supported in next release')
+ return False
+
+def deallocate_hugepages():
+ """De-allocate hugepages that were allocated on the fly
+ """
+ global _allocated_hugepages
+ if _allocated_hugepages:
+ nr_hugepages = 'vm.nr_hugepages= 0'
+ try:
+ tasks.run_task(['sudo', 'sysctl', nr_hugepages],
+ _LOGGER, 'Trying to de-allocate hugepages..', True)
+ except subprocess.CalledProcessError:
+ _LOGGER.error('Unable to de-allocate hugepages.')
+ return False
+ _allocated_hugepages = False
+ return True
+
+
+def get_free_hugepages(socket=None):
+ """Get the free hugepage totals on the system.
+
+ :param socket: optional socket param to get free hugepages on a socket. To
+ be passed a string.
+ :returns: hugepage amount as int
+ """
+ hugepage_free_re = re.compile(r'HugePages_Free:\s+(?P<free_hp>\d+)$')
+ if socket:
+ if os.path.exists(
+ '/sys/devices/system/node/node{}/meminfo'.format(socket)):
+ meminfo_path = '/sys/devices/system/node/node{}/meminfo'.format(
+ socket)
+ else:
+ _LOGGER.info('No hugepage info found for socket {}'.format(socket))
+ return 0
+ else:
+ meminfo_path = '/proc/meminfo'
+
+ with open(meminfo_path, 'r') as fh:
+ data = fh.readlines()
+ for line in data:
+ match = hugepage_free_re.search(line)
+ if match:
+ _LOGGER.info('Hugepages free: %s %s', match.group('free_hp'),
+ 'on socket {}'.format(socket) if socket else '')
+ return int(match.group('free_hp'))
+ else:
+ _LOGGER.info('Could not parse for hugepage size')
+ return 0
+
+
def is_hugepage_available():
- """Check if hugepages are available on the system.
+ """Check if hugepages are configured/available on the system.
"""
- hugepage_re = re.compile(r'^HugePages_Free:\s+(?P<num_hp>\d+)$')
+ hugepage_size_re = re.compile(r'^Hugepagesize:\s+(?P<size_hp>\d+)\s+kB',
+ re.IGNORECASE)
# read in meminfo
with open('/proc/meminfo') as mem_file:
mem_info = mem_file.readlines()
- # first check if module is loaded
+ # see if the hugepage size is the recommended value
for line in mem_info:
- result = hugepage_re.match(line)
- if not result:
- continue
-
- num_huge = result.group('num_hp')
- if not num_huge:
- _LOGGER.info('No free hugepages.')
- else:
- _LOGGER.info('Found \'%s\' free hugepage(s).', num_huge)
- return True
-
- return False
+ match_size = hugepage_size_re.match(line)
+ if match_size:
+ if match_size.group('size_hp') != '1048576':
+ _LOGGER.info(
+ '%s%s%s kB',
+ 'Hugepages not configured for recommend 1GB size. ',
+ 'Currently set at ', match_size.group('size_hp'))
+ num_huge = get_free_hugepages()
+ if num_huge == 0:
+ _LOGGER.info('No free hugepages.')
+ if not allocate_hugepages():
+ return False
+ else:
+ _LOGGER.info('Found \'%s\' free hugepage(s).', num_huge)
+ return True
def is_hugepage_mounted():
@@ -69,10 +162,11 @@ def is_hugepage_mounted():
def mount_hugepages():
- """Ensure hugepages are mounted.
+ """Ensure hugepages are mounted. Raises RuntimeError if no configured
+ hugepages are available.
"""
if not is_hugepage_available():
- return
+ raise RuntimeError('No Hugepages configured.')
if is_hugepage_mounted():
return
@@ -100,4 +194,5 @@ def umount_hugepages():
except subprocess.CalledProcessError:
_LOGGER.error('Unable to umount hugepages.')
-
+ if not deallocate_hugepages():
+ _LOGGER.error('Unable to deallocate previously allocated hugepages.')
diff --git a/tools/namespace.py b/tools/namespace.py
index e6bcd819..9131398f 100644
--- a/tools/namespace.py
+++ b/tools/namespace.py
@@ -108,8 +108,8 @@ def get_system_namespace_list():
Return tuple of strings for namespaces on the system
:return: tuple of namespaces as string
"""
- return tuple(os.listdir('/var/run/netns'))
-
+ return tuple(os.listdir('/var/run/netns')) if os.path.exists(
+ '/var/run/netns') else tuple()
def get_vsperf_namespace_list():
"""
diff --git a/tools/networkcard.py b/tools/networkcard.py
index c31be691..8d704fd5 100644
--- a/tools/networkcard.py
+++ b/tools/networkcard.py
@@ -249,7 +249,7 @@ def reinit_vfs(pf_pci_handle):
:param pf_pci_handle: PCI slot identifier of PF with domain part.
"""
- rte_pci_tool = os.path.join(settings.getValue('RTE_SDK'), 'tools', 'dpdk_nic_bind.py')
+ rte_pci_tool = glob.glob(os.path.join(settings.getValue('RTE_SDK'), 'tools', 'dpdk*bind.py'))[0]
for vf_nic in get_sriov_vfs_list(pf_pci_handle):
nic_driver = get_driver(vf_nic)
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 aadadf94..5e4ae569 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -19,8 +19,6 @@ This requires the following settings in your config file:
* TRAFFICGEN_IXNET_LIB_PATH
IxNetwork libraries path
-* TRAFFICGEN_IXNET_HOST
- IxNetwork host IP address
* TRAFFICGEN_IXNET_PORT
IxNetwork host port number
* TRAFFICGEN_IXNET_USER
@@ -32,7 +30,7 @@ This requires the following settings in your config file:
as the previous one
The following settings are also required. These can likely be shared
-an 'Ixia' traffic generator instance:
+with an 'Ixia' traffic generator instance:
* TRAFFICGEN_IXIA_HOST
IXIA chassis IP address
@@ -255,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.
"""
@@ -272,7 +270,7 @@ class IxNet(trafficgen.ITrafficGenerator):
self._params['config'] = {
'binary': True,
- 'trials': trials,
+ 'tests': tests,
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
@@ -389,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.
"""
@@ -409,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 d6c09e5d..790286d8 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -20,10 +20,11 @@ Moongen Traffic Generator Model
"""
# python imports
-import logging
from collections import OrderedDict
-import subprocess
+import logging
+import math
import re
+import subprocess
# VSPerf imports
from conf import settings
@@ -49,6 +50,13 @@ class Moongen(ITrafficGenerator):
self._moongen_user = settings.getValue('TRAFFICGEN_MOONGEN_USER')
self._moongen_ports = settings.getValue('TRAFFICGEN_MOONGEN_PORTS')
+ if settings.getValue('TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS') == '10':
+ self._moongen_line_speed = math.pow(10, 10)
+ else:
+ raise RuntimeError(
+ 'MOONGEN: Invalid line speed in configuration ' + \
+ 'file (today 10Gbps supported)')
+
@property
def traffic_defaults(self):
"""Default traffic values.
@@ -58,12 +66,12 @@ class Moongen(ITrafficGenerator):
will likely break traffic generator implementations or tests
respectively.
"""
- self._logger.info("In moongen traffic_defaults method")
+ self._logger.info("In Moongen traffic_defaults method")
return self._traffic_defaults
def create_moongen_cfg_file(self, traffic, duration=60,
acceptable_loss_pct=1, one_shot=0):
- """Create the MoonGen configuration file from VSPERF's traffic profile
+ """Create the Moongen configuration file from VSPERF's traffic profile
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
:param duration: The length of time to generate packet throughput
:param acceptable_loss: Maximum packet loss acceptable
@@ -138,8 +146,9 @@ class Moongen(ITrafficGenerator):
out_file.write("dstIp = \"" + \
str(traffic['l3']['dstip']) + "\",\n")
- out_file.write("vlanId = " + \
- str(traffic['vlan']['id']) + ",\n")
+ if traffic['vlan']['enabled']:
+ out_file.write("vlanId = " + \
+ str(traffic['vlan']['id']) + ",\n")
out_file.write("searchRunTime = " + \
str(duration) + ",\n")
@@ -156,10 +165,17 @@ class Moongen(ITrafficGenerator):
if one_shot:
out_file.write("oneShot = true,\n")
- # Assume 10G line rates at the moment. Need to convert VSPERF
- # frame_rate (percentage of line rate) to Mpps for MoonGen
+ # Need to convert VSPERF frame_rate (percentage of line rate)
+ # to Mpps for Moongen
+ start_rate = str(
+ (traffic['frame_rate'] / 100) * (self._moongen_line_speed / \
+ (8 * (traffic['l2']['framesize'] + 20)) / math.pow(10, 6)))
+
+ logging.debug("startRate = " + start_rate)
+
+ out_file.write("startRate = " + \
+ start_rate + "\n")
- out_file.write("startRate = " + str((traffic['frame_rate'] / 100) * 14.88) + "\n")
out_file.write("}" + "\n")
out_file.close()
@@ -181,17 +197,17 @@ class Moongen(ITrafficGenerator):
raise RuntimeError('MOONGEN: Error copying configuration file')
def connect(self):
- """Connect to MoonGen traffic generator
+ """Connect to Moongen traffic generator
- Verify that MoonGen is on the system indicated by
+ Verify that Moongen is on the system indicated by
the configuration file
"""
- self._logger.info("MOONGEN: In MoonGen connect method...")
+ self._logger.info("MOONGEN: In Moongen connect method...")
if self._moongen_host_ip_addr:
cmd_ping = "ping -c1 " + self._moongen_host_ip_addr
else:
- raise RuntimeError('MOONGEN: MoonGen host not defined')
+ raise RuntimeError('MOONGEN: Moongen host not defined')
ping = subprocess.Popen(cmd_ping, shell=True, stderr=subprocess.PIPE)
output, error = ping.communicate()
@@ -199,7 +215,7 @@ class Moongen(ITrafficGenerator):
if ping.returncode:
self._logger.error(error)
self._logger.error(output)
- raise RuntimeError('MOONGEN: Cannot ping MoonGen host at ' + \
+ raise RuntimeError('MOONGEN: Cannot ping Moongen host at ' + \
self._moongen_host_ip_addr)
connect_moongen = "ssh " + self._moongen_user + \
@@ -218,10 +234,10 @@ class Moongen(ITrafficGenerator):
self._logger.error(error)
self._logger.error(output)
raise RuntimeError(
- 'MOONGEN: Cannot locate MoonGen program at %s within %s' \
+ 'MOONGEN: Cannot locate Moongen program at %s within %s' \
% (self._moongen_host_ip_addr, self._moongen_base_dir))
- self._logger.info("MOONGEN: MoonGen host successfully found...")
+ self._logger.info("MOONGEN: Moongen host successfully found...")
def disconnect(self):
"""Disconnect from the traffic generator.
@@ -252,7 +268,7 @@ class Moongen(ITrafficGenerator):
- List of List of Rx Bytes,
- Payload Errors and Sequence Errors.
"""
- self._logger.info("In moongen send_burst_traffic method")
+ self._logger.info("In Moongen send_burst_traffic method")
return NotImplementedError('Moongen Burst traffic not implemented')
def send_cont_traffic(self, traffic=None, duration=20):
@@ -274,7 +290,7 @@ class Moongen(ITrafficGenerator):
- Max Latency (ns),
- Avg Latency (ns)
"""
- self._logger.info("In moongen send_cont_traffic method")
+ self._logger.info("In Moongen send_cont_traffic method")
self._params.clear()
self._params['traffic'] = self.traffic_defaults.copy()
@@ -316,31 +332,31 @@ class Moongen(ITrafficGenerator):
results = OrderedDict()
results[ResultsConstants.THROUGHPUT_RX_FPS] = (
- '{:,.6f}'.format(total_throughput_rx_fps))
+ '{:.6f}'.format(total_throughput_rx_fps))
results[ResultsConstants.THROUGHPUT_RX_MBPS] = (
- '{:,.3f}'.format(total_throughput_rx_mbps))
+ '{:.3f}'.format(total_throughput_rx_mbps))
results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
- '{:,.3f}'.format(total_throughput_rx_pct))
+ '{:.3f}'.format(total_throughput_rx_pct))
results[ResultsConstants.TX_RATE_FPS] = (
- '{:,.6f}'.format(total_throughput_tx_fps))
+ '{:.6f}'.format(total_throughput_tx_fps))
results[ResultsConstants.TX_RATE_MBPS] = (
- '{:,.3f}'.format(total_throughput_tx_mbps))
+ '{:.3f}'.format(total_throughput_tx_mbps))
results[ResultsConstants.TX_RATE_PERCENT] = (
- '{:,.3f}'.format(total_throughput_tx_pct))
+ '{:.3f}'.format(total_throughput_tx_pct))
results[ResultsConstants.MIN_LATENCY_NS] = (
- '{:,.3f}'.format(total_min_latency_ns))
+ '{:.3f}'.format(total_min_latency_ns))
results[ResultsConstants.MAX_LATENCY_NS] = (
- '{:,.3f}'.format(total_max_latency_ns))
+ '{:.3f}'.format(total_max_latency_ns))
results[ResultsConstants.AVG_LATENCY_NS] = (
- '{:,.3f}'.format(total_avg_latency_ns))
+ '{:.3f}'.format(total_avg_latency_ns))
return results
@@ -352,18 +368,18 @@ class Moongen(ITrafficGenerator):
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
:param duration: Time to wait to receive packets (secs)
"""
- self._logger.info("In moongen start_cont_traffic method")
- return NotImplementedError('Moongen continuous traffic not implemented')
+ self._logger.info("In Moongen start_cont_traffic method")
+ return NotImplementedError('moongen continuous traffic not implemented')
def stop_cont_traffic(self):
# Stop continuous transmission and return results.
- self._logger.info("In moongen stop_cont_traffic method")
+ self._logger.info("In Moongen stop_cont_traffic method")
def run_moongen_and_collect_results(self, test_run=1):
- """Execute MoonGen and transform results into VSPERF format
+ """Execute Moongen and transform results into VSPERF format
:param test_run: The number of tests to run
"""
- # Start MoonGen and create logfile of the run
+ # Start Moongen and create logfile of the run
connect_moongen = "ssh " + self._moongen_user + "@" + \
self._moongen_host_ip_addr
@@ -381,7 +397,7 @@ class Moongen(ITrafficGenerator):
logging.debug(error)
logging.debug(output)
raise RuntimeError(
- 'MOONGEN: Error starting MoonGen program at %s within %s' \
+ 'MOONGEN: Error starting Moongen program at %s within %s' \
% (self._moongen_host_ip_addr, self._moongen_base_dir))
cmd_moongen = "mkdir -p /tmp/moongen/" + str(test_run)
@@ -396,7 +412,7 @@ class Moongen(ITrafficGenerator):
logging.debug(error)
logging.debug(output)
raise RuntimeError(
- 'MOONGEN: Error obtaining MoonGen log from %s within %s' \
+ 'MOONGEN: Error obtaining Moongen log from %s within %s' \
% (self._moongen_host_ip_addr, self._moongen_base_dir))
cmd_moongen = " scp " + self._moongen_user + "@" + \
@@ -414,7 +430,7 @@ class Moongen(ITrafficGenerator):
logging.debug(error)
logging.debug(output)
raise RuntimeError(
- 'MOONGEN: Error obtaining MoonGen log from %s within %s' \
+ 'MOONGEN: Error obtaining Moongen log from %s within %s' \
% (self._moongen_host_ip_addr, self._moongen_base_dir))
log_file = "/tmp/moongen/" + str(test_run) + "/moongen-run.log"
@@ -443,7 +459,7 @@ class Moongen(ITrafficGenerator):
if not results_match:
logging.error('There was a problem parsing ' +\
- 'MoonGen REPORT section of MoonGen log file')
+ 'Moongen REPORT section of Moongen log file')
moongen_results = OrderedDict()
moongen_results[ResultsConstants.THROUGHPUT_RX_FPS] = 0
@@ -468,14 +484,25 @@ class Moongen(ITrafficGenerator):
if parameters_match:
frame_size = int(parameters_match.group(1))
else:
- logging.error('There was a problem parsing MoonGen ' +\
- 'PARAMETERS section of MoonGen log file')
+ logging.error('There was a problem parsing Moongen ' +\
+ 'PARAMETERS section of Moongen log file')
frame_size = 0
- if results_match and parameters_match:
+ # Each packet stream in the MoonGen report is prefaced with the
+ # words '[REPORT]Device'. Count the instances of this string to
+ # get the total aggregrate throughput. For example:
+ #
+ # - If num_traffic_streams = 1, there is a single
+ # unidirectional stream
+ #
+ # - If num_traffic_streams = 2, there is a bidirectional
+ # traffic stream
+ num_traffic_streams = mytext.count('[REPORT]Device')
+
+ if results_match and parameters_match and num_traffic_streams:
# Assume for now 10G link speed
- max_theoretical_mfps = (
- (10000000000 / 8) / (frame_size + 20))
+ max_theoretical_fps = (
+ num_traffic_streams * (self._moongen_line_speed / 8) / (frame_size + 20))
moongen_results[ResultsConstants.THROUGHPUT_RX_FPS] = (
float(results_match.group(6)) * 1000000)
@@ -484,8 +511,7 @@ class Moongen(ITrafficGenerator):
(float(results_match.group(6)) * frame_size + 20) * 8)
moongen_results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
- float(results_match.group(6)) * \
- 1000000 / max_theoretical_mfps * 100)
+ (100 * float(results_match.group(6)) * 1000000) / max_theoretical_fps)
moongen_results[ResultsConstants.TX_RATE_FPS] = (
float(results_match.group(5)) * 1000000)
@@ -494,8 +520,7 @@ class Moongen(ITrafficGenerator):
float(results_match.group(5)) * (frame_size + 20) * 8)
moongen_results[ResultsConstants.TX_RATE_PERCENT] = (
- float(results_match.group(5)) *
- 1000000 / max_theoretical_mfps * 100)
+ (100 * float(results_match.group(5)) * 1000000) / max_theoretical_fps)
moongen_results[ResultsConstants.B2B_TX_COUNT] = (
float(results_match.group(1)))
@@ -512,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.
#
@@ -521,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:
@@ -557,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))
@@ -586,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'.
@@ -630,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
@@ -671,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))
@@ -701,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
@@ -730,14 +755,14 @@ 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'.
#
# Start transmission and immediately return. Do not wait for results.
#
- self._logger.info("In moongen start_rfc2544_back2back method")
+ self._logger.info("In Moongen start_rfc2544_back2back method")
return NotImplementedError(
'Moongen start back2back traffic not implemented')
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/XenaDriver.py b/tools/pkt_gen/xena/XenaDriver.py
index aa8443c9..d3862312 100644
--- a/tools/pkt_gen/xena/XenaDriver.py
+++ b/tools/pkt_gen/xena/XenaDriver.py
@@ -1001,9 +1001,21 @@ class XenaTXStats(object):
mydict = statdict
return mydict
-
def aggregate_stats(stat1, stat2):
"""
+ Judge whether stat1 and stat2 both have same key, if both have same key,
+ call the aggregate fuction, else use the stat1's value
+ """
+ newstat = dict()
+ for keys in stat1.keys():
+ if keys in stat2 and isinstance(stat1[keys], dict):
+ newstat[keys] = aggregate(stat1[keys], stat2[keys])
+ else:
+ newstat[keys] = stat1[keys]
+ return newstat
+
+def aggregate(stat1, stat2):
+ """
Recursive function to aggregate two sets of statistics. This is used when
bi directional traffic is done and statistics need to be calculated based
on two sets of statistics.
@@ -1014,7 +1026,7 @@ def aggregate_stats(stat1, stat2):
newstat = dict()
for (keys1, keys2) in zip(stat1.keys(), stat2.keys()):
if isinstance(stat1[keys1], dict):
- newstat[keys1] = aggregate_stats(stat1[keys1], stat2[keys2])
+ newstat[keys1] = aggregate(stat1[keys1], stat2[keys2])
else:
if not isinstance(stat1[keys1], int) and not isinstance(
[keys1], float):
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py
index 7dd4b90b..8d45053e 100755
--- a/tools/pkt_gen/xena/xena.py
+++ b/tools/pkt_gen/xena/xena.py
@@ -25,6 +25,7 @@ Xena Traffic Generator Model
# python imports
import binascii
import logging
+import os
import subprocess
import sys
from time import sleep
@@ -50,6 +51,7 @@ from tools.pkt_gen.xena.XenaDriver import (
XenaManager,
)
+
class Xena(ITrafficGenerator):
"""
Xena Traffic generator wrapper class
@@ -65,6 +67,19 @@ class Xena(ITrafficGenerator):
self._duration = None
self.tx_stats = None
self.rx_stats = None
+ self._log_handle = None
+
+ user_home = os.path.expanduser('~')
+ self._log_path = '{}/Xena/Xena2544-2G/Logs/xena2544.log'.format(
+ user_home)
+
+ # make the folder and log file if they doesn't exist
+ if not os.path.exists(self._log_path):
+ os.makedirs(os.path.dirname(self._log_path))
+
+ # empty the file contents
+ open(self._log_path, 'w').close()
+
@property
def traffic_defaults(self):
@@ -99,7 +114,7 @@ class Xena(ITrafficGenerator):
root[0][1][0][0].get('PortRxBpsL1')) + float(
root[0][1][0][1].get('PortRxBpsL1')))/ 1000000
results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
- 100 - int(root[0][1][0].get('TotalLossRatioPcnt'))) * float(
+ 100 - float(root[0][1][0].get('TotalLossRatioPcnt'))) * float(
root[0][1][0].get('TotalTxRatePcnt'))/100
results[ResultsConstants.TX_RATE_FPS] = root[0][1][0].get(
'TotalTxRateFps')
@@ -260,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
@@ -290,15 +305,26 @@ 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()
+ j_file.modify_2544_tput_options(
+ settings.getValue('TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE'),
+ settings.getValue('TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE'),
+ settings.getValue('TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE'),
+ settings.getValue(
+ 'TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION'),
+ settings.getValue(
+ 'TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD'),
+ settings.getValue(
+ 'TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD')
+ )
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[
@@ -451,6 +477,44 @@ class Xena(ITrafficGenerator):
self.rx_stats = self.xmanager.ports[1].get_rx_stats()
sleep(1)
+ def _start_xena_2544(self):
+ """
+ Start the xena2544 exe.
+ :return: None
+ """
+ args = ["mono", "./tools/pkt_gen/xena/Xena2544.exe", "-c",
+ "./tools/pkt_gen/xena/profiles/2bUsed.x2544", "-e", "-r",
+ "./tools/pkt_gen/xena", "-u",
+ settings.getValue('TRAFFICGEN_XENA_USER')]
+ # Sometimes Xena2544.exe completes, but mono holds the process without
+ # releasing it, this can cause a deadlock of the main thread. Use the
+ # xena log file as a way to detect this.
+ self._log_handle = open(self._log_path, 'r')
+ # read the contents of the log before we start so the next read in the
+ # wait method are only looking at the text from this test instance
+ self._log_handle.read()
+ self.mono_pipe = subprocess.Popen(args, stdout=sys.stdout)
+
+ def _wait_xena_2544_complete(self):
+ """
+ Wait for Xena2544.exe completion.
+ :return: None
+ """
+ data = ''
+ while True:
+ try:
+ self.mono_pipe.wait(60)
+ self._log_handle.close()
+ break
+ except subprocess.TimeoutExpired:
+ # check the log to see if Xena2544 has completed and mono is
+ # deadlocked.
+ data += self._log_handle.read()
+ if 'TestCompletedSuccessfully' in data:
+ self._log_handle.close()
+ self.mono_pipe.terminate()
+ break
+
def _stop_api_traffic(self):
"""
Stop traffic through the socket API
@@ -495,13 +559,11 @@ class Xena(ITrafficGenerator):
See ITrafficGenerator for description
"""
self._duration = duration
-
self._params.clear()
self._params['traffic'] = self.traffic_defaults.copy()
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
self._start_traffic_api(numpkts)
return self._stop_api_traffic()
@@ -517,7 +579,6 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
self._start_traffic_api(-1)
return self._stop_api_traffic()
@@ -533,7 +594,6 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
self._start_traffic_api(-1)
def stop_cont_traffic(self):
@@ -541,7 +601,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.
@@ -554,19 +614,14 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
+ self._setup_json_config(tests, lossrate, '2544_throughput')
+ self._start_xena_2544()
+ self._wait_xena_2544_complete()
- self._setup_json_config(trials, lossrate, '2544_throughput')
-
- args = ["mono", "./tools/pkt_gen/xena/Xena2544.exe", "-c",
- "./tools/pkt_gen/xena/profiles/2bUsed.x2544", "-e", "-r",
- "./tools/pkt_gen/xena", "-u",
- settings.getValue('TRAFFICGEN_XENA_USER')]
- self.mono_pipe = subprocess.Popen(args, stdout=sys.stdout)
- self.mono_pipe.communicate()
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'.
@@ -578,26 +633,19 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
- self._setup_json_config(trials, lossrate, '2544_throughput')
-
- args = ["mono", "./tools/pkt_gen/xena/Xena2544.exe", "-c",
- "./tools/pkt_gen/xena/profiles/2bUsed.x2544", "-e", "-r",
- "./tools/pkt_gen/xena", "-u",
- settings.getValue('TRAFFICGEN_XENA_USER')]
- self.mono_pipe = subprocess.Popen(args, stdout=sys.stdout)
+ self._setup_json_config(tests, lossrate, '2544_throughput')
+ self._start_xena_2544()
def wait_rfc2544_throughput(self):
"""Wait for and return results of RFC2544 test.
See ITrafficGenerator for description
"""
- self.mono_pipe.communicate()
- sleep(2)
+ self._wait_xena_2544_complete()
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.
@@ -610,47 +658,31 @@ class Xena(ITrafficGenerator):
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
- self._setup_json_config(trials, lossrate, '2544_b2b')
-
- args = ["mono", "./tools/pkt_gen/xena/Xena2544.exe", "-c",
- "./tools/pkt_gen/xena/profiles/2bUsed.x2544", "-e", "-r",
- "./tools/pkt_gen/xena", "-u",
- settings.getValue('TRAFFICGEN_XENA_USER')]
- self.mono_pipe = subprocess.Popen(
- args, stdout=sys.stdout)
- self.mono_pipe.communicate()
+ 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'.
See ITrafficGenerator for description
"""
self._duration = duration
-
self._params.clear()
self._params['traffic'] = self.traffic_defaults.copy()
if traffic:
self._params['traffic'] = merge_spec(self._params['traffic'],
traffic)
-
- self._setup_json_config(trials, lossrate, '2544_b2b')
-
- args = ["mono", "./tools/pkt_gen/xena/Xena2544.exe", "-c",
- "./tools/pkt_gen/xena/profiles/2bUsed.x2544", "-e", "-r",
- "./tools/pkt_gen/xena", "-u",
- settings.getValue('TRAFFICGEN_XENA_USER')]
- self.mono_pipe = subprocess.Popen(
- args, stdout=sys.stdout)
+ self._setup_json_config(tests, lossrate, '2544_b2b')
+ self._start_xena_2544()
def wait_rfc2544_back2back(self):
"""Wait and set results of RFC2544 test.
"""
- self.mono_pipe.communicate()
- sleep(2)
+ self._wait_xena_2544_complete()
root = ET.parse(r'./tools/pkt_gen/xena/xena2544-report.xml').getroot()
return Xena._create_throughput_result(root)
diff --git a/tools/pkt_gen/xena/xena_json.py b/tools/pkt_gen/xena/xena_json.py
index 2a15a932..1ce7b46f 100644
--- a/tools/pkt_gen/xena/xena_json.py
+++ b/tools/pkt_gen/xena/xena_json.py
@@ -233,6 +233,22 @@ class XenaJSON(object):
self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
'Enabled'] = 'true'
+ def modify_2544_tput_options(self, initial_value, minimum_value,
+ maximum_value, value_resolution,
+ use_pass_threshhold, pass_threshhold):
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['InitialValue'] = initial_value
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['MinimumValue'] = minimum_value
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['MaximumValue'] = maximum_value
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['ValueResolution'] = value_resolution
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['UsePassThreshold'] = use_pass_threshhold
+ self.json_data['TestOptions']['TestTypeOptionMap']['Throughput'][
+ 'RateIterationOptions']['PassThreshold'] = pass_threshhold
+
def set_chassis_info(self, hostname, pwd):
"""
Set the chassis info
diff --git a/tools/systeminfo.py b/tools/systeminfo.py
index 9d8eb5cb..50dc17e0 100644
--- a/tools/systeminfo.py
+++ b/tools/systeminfo.py
@@ -223,22 +223,45 @@ def get_version(app_name):
app_git_tag = get_git_tag(S.getValue('OVS_DIR'))
elif app_name.lower() in ['dpdk', 'testpmd']:
tmp_ver = ['', '', '']
- found = False
+ dpdk_16 = False
with open(app_version_file['dpdk']) as file_:
for line in file_:
if not line.strip():
continue
+ # DPDK version < 16
if line.startswith('#define RTE_VER_MAJOR'):
- found = True
tmp_ver[0] = line.rstrip('\n').split(' ')[2]
- if line.startswith('#define RTE_VER_MINOR'):
- found = True
- tmp_ver[1] = line.rstrip('\n').split(' ')[2]
- if line.startswith('#define RTE_VER_PATCH_LEVEL'):
- found = True
+ # DPDK version < 16
+ elif line.startswith('#define RTE_VER_PATCH_LEVEL'):
tmp_ver[2] = line.rstrip('\n').split(' ')[2]
-
- if found:
+ # DPDK version < 16
+ elif line.startswith('#define RTE_VER_PATCH_RELEASE'):
+ release = line.rstrip('\n').split(' ')[2]
+ if not '16' in release:
+ tmp_ver[2] += line.rstrip('\n').split(' ')[2]
+ # DPDK all versions
+ elif line.startswith('#define RTE_VER_MINOR'):
+ if dpdk_16:
+ tmp_ver[2] = line.rstrip('\n').split(' ')[2]
+ else:
+ tmp_ver[1] = line.rstrip('\n').split(' ')[2]
+ # DPDK all versions
+ elif line.startswith('#define RTE_VER_SUFFIX'):
+ tmp_ver[2] += line.rstrip('\n').split('"')[1]
+ # DPDK version >= 16
+ elif line.startswith('#define RTE_VER_YEAR'):
+ dpdk_16 = True
+ tmp_ver[0] = line.rstrip('\n').split(' ')[2]
+ # DPDK version >= 16
+ elif line.startswith('#define RTE_VER_MONTH'):
+ tmp_ver[1] = '{:0>2}'.format(line.rstrip('\n').split(' ')[2])
+ # DPDK version >= 16
+ elif line.startswith('#define RTE_VER_RELEASE'):
+ release = line.rstrip('\n').split(' ')[2]
+ if not '16' in release:
+ tmp_ver[2] += line.rstrip('\n').split(' ')[2]
+
+ if len(tmp_ver[0]):
app_version = '.'.join(tmp_ver)
app_git_tag = get_git_tag(S.getValue('RTE_SDK'))
elif app_name.lower().startswith('qemu'):
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index 9382edef..02ada4b5 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -338,16 +338,16 @@ class IVnfQemu(IVnf):
self.execute_and_wait('modprobe uio')
self.execute_and_wait('insmod %s/kmod/igb_uio.ko' %
S.getValue('RTE_TARGET'))
- self.execute_and_wait('./tools/dpdk_nic_bind.py --status')
+ self.execute_and_wait('./tools/dpdk*bind.py --status')
self.execute_and_wait(
- './tools/dpdk_nic_bind.py -u' ' ' +
+ './tools/dpdk*bind.py -u' ' ' +
S.getValue('GUEST_NET1_PCI_ADDRESS')[self._number] + ' ' +
S.getValue('GUEST_NET2_PCI_ADDRESS')[self._number])
self.execute_and_wait(
- './tools/dpdk_nic_bind.py -b igb_uio' ' ' +
+ './tools/dpdk*bind.py -b igb_uio' ' ' +
S.getValue('GUEST_NET1_PCI_ADDRESS')[self._number] + ' ' +
S.getValue('GUEST_NET2_PCI_ADDRESS')[self._number])
- self.execute_and_wait('./tools/dpdk_nic_bind.py --status')
+ self.execute_and_wait('./tools/dpdk*bind.py --status')
# build and run 'test-pmd'
self.execute_and_wait('cd ' + S.getValue('GUEST_OVS_DPDK_DIR') +
diff --git a/vnfs/qemu/qemu_pci_passthrough.py b/vnfs/qemu/qemu_pci_passthrough.py
index 1b55fdf2..951d6086 100644
--- a/vnfs/qemu/qemu_pci_passthrough.py
+++ b/vnfs/qemu/qemu_pci_passthrough.py
@@ -19,6 +19,7 @@
import logging
import subprocess
import os
+import glob
from conf import settings as S
from vnfs.qemu.qemu import IVnfQemu
@@ -26,7 +27,7 @@ from tools import tasks
from tools.module_manager import ModuleManager
_MODULE_MANAGER = ModuleManager()
-_RTE_PCI_TOOL = os.path.join(S.getValue('RTE_SDK'), 'tools', 'dpdk_nic_bind.py')
+_RTE_PCI_TOOL = glob.glob(os.path.join(S.getValue('RTE_SDK'), 'tools', 'dpdk*bind.py'))[0]
class QemuPciPassthrough(IVnfQemu):
"""
@@ -43,8 +44,8 @@ class QemuPciPassthrough(IVnfQemu):
# in case of SRIOV and PCI passthrough we must ensure, that MAC addresses are swapped
if S.getValue('SRIOV_ENABLED') and not self._testpmd_fwd_mode.startswith('mac'):
self._logger.info("SRIOV detected, forwarding mode of testpmd was changed from '%s' to '%s'",
- self._testpmd_fwd_mode, 'mac_retry')
- self._testpmd_fwd_mode = 'mac_retry'
+ self._testpmd_fwd_mode, 'mac')
+ self._testpmd_fwd_mode = 'mac'
for nic in self._nics:
self._cmd += ['-device', 'vfio-pci,host=' + nic['pci']]
diff --git a/vsperf b/vsperf
index f2f443be..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())
@@ -557,13 +557,13 @@ def main():
_LOGGER.error("Cannot specify tests with both positional args and --test.")
sys.exit(1)
- # sriov handling
- settings.setValue('SRIOV_ENABLED', enable_sriov(settings.getValue('WHITELIST_NICS')))
-
# modify NIC configuration to decode enhanced PCI IDs
wl_nics_orig = list(networkcard.check_pci(pci) for pci in settings.getValue('WHITELIST_NICS'))
settings.setValue('WHITELIST_NICS_ORIG', wl_nics_orig)
+ # sriov handling is performed on checked/expanded PCI IDs
+ settings.setValue('SRIOV_ENABLED', enable_sriov(wl_nics_orig))
+
nic_list = []
for nic in wl_nics_orig:
tmp_nic = networkcard.get_nic_info(nic)
diff --git a/vswitches/ovs.py b/vswitches/ovs.py
index 115ab19b..243619b6 100644
--- a/vswitches/ovs.py
+++ b/vswitches/ovs.py
@@ -38,15 +38,15 @@ class IVSwitchOvs(IVSwitch, tasks.Process):
see the interface.
"""
_logfile = os.path.join(settings.getValue('LOG_DIR'), settings.getValue('LOG_FILE_VSWITCHD'))
- _ovsdb_pidfile_path = os.path.join(settings.getValue('LOG_DIR'), "ovsdb_pidfile.pid")
- _vswitchd_pidfile_path = os.path.join(settings.getValue('LOG_DIR'), "vswitchd_pidfile.pid")
+ _ovsdb_pidfile_path = os.path.join(_OVS_VAR_DIR, "ovsdb-server.pid")
+ _vswitchd_pidfile_path = os.path.join(_OVS_VAR_DIR, "ovs-vswitchd.pid")
_proc_name = 'ovs-vswitchd'
def __init__(self):
"""See IVswitch for general description
"""
self._logger = logging.getLogger(__name__)
- self._expect = None
+ self._expect = r'bridge|INFO|ovs-vswitchd'
self._timeout = 30
self._bridges = {}
self._vswitchd_args = ['--pidfile=' + self._vswitchd_pidfile_path,
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 2d424bc5..0950c426 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -39,7 +39,6 @@ class OvsDpdkVhost(IVSwitchOvs):
def __init__(self):
super(OvsDpdkVhost, self).__init__()
self._logger = logging.getLogger(__name__)
- self._expect = r'EAL: Master l*core \d+ is ready'
vswitchd_args = []
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index 89023a79..f880dfaf 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -41,7 +41,6 @@ class OvsVanilla(IVSwitchOvs):
self._logger = logging.getLogger(__name__)
self._vswitchd_args += ["unix:%s" % self.get_db_sock_path()]
self._vswitchd_args += settings.getValue('VSWITCHD_VANILLA_ARGS')
- self._expect = "db.sock: connected"
self._module_manager = ModuleManager()
def start(self):