summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/03_traffic.conf5
-rw-r--r--conf/10_custom.conf5
-rw-r--r--core/pktfwd_controller.py8
-rw-r--r--docs/configguide/index.rst1
-rw-r--r--docs/configguide/trafficgen.rst13
-rw-r--r--docs/configguide/upgrade.rst189
-rw-r--r--tools/pkt_gen/xena/XenaDriver.py9
-rwxr-xr-xtools/pkt_gen/xena/xena.py27
-rw-r--r--vswitches/ovs_dpdk_vhost.py5
9 files changed, 247 insertions, 15 deletions
diff --git a/conf/03_traffic.conf b/conf/03_traffic.conf
index 72324660..4931e977 100644
--- a/conf/03_traffic.conf
+++ b/conf/03_traffic.conf
@@ -374,6 +374,11 @@ TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+# Xena Continuous traffic options
+# Please reference xena documentation before making changes to these settings
+TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED = True
+TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION = 3
+
# Xena Configuration -- END
###########################
diff --git a/conf/10_custom.conf b/conf/10_custom.conf
index 498ac29f..ece733d9 100644
--- a/conf/10_custom.conf
+++ b/conf/10_custom.conf
@@ -88,6 +88,11 @@ TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+# Xena Continuous traffic options
+# Please reference xena documentation before making changes to these settings
+TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED = True
+TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION = 3
+
###################################################
# MoonGen Configuration and Connection Info-- BEGIN
diff --git a/core/pktfwd_controller.py b/core/pktfwd_controller.py
index a0e14d19..785c6f89 100644
--- a/core/pktfwd_controller.py
+++ b/core/pktfwd_controller.py
@@ -16,6 +16,7 @@
"""
import logging
+from conf import settings
class PktFwdController(object):
"""Packet forwarder controller for P2P deployment scenario.
@@ -32,7 +33,8 @@ class PktFwdController(object):
self._deployment = deployment
self._logger = logging.getLogger(__name__)
self._pktfwd_class = pktfwd_class
- self._pktfwd = pktfwd_class(guest=True if deployment == "pvp" else False)
+ self._pktfwd = pktfwd_class(guest=True if deployment == "pvp" and
+ settings.getValue('VNF') != "QemuPciPassthrough" else False)
self._logger.debug('Creation using ' + str(self._pktfwd_class))
def setup(self):
@@ -66,13 +68,13 @@ class PktFwdController(object):
def __enter__(self):
if self._deployment.find("p2p") == 0:
self.setup()
- elif self._deployment == "pvp":
+ elif self._deployment == "pvp" and settings.getValue('VNF') != "QemuPciPassthrough":
self.setup_for_guest()
def __exit__(self, type_, value, traceback):
if self._deployment.find("p2p") == 0:
self.stop()
- elif self._deployment == "pvp":
+ elif self._deployment == "pvp" and settings.getValue('VNF') != "QemuPciPassthrough":
self.stop()
def get_pktfwd(self):
diff --git a/docs/configguide/index.rst b/docs/configguide/index.rst
index c9bdccf7..b4c8575e 100644
--- a/docs/configguide/index.rst
+++ b/docs/configguide/index.rst
@@ -11,4 +11,5 @@ VSPERF Installation Guide
:maxdepth: 3
installation.rst
+ upgrade.rst
trafficgen.rst
diff --git a/docs/configguide/trafficgen.rst b/docs/configguide/trafficgen.rst
index 5190bc8e..b66a1787 100644
--- a/docs/configguide/trafficgen.rst
+++ b/docs/configguide/trafficgen.rst
@@ -516,6 +516,19 @@ Each value modifies the behavior of rfc 2544 throughput testing. Refer to your
Xena documentation to understand the behavior changes in modifying these
values.
+Continuous Traffic Testing
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Xena continuous traffic by default does a 3 second learning preemption to allow
+the DUT to receive learning packets before a continuous test is performed. If
+a custom test case requires this learning be disabled, you can disable the option
+or modify the length of the learning by modifying the following settings.
+
+.. code-block:: console
+
+ TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED = False
+ TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION = 3
+
MoonGen
-------
diff --git a/docs/configguide/upgrade.rst b/docs/configguide/upgrade.rst
new file mode 100644
index 00000000..3a970c6a
--- /dev/null
+++ b/docs/configguide/upgrade.rst
@@ -0,0 +1,189 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Intel Corporation, AT&T and others.
+
+=====================
+Upgrading vswitchperf
+=====================
+
+Generic
+-------
+
+In case, that VSPERF is cloned from git repository, then it is easy to
+upgrade it to the newest stable version or to the development version.
+
+You could get a list of stable releases by ``git`` command. It is necessary
+to update local git repository first.
+
+**NOTE:** Git commands must be executed from directory, where VSPERF repository
+was cloned, e.g. ``vswitchperf``.
+
+Update of local git repository:
+
+.. code:: bash
+
+ $ git pull
+
+List of stable releases:
+
+.. code:: bash
+
+ $ git tag
+
+ brahmaputra.1.0
+ colorado.1.0
+ colorado.2.0
+ colorado.3.0
+ danube.1.0
+
+You could select which stable release should be used. For example, select ``danube.1.0``:
+
+.. code:: bash
+
+ $ git checkout danube.1.0
+
+
+Development version of VSPERF can be selected by:
+
+.. code:: bash
+
+ $ git checkout master
+
+Colorado to Danube upgrade notes
+--------------------------------
+
+Obsoleted features
+~~~~~~~~~~~~~~~~~~
+
+Support of vHost Cuse interface has been removed in Danube release. It means,
+that it is not possible to select ``QemuDpdkVhostCuse`` as a VNF anymore. Option
+``QemuDpdkVhostUser`` should be used instead. Please check you configuration files
+and definition of your testcases for any occurrence of:
+
+.. code:: python
+
+ VNF = "QemuDpdkVhostCuse"
+
+or
+
+.. code:: python
+
+ "VNF" : "QemuDpdkVhostCuse"
+
+In case that ``QemuDpdkVhostCuse`` is found, it must be modified to ``QemuDpdkVhostUser``.
+
+**NOTE:** In case that execution of VSPERF is automated by scripts (e.g. for
+CI purposes), then these scripts must be checked and updated too. It means,
+that any occurrence of:
+
+.. code:: bash
+
+ ./vsperf --vnf QemuDpdkVhostCuse
+
+must be updated to:
+
+.. code:: bash
+
+ ./vsperf --vnf QemuDpdkVhostUser
+
+Configuration
+~~~~~~~~~~~~~
+
+Several configuration changes were introduced during Danube release. The most
+important changes are discussed below.
+
+Paths to DPDK, OVS and QEMU
+===========================
+
+VSPERF uses external tools for proper testcase execution. Thus it is important
+to properly configure paths to these tools. In case that tools are installed
+by installation scripts and are located inside ``./src`` directory inside
+VSPERF home, then no changes are needed. On the other hand, if path settings
+was changed by custom configuration file, then it is required to update configuration
+accordingly. Please check your configuration files for following configuration
+options:
+
+.. code:: bash
+
+ OVS_DIR
+ OVS_DIR_VANILLA
+ OVS_DIR_USER
+ OVS_DIR_CUSE
+
+ RTE_SDK_USER
+ RTE_SDK_CUSE
+
+ QEMU_DIR
+ QEMU_DIR_USER
+ QEMU_DIR_CUSE
+ QEMU_BIN
+
+In case that any of these options is defined, then configuration must be updated.
+All paths to the tools are now stored inside ``PATHS`` dictionary. Please
+refer to the paths-documentation_ and update your configuration where necessary.
+
+.. _paths-documentation: http://artifacts.opnfv.org/vswitchperf/docs/index.html#configuration-of-paths-dictionary
+
+Configuration change via CLI
+============================
+
+In previous releases it was possible to modify selected configuration options
+(mostly VNF specific) via command line interface, i.e. by ``--test-params``
+argument. This concept has been generalized in Danube release and it is
+possible to modify any configuration parameter via CLI or via **Parameters**
+section of the testcase definition. Old configuration options were obsoleted
+and it is required to specify configuration parameter name in the same form
+as it is defined inside configuration file, i.e. in uppercase. Please
+refer to the overriding-parameters-documentation_ for additional details.
+
+**NOTE:** In case that execution of VSPERF is automated by scripts (e.g. for
+CI purposes), then these scripts must be checked and updated too. It means,
+that any occurrence of
+
+.. code:: bash
+
+ guest_loopback
+ vanilla_tgen_port1_ip
+ vanilla_tgen_port1_mac
+ vanilla_tgen_port2_ip
+ vanilla_tgen_port2_mac
+ tunnel_type
+
+shall be changed to the uppercase form and data type of entered values must
+match to data types of original values from configuration files.
+
+In case that ``guest_nic1_name`` or ``guest_nic2_name`` is changed,
+then new dictionary ``GUEST_NICS`` must be modified accordingly.
+Please see guest-configuration_ and ``conf/04_vnf.conf`` for additional
+details.
+
+.. _overriding-parameters-documentation: http://artifacts.opnfv.org/vswitchperf/docs/index.html#overriding-values-defined-in-configuration-files
+.. _guest-configuration: http://artifacts.opnfv.org/vswitchperf/docs/index.html#configuration-of-guest-options
+
+Traffic configuration via CLI
+=============================
+
+In previous releases it was possible to modify selected attributes of generated
+traffic via command line interface. This concept has been enhanced in Danube
+release and it is now possible to modify all traffic specific options via
+CLI or by ``TRAFFIC`` dictionary in configuration file. Detailed description
+is available at configuration-of-traffic-dictionary_ section of documentation.
+
+Please check your automated scripts for VSPERF execution for following CLI
+parameters and update them according to the documentation:
+
+.. code:: bash
+
+ bidir
+ duration
+ frame_rate
+ iload
+ lossrate
+ multistream
+ pkt_sizes
+ pre-installed_flows
+ rfc2544_tests
+ stream_type
+ traffic_type
+
+.. _configuration-of-traffic-dictionary: http://artifacts.opnfv.org/vswitchperf/docs/index.html#configuration-of-traffic-dictionary
diff --git a/tools/pkt_gen/xena/XenaDriver.py b/tools/pkt_gen/xena/XenaDriver.py
index 04a99e9d..e144514f 100644
--- a/tools/pkt_gen/xena/XenaDriver.py
+++ b/tools/pkt_gen/xena/XenaDriver.py
@@ -57,6 +57,7 @@ CMD_LOGOFF = 'c_logoff'
CMD_OWNER = 'c_owner'
CMD_PORT = ';Port:'
CMD_PORT_IP = 'p_ipaddress'
+CMD_PORT_LEARNING = 'p_autotrain'
CMD_RESERVE = 'p_reservation reserve'
CMD_RELEASE = 'p_reservation release'
CMD_RELINQUISH = 'p_reservation relinquish'
@@ -560,6 +561,14 @@ class XenaPort(object):
"on" if on else "off"), self)
return self._manager.driver.ask_verify(command)
+ def set_port_learning(self, interval):
+ """Start port learning with the interval in seconds specified. 0 disables port learning
+ :param: interval as int
+ :return: Boolean True if response OK, False if error.
+ """
+ command = make_port_command('{} {}'.format(CMD_PORT_LEARNING, interval), self)
+ return self._manager.driver.ask_verify(command)
+
def set_port_ip(self, ip_addr, cidr, gateway, wild='255'):
"""
Set the port ip address of the specific port
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py
index 20577e8d..e251c1d6 100755
--- a/tools/pkt_gen/xena/xena.py
+++ b/tools/pkt_gen/xena/xena.py
@@ -188,9 +188,10 @@ class Xena(ITrafficGenerator):
result_dict[ResultsConstants.TX_FRAMES] = self.tx_stats.data[
self.tx_stats.pt_stream_keys[0]]['packets']
result_dict[ResultsConstants.TX_RATE_FPS] = self.tx_stats.data[
- self.tx_stats.pt_stream_keys[0]]['pps']
- result_dict[ResultsConstants.TX_RATE_MBPS] = self.tx_stats.data[
- self.tx_stats.pt_stream_keys[0]]['bps'] / 1000000
+ self.tx_stats.pt_stream_keys[0]]['packets'] / self._duration
+ result_dict[ResultsConstants.TX_RATE_MBPS] = ((
+ self.tx_stats.data[self.tx_stats.pt_stream_keys[0]]['bytes']
+ * 8) / 1000000) / self._duration
result_dict[ResultsConstants.TX_BYTES] = self.tx_stats.data[
self.tx_stats.pt_stream_keys[0]]['bytes']
# tx rate percent may need to be halved if bi directional
@@ -214,10 +215,11 @@ class Xena(ITrafficGenerator):
'pr_tpldstraffic']['0']['packets']
result_dict[
ResultsConstants.THROUGHPUT_RX_FPS] = self.rx_stats.data[
- 'pr_tpldstraffic']['0']['pps']
+ 'pr_tpldstraffic']['0']['packets'] / self._duration
result_dict[
- ResultsConstants.THROUGHPUT_RX_MBPS] = self.rx_stats.data[
- 'pr_tpldstraffic']['0']['bps'] / 1000000
+ ResultsConstants.THROUGHPUT_RX_MBPS] = ((
+ self.rx_stats.data['pr_tpldstraffic']['0']['bytes']
+ *8) / 1000000) / self._duration
result_dict[ResultsConstants.RX_BYTES] = self.rx_stats.data[
'pr_tpldstraffic']['0']['bytes']
# throughput percent may need to be halved if bi directional
@@ -383,6 +385,15 @@ class Xena(ITrafficGenerator):
# Clear port configuration for a clean start
self.xmanager.ports[0].reset_port()
self.xmanager.ports[1].reset_port()
+ if settings.getValue('TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED'):
+ # turn on port learning
+ self.xmanager.ports[0].set_port_learning(1)
+ self.xmanager.ports[1].set_port_learning(1)
+ sleep(settings.getValue('TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION'))
+ # turn off port learning
+ self.xmanager.ports[0].set_port_learning(0)
+ self.xmanager.ports[1].set_port_learning(0)
+ sleep(1)
self.xmanager.ports[0].clear_stats()
self.xmanager.ports[1].clear_stats()
@@ -395,6 +406,8 @@ class Xena(ITrafficGenerator):
settings.getValue('TRAFFICGEN_XENA_PORT1_IP'),
settings.getValue('TRAFFICGEN_XENA_PORT1_CIDR'),
settings.getValue('TRAFFICGEN_XENA_PORT1_GATEWAY'))
+ self.xmanager.ports[0].set_port_time_limit(self._duration)
+ self.xmanager.ports[1].set_port_time_limit(self._duration)
def setup_stream(stream, port, payload_id, flip_addr=False):
"""
@@ -459,7 +472,7 @@ class Xena(ITrafficGenerator):
if not self.xmanager.ports[1].traffic_on():
self._logger.error(
"Failure to start port 1. Check settings and retry.")
- sleep(self._duration + 1)
+ sleep(self._duration + 5) # the extra 5 seconds is to allow packets in flight to complete
# getting results
if self._params['traffic']['bidir'] == 'True':
# need to aggregate out both ports stats and assign that data
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index a2731478..40f4533b 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -133,11 +133,6 @@ class OvsDpdkVhost(IVSwitchOvs):
vhost_count = self._get_port_count('type=dpdkvhostuser')
port_name = 'dpdkvhostuser' + str(vhost_count)
params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhostuser']
- # multi queue enable
- if int(settings.getValue('VSWITCH_DPDK_MULTI_QUEUES')) and \
- not settings.getValue('OVS_OLD_STYLE_MQ'):
- params += ['options:n_rxq={}'.format(
- settings.getValue('VSWITCH_DPDK_MULTI_QUEUES'))]
of_port = bridge.add_port(port_name, params)
return (port_name, of_port)