aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rwxr-xr-xconf/01_testcases.conf13
-rw-r--r--conf/02_vswitch.conf8
-rw-r--r--conf/03_traffic.conf23
-rw-r--r--conf/04_vnf.conf36
-rw-r--r--conf/10_custom.conf4
-rw-r--r--conf/__init__.py78
-rw-r--r--conf/integration/01_testcases.conf49
-rw-r--r--conf/integration/03_traffic.conf3
8 files changed, 166 insertions, 48 deletions
diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf
index 55cce1cf..f30c1912 100755
--- a/conf/01_testcases.conf
+++ b/conf/01_testcases.conf
@@ -115,11 +115,14 @@
# # stated in configuration files or value
# # specified on command line through --trafficgen
# # parameter.
-# "Parameters" : "pkt_sizes=512" # Defines list of test parameters used for test
-# # execution. It will override any values defined
-# # by TEST_PARAMS option stated in configuration
-# # files or values specified on command line through
-# # --test-params parameter.
+# "Parameters" : {'TRAFFICGEN_PKT_SIZES' : (512,)}
+# # Dictionary with testcase specific configuration
+# # environment. Specified parameters will be modified
+# # before the test execution and their original values will
+# # be restored after TC finishes. This dictionary will
+# # override any values defined by TEST_PARAMS option
+# # stated in configuration files or values specified
+# # on command line through --test-params parameter.
# "Test Modifier": [FrameMod|Other],
# "Dependency": [Test_Case_Name |None],
diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf
index f9b8f957..2b74dae9 100644
--- a/conf/02_vswitch.conf
+++ b/conf/02_vswitch.conf
@@ -23,11 +23,15 @@ OVS_CMD_TIMEOUT = 10
RTE_TARGET = 'x86_64-native-linuxapp-gcc'
# list of NIC HWIDs to which traffic generator is connected
-# In case of NIC with SRIOV suport, it is possible to define,
+# e.g. WHITELIST_NICS = ['05:00.0', '05:00.1']
+# NIC HWIDs for given network device name can be retrieved
+# by call of ehtool:
+# e.g. ethtool -i eth0
+# In case of NIC with SRIOV support, it is possible to define,
# which virtual function should be used
# e.g. value '0000:05:00.0|vf1' will configure two VFs and second VF
# will be used for testing
-WHITELIST_NICS = ['0000:05:00.0', '0000:05:00.1']
+WHITELIST_NICS = []
# vhost character device file used by dpdkvhostport QemuWrap cases
VHOST_DEV_FILE = 'ovs-vhost-net'
diff --git a/conf/03_traffic.conf b/conf/03_traffic.conf
index 98bce2c5..d7327629 100644
--- a/conf/03_traffic.conf
+++ b/conf/03_traffic.conf
@@ -34,6 +34,15 @@ TRAFFICGEN = 'Dummy'
# Expand like this: (64, 128, 256, 512, 1024)
TRAFFICGEN_PKT_SIZES = (64,)
+TRAFFICGEN_DURATION = 30
+
+TRAFFICGEN_RFC2544_TESTS = 1
+TRAFFICGEN_RFC2889_TRIALS = 1
+TRAFFICGEN_LOSSRATE = 0.0
+
+#############################
+# IXIA Configuration -- BEGIN
+
# path to 'ixos' install path
TRAFFICGEN_IXIA_ROOT_DIR = '/opt/ixos'
@@ -61,8 +70,16 @@ TRAFFICGEN_IXNET_TESTER_RESULT_DIR = ''
# as the previous one
TRAFFICGEN_IXNET_DUT_RESULT_DIR = ''
+# directory with 3rd party scripts generated by IXIA tools
+TRAFFICGEN_IXIA_3RD_PARTY = os.path.join(ROOT_DIR, '3rd_party/ixia')
+
+# default TCL script, which will be used for IXNETWORK configuration
TRAFFICGEN_IXNET_TCL_SCRIPT = 'ixnetrfc2544.tcl'
+# IXIA Configuration -- END
+###########################
+
+
###########################################
# Spirent TestCenter Configuration -- BEGIN
@@ -168,6 +185,9 @@ TRAFFICGEN_STC_VERBOSE = "True"
# Spirent TestCenter Configuration -- END
#########################################
+#############################
+# Xena Configuration -- BEGIN
+
# Xena traffic generator connection info
TRAFFICGEN_XENA_IP = ''
TRAFFICGEN_XENA_PORT1 = ''
@@ -194,6 +214,9 @@ TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
+# Xena Configuration -- END
+###########################
+
###################################################
# MoonGen Configuration and Connection Info-- BEGIN
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index e3a4824b..75f107e8 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -90,23 +90,24 @@ GUEST_TIMEOUT = [180]
GUEST_BOOT_DRIVE_TYPE = ['scsi']
GUEST_SHARED_DRIVE_TYPE = ['scsi']
-# 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:
# 'testpmd' - testpmd from dpdk will be built and used
# 'l2fwd' - l2fwd module provided by Huawei will be built and used
# 'linux_bridge' - linux bridge will be configured
# 'buildin' - nothing will be configured by vsperf; VM image must
# ensure traffic forwarding between its interfaces
-# This configuration option can be overridden by CLI SCALAR option
-# guest_loopback, e.g. --test-params "guest_loopback=l2fwd"
# For 2 VNFs you may use ['testpmd', 'l2fwd']
GUEST_LOOPBACK = ['testpmd']
+# guest driver binding option; support options are:
+# 'igb_uio_from_src' - build igb_uio driver from downloaded source files
+# 'uio_pci_generic' - use uio_pci_generic driver
+# 'vfio_no_iommu' - use unsafe vfio driver without iommu (requires
+# image with supported kernel 4.5 or greater and
+# dpdk 16.04 or greater. VSPerf vloop image does not
+# support this mode.
+GUEST_DPDK_BIND_DRIVER = ['igb_uio_from_src']
+
# username for guest image
GUEST_USERNAME = ['root']
@@ -189,19 +190,16 @@ GUEST_BRIDGE_IP = ['#IP(1.1.1.5)/16']
# Guest TESTPMD configuration
# ############################
+# set of configuration parameters, which will be passed to the testpmd
+# executed inside the guest
+# Note: Testpmd must be executed in interactive mode. It means, that
+# VSPERF won't work correctly if '-i' will be removed.
+GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- '
+ '--burst=64 -i --txqflags=0xf00 '
+ '--disable-hw-vlan']
+
# 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']
-
-# Set the CPU mask for testpmd loopback. To bind to specific guest CPUs use -l
-# GUEST_TESTPMD_CPU_MASK = ['-l 0,1']
-GUEST_TESTPMD_CPU_MASK = ['-c 0x3']
-
-# Testpmd multi-core config. Leave at 0's for disabled. Will not enable unless
-# GUEST_NIC_QUEUES are > 0. For bi directional traffic NB_CORES must be equal
-# to (RXQ + TXQ).
-GUEST_TESTPMD_NB_CORES = [0]
-GUEST_TESTPMD_TXQ = [0]
-GUEST_TESTPMD_RXQ = [0]
diff --git a/conf/10_custom.conf b/conf/10_custom.conf
index b3707149..929d2679 100644
--- a/conf/10_custom.conf
+++ b/conf/10_custom.conf
@@ -47,7 +47,7 @@ TRAFFICGEN_STC_WEST_INTF_GATEWAY_ADDR = "192.85.1.3"
TRAFFICGEN_IXIA_CARD = ''
TRAFFICGEN_IXIA_PORT1 = ''
TRAFFICGEN_IXIA_PORT2 = ''
-TRAFFICGEN_IXIA_LIB_PATH = '/opt/ixos/lib/ixTcl1.0'
+TRAFFICGEN_IXIA_ROOT_DIR = '/opt/ixos'
TRAFFICGEN_IXNET_LIB_PATH = '/opt/ixnet/IxTclNetwork'
# Ixia traffic generator
@@ -103,7 +103,7 @@ TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
# MoonGen Configuration and Connection Info-- END
###################################################
-#TEST_PARAMS = {'pkt_sizes':'64'}
+#TEST_PARAMS = {'TRAFFICGEN_PKT_SIZES':(64,)}
OPNFV_INSTALLER = "Fuel"
OPNFV_URL = "http://testresults.opnfv.org/testapi"
PACKAGE_LIST = "src/package-list.mk"
diff --git a/conf/__init__.py b/conf/__init__.py
index 4d6f57fe..2448d390 100644
--- a/conf/__init__.py
+++ b/conf/__init__.py
@@ -29,6 +29,10 @@ import netaddr
_LOGGER = logging.getLogger(__name__)
+# Special test parameters which are not part of standard VSPERF configuration
+_EXTRA_TEST_PARAMS = ['bidirectional', 'traffic_type', 'iload', 'tunnel_type',
+ 'multistream', 'stream_type', 'pre-installed_flows']
+
# regex to parse configuration macros from 04_vnf.conf
# it will select all patterns starting with # sign
# and returns macro parameters and step
@@ -49,7 +53,13 @@ class Settings(object):
"""Return a settings item value
"""
if attr in self.__dict__:
- return getattr(self, attr)
+ if attr == 'TEST_PARAMS':
+ return getattr(self, attr)
+ else:
+ master_value = getattr(self, attr)
+ # Check if parameter value was overridden by CLI option
+ cli_value = get_test_param(attr, None)
+ return cli_value if cli_value else master_value
else:
raise AttributeError("%r object has no attribute %r" %
(self.__class__, attr))
@@ -136,6 +146,24 @@ class Settings(object):
for key in os.environ:
setattr(self, key, os.environ[key])
+ def check_test_params(self):
+ """
+ Check all parameters defined inside TEST_PARAMS for their
+ existence. In case that non existing vsperf parmeter name
+ is detected, then VSPER will raise a runtime error.
+ """
+ unknown_keys = []
+ for key in settings.getValue('TEST_PARAMS'):
+ if key == 'TEST_PARAMS':
+ raise RuntimeError('It is not allowed to define TEST_PARAMS '
+ 'as a test parameter')
+ if key not in self.__dict__ and key not in _EXTRA_TEST_PARAMS:
+ unknown_keys.append(key)
+
+ if len(unknown_keys):
+ raise RuntimeError('Test parameters contain unknown configuration '
+ 'parameter(s): {}'.format(', '.join(unknown_keys)))
+
def check_vm_settings(self, vm_number):
"""
Check all VM related settings starting with GUEST_ prefix.
@@ -145,15 +173,12 @@ class Settings(object):
"""
for key in self.__dict__:
if key.startswith('GUEST_'):
- if (isinstance(self.__dict__[key], str) and
- self.__dict__[key].find('#') >= 0):
- self.__dict__[key] = [self.__dict__[key]]
+ value = self.getValue(key)
+ if isinstance(value, str) and value.find('#') >= 0:
self._expand_vm_settings(key, 1)
- self.__dict__[key] = self.__dict__[key][0]
- if isinstance(self.__dict__[key], list):
- if (len(self.__dict__[key]) < vm_number or
- str(self.__dict__[key][0]).find('#') >= 0):
+ if isinstance(value, list):
+ if len(value) < vm_number or str(value[0]).find('#') >= 0:
# expand configuration for all VMs
self._expand_vm_settings(key, vm_number)
@@ -161,7 +186,15 @@ class Settings(object):
"""
Expand VM option with given key for given number of VMs
"""
- master_value = self.__dict__[key][0]
+ tmp_value = self.getValue(key)
+ if isinstance(tmp_value, str):
+ scalar = True
+ master_value = tmp_value
+ tmp_value = [tmp_value]
+ else:
+ scalar = False
+ master_value = tmp_value[0]
+
master_value_str = str(master_value)
if master_value_str.find('#') >= 0:
self.__dict__[key] = []
@@ -190,9 +223,12 @@ class Settings(object):
value = ast.literal_eval(value)
self.__dict__[key].append(value)
else:
- for vmindex in range(len(self.__dict__[key]), vm_number):
+ for vmindex in range(len(tmp_value), vm_number):
self.__dict__[key].append(master_value)
+ if scalar:
+ self.__dict__[key] = self.__dict__[key][0]
+
_LOGGER.debug("Expanding option: %s = %s", key, self.__dict__[key])
def __str__(self):
@@ -203,7 +239,11 @@ class Settings(object):
Returns:
A human-readable string.
"""
- return pprint.pformat(self.__dict__)
+ tmp_dict = {}
+ for key in self.__dict__:
+ tmp_dict[key] = self.getValue(key)
+
+ return pprint.pformat(tmp_dict)
#
# validation methods used by step driven testcases
@@ -222,7 +262,6 @@ class Settings(object):
settings = Settings()
-
def get_test_param(key, default=None):
"""Retrieve value for test param ``key`` if available.
@@ -232,4 +271,17 @@ def get_test_param(key, default=None):
:returns: Value for ``key`` if found, else ``default``.
"""
test_params = settings.getValue('TEST_PARAMS')
- return test_params.get(key, default) if test_params else default
+ if key in test_params:
+ if not isinstance(test_params.get(key), str):
+ return test_params.get(key)
+ else:
+ # values are passed inside string from CLI, so we must retype them accordingly
+ try:
+ return ast.literal_eval(test_params.get(key))
+ except ValueError:
+ # for backward compatibility, we have to accept strings without quotes
+ _LOGGER.warning("Adding missing quotes around string value: %s = %s",
+ key, str(test_params.get(key)))
+ return str(test_params.get(key))
+ else:
+ return default
diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf
index 7b2f7079..a584845a 100644
--- a/conf/integration/01_testcases.conf
+++ b/conf/integration/01_testcases.conf
@@ -328,6 +328,7 @@ INTEGRATION_TESTS = [
"The encap and decap are performed inside the "
"virtual switch itself in each direction to avoid "
"the need of ingress overlay traffic."),
+ "Parameters": {'TRAFFICGEN_IXNET_TCL_SCRIPT' : 'ixnetrfc2544v2.tcl'},
},
{
"Name": "overlay_p2p_tput",
@@ -337,6 +338,7 @@ INTEGRATION_TESTS = [
"Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
"Tunnel Operation": "encapsulation",
"Description": "Overlay Encapsulation Throughput RFC2544 Test",
+ "Parameters": {'TRAFFICGEN_IXNET_TCL_SCRIPT' : 'ixnetrfc2544v2.tcl'},
},
{
"Name": "overlay_p2p_cont",
@@ -346,6 +348,7 @@ INTEGRATION_TESTS = [
"Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
"Tunnel Operation": "encapsulation",
"Description": "Overlay Encapsulation Continuous Stream",
+ "Parameters": {'TRAFFICGEN_IXNET_TCL_SCRIPT' : 'ixnetrfc2544v2.tcl'},
},
{
"Name": "overlay_p2p_decap_tput",
@@ -355,6 +358,7 @@ INTEGRATION_TESTS = [
"Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
"Tunnel Operation": "decapsulation",
"Description": "Overlay Decapsulation Throughput RFC2544 Test",
+ "Parameters": {'TRAFFICGEN_IXNET_TCL_SCRIPT' : 'ixnetrfc2544v2.tcl'},
},
{
"Name": "overlay_p2p_decap_cont",
@@ -364,6 +368,7 @@ INTEGRATION_TESTS = [
"Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
"Tunnel Operation": "decapsulation",
"Description": "Overlay Decapsulation Continuous Stream",
+ "Parameters": {'TRAFFICGEN_IXNET_TCL_SCRIPT' : 'ixnetrfc2544v2.tcl'},
},
{
"Name": "vswitch_add_del_bridge",
@@ -449,6 +454,21 @@ INTEGRATION_TESTS = [
]
},
{
+ "Name": "vswitch_vports_add_del_flow",
+ "Deployment": "clean",
+ "Description": "vSwitch - configure switch with vports, add and delete flow",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'],
+ ['vswitch', 'add_vport', 'int_br0'],
+ ['vswitch', 'add_vport', 'int_br0'],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+ {
"Name": "vswitch_add_del_flows",
"Deployment": "clean",
"Description": "vSwitch - add and delete flows",
@@ -497,6 +517,21 @@ INTEGRATION_TESTS = [
STEP_VSWITCH_PVP_FINIT
},
{
+ "Name": "vswitch_vports_pvp",
+ "Deployment": "clean",
+ "Description": "vSwitch - configure switch with vports and one vnf",
+ "TestSteps": [
+ ['vswitch', 'add_switch', 'int_br0'],
+ ['vswitch', 'add_vport', 'int_br0'],
+ ['vswitch', 'add_vport', 'int_br0'],
+ ['vnf', 'start'],
+ ['vnf', 'stop'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
+ ['vswitch', 'del_switch', 'int_br0'],
+ ]
+ },
+ {
"Name": "vswitch_pvp_tput",
"Deployment": "clean",
"Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
@@ -717,7 +752,9 @@ INTEGRATION_TESTS = [
{
# Topology: 2 Parallel PVP connections
# To run a Linux bridge as a loopback in the Guest use:
- # --test-params "guest_loopback=linux_bridge" --integration 2pvp_udp_dest_flows
+ # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 2pvp_udp_dest_flows
+ # or add "Parameters" option to the test definition:
+ # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
"Name": "2pvp_udp_dest_flows",
"Description": "Continuous TC with 2 Parallel VMs, flows on UDP Dest Port",
"Deployment": "clean",
@@ -738,7 +775,9 @@ INTEGRATION_TESTS = [
{
# Topology: 4 Parallel PVP connections
# To run a Linux bridge as a loopback in the Guest use:
- # --test-params "guest_loopback=linux_bridge" --integration 4pvp_udp_dest_flows
+ # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 4pvp_udp_dest_flows
+ # or add "Parameters" option to the test definition:
+ # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
"Name": "4pvp_udp_dest_flows",
"Description": "Continuous TC with 4 Parallel VMs, flows on UDP Dest Port",
"Deployment": "clean",
@@ -763,7 +802,9 @@ INTEGRATION_TESTS = [
{
# Topology: 6 Parallel PVP connections
# To run a Linux bridge as a loopback in the Guest use:
- # --test-params "guest_loopback=linux_bridge" --integration 6pvp_udp_dest_flows
+ # --test-params "GUEST_LOOPBACK=['linux_bridge']" --integration 6pvp_udp_dest_flows
+ # or add "Parameters" option to the test definition:
+ # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],},
"Name": "6pvp_udp_dest_flows",
"Description": "Continuous TC with 6 Parallel VMs, flows on UDP Dest Port",
"Deployment": "clean",
@@ -871,7 +912,7 @@ INTEGRATION_TESTS = [
# "vSwitch" : "OvsVanilla",
# "VNF" : "QemuVirtioNet",
# "Trafficgen": "IxNet",
-# "Parameters": {"guest_loopback" : "linux_bridge"},
+# "Parameters": {"GUEST_LOOPBACK" : ["linux_bridge"],},
# "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
# [
# ['vnf', 'start'],
diff --git a/conf/integration/03_traffic.conf b/conf/integration/03_traffic.conf
index 0b46cea0..e78e2668 100644
--- a/conf/integration/03_traffic.conf
+++ b/conf/integration/03_traffic.conf
@@ -18,9 +18,6 @@ TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
TRAFFICGEN_PORT1_IP = '1.1.1.1'
TRAFFICGEN_PORT2_IP = '90.90.90.90'
-# To test VXLAN set the ff to ixnetrfc2544v2.tcl
-TRAFFICGEN_IXNET_TCL_SCRIPT = 'ixnetrfc2544v2.tcl'
-
# VXLAN traffic item
VXLAN_VNI = '99'