summaryrefslogtreecommitdiffstats
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.conf25
-rw-r--r--conf/04_vnf.conf38
-rw-r--r--conf/10_custom.conf4
-rw-r--r--conf/__init__.py93
-rw-r--r--conf/integration/01_testcases.conf261
-rw-r--r--conf/integration/03_traffic.conf3
8 files changed, 395 insertions, 50 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 04266923..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
@@ -109,7 +126,7 @@ TRAFFICGEN_STC_WEST_PORT_NUM = ""
TRAFFICGEN_STC_TEST_SESSION_NAME = "RFC2544 Tput"
# The directory to copy results to
-TRAFFICGEN_STC_RESULTS_DIR = "./Results"
+TRAFFICGEN_STC_RESULTS_DIR = os.path.join(ROOT_DIR, "Results")
# The prefix for the CSV results file
TRAFFICGEN_STC_CSV_RESULTS_FILE_PREFIX = "RFC2544_tput"
@@ -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 e0c72b10..75f107e8 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -15,7 +15,7 @@
# ############################
# VNF configuration
# ############################
-VNF_DIR = 'vnfs/'
+VNF_DIR = os.path.join(ROOT_DIR, 'vnfs/')
VNF = 'QemuDpdkVhostUser'
VNF_AFFINITIZATION_ON = True
@@ -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 88e8cec6..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] = []
@@ -170,6 +203,7 @@ class Settings(object):
for macro, args, param, _, step in re.findall(_PARSE_PATTERN, value):
multi = int(step) if len(step) and int(step) else 1
if macro == '#EVAL':
+ # pylint: disable=eval-used
tmp_result = str(eval(param))
elif macro == '#MAC':
mac_value = netaddr.EUI(param).value
@@ -189,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):
@@ -202,11 +239,28 @@ 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)
-settings = Settings()
+ #
+ # validation methods used by step driven testcases
+ #
+ def validate_getValue(self, result, attr):
+ """Verifies, that correct value was returned
+ """
+ assert result == self.__dict__[attr]
+ return True
+ def validate_setValue(self, dummy_result, name, value):
+ """Verifies, that value was correctly set
+ """
+ assert value == self.__dict__[name]
+ return True
+
+settings = Settings()
def get_test_param(key, default=None):
"""Retrieve value for test param ``key`` if available.
@@ -217,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 a67702f8..a584845a 100644
--- a/conf/integration/01_testcases.conf
+++ b/conf/integration/01_testcases.conf
@@ -128,6 +128,48 @@ STEP_VSWITCH_PVVP_FLOWS_FINIT = [
['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
] + STEP_VSWITCH_PVVP_FINIT
+STEP_VSWITCH_P4VP_INIT = STEP_VSWITCH_PVVP_INIT + [
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 7 vm3 ports
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 8
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 9 vm4 ports
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 10
+]
+
+STEP_VSWITCH_P4VP_FINIT = [
+ ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'], # vm3 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'], # vm4 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'],
+] + STEP_VSWITCH_PVVP_FINIT
+
+STEP_VSWITCH_P4VP_FLOWS_INIT = STEP_VSWITCH_P4VP_INIT + [
+ ['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[5][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
+ 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \
+ 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', \
+ 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[9][1]', \
+ 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[7][1]', \
+ 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][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'}],
+]
+
+STEP_VSWITCH_P4VP_FLOWS_FINIT = [
+ ['vswitch', 'dump_flows', 'int_br0'],
+ ['vswitch', 'del_flow', 'int_br0'],
+] + STEP_VSWITCH_P4VP_FINIT
+
STEP_VSWITCH_2PHY_2VM_INIT = STEP_VSWITCH_PVVP_INIT
STEP_VSWITCH_2PHY_2VM_FINIT = STEP_VSWITCH_PVVP_FINIT
@@ -286,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",
@@ -295,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",
@@ -304,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",
@@ -313,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",
@@ -322,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",
@@ -407,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",
@@ -455,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",
@@ -576,9 +653,108 @@ INTEGRATION_TESTS = [
STEP_VSWITCH_PVVP_FLOWS_FINIT
},
{
+ "Name": "vswitch_p4vp",
+ "Description": "Just configure 4 chained vnfs",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_tput",
+ "Description": "4 chained vnfs, execute RFC2544 throughput test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_back2back",
+ "Description": "4 chained vnfs, execute RFC2544 back2back test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_cont",
+ "Description": "4 chained vnfs, execute continuous stream test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_all",
+ "Description": "4 chained vnfs, execute RFC2544 throughput test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', \
+ 'bidir' : 'True'}],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', \
+ 'bidir' : 'True'}],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
# 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",
@@ -599,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",
@@ -624,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",
@@ -649,6 +829,79 @@ INTEGRATION_TESTS = [
] + STEP_VSWITCH_FLOWS_FINIT +
STEP_VSWITCH_2PHY_6VM_FINIT
},
+ {
+ # Testcase for verification of vHost User NUMA awareness feature
+ # introduced in DPDK v2.2. Test case will execute two VNFs, each
+ # pinned to different NUMA slot. After that it will verify that
+ # QEMU and PMD threads serving its interfaces are co-located
+ # at the same NUMA slot.
+ #
+ # Prerequisites:
+ # * architecture with at least 2 NUMA slots
+ # * OVS with DPDK support and DPDK v2.2 and newer
+ # * OVS configuration utilizing both NUMA slots
+ #
+ # Example of OVS configuration valid for DPDK v16.04 and cores
+ # split between NUMA slots as follows:
+ # node 0 cpus: 0 1 2 3 4 5 6 7 8 9
+ # node 1 cpus: 10 11 12 13 14 15 16 17 18 19
+ #
+ # VSWITCH_PMD_CPU_MASK = '1010'
+ # VSWITCHD_DPDK_CONFIG = {
+ # 'dpdk-init' : 'true',
+ # 'dpdk-lcore-mask' : '0x4004',
+ # 'pmd-cpu-mask' : 'FF0FF',
+ # 'dpdk-socket-mem' : '1024,1024',
+ # }
+ #
+ "Name": "vhost_numa_awareness",
+ "Deployment": "clean",
+ "Description": "vSwitch DPDK - verify that PMD threads are served "
+ "by the same NUMA slot as QEMU instances",
+ "vSwitch" : "OvsDpdkVhost",
+ "TestSteps": STEP_VSWITCH_PVVP_INIT + # STEP 0-6
+ [
+ # check that at least 2 numa slots are available
+ ['tools', 'exec', 'numactl -H', 'available: ([0-9]+)'], # STEP 7
+ ['tools', 'assert', '#STEP[-1][0]>1'], # STEP 8
+ # store last 2 cores from numa slot 0
+ ['tools', 'exec', 'numactl -H', 'node 0 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 9
+ # store last 2 cores from numa slot 1
+ ['tools', 'exec', 'numactl -H', 'node 1 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 10
+ # pin VNF1 to 1st NUMA slot and VNF2 to 2nd NUMA slot
+ ['settings', 'setValue', 'GUEST_CORE_BINDING', # STEP 11
+ [("#STEP[-2][0][0]", "#STEP[-2][0][1]"),
+ ("#STEP[-1][0][0]", "#STEP[-1][0][1]")]
+ ],
+ # start 2 VNFs
+ ['vnf1', 'start'], # STEP 12
+ ['vnf2', 'start'], # STEP 13
+ # read paths to ovs utilities
+ ['settings', 'getValue', 'TOOLS'], # STEP 14
+ # check that PMD thread serving VNF1 runs at NUMA slot 0
+ ## i.e. get numa slot ID serving dpdhvhostuser0...
+ ['tools', 'exec', "sudo #STEP[-1]['ovs-appctl'] " # STEP 15
+ "dpif-netdev/pmd-rxq-show | "
+ "sed -e '/dpdkvhostuser0/,$d' | tac",
+ 'pmd thread numa_id ([0-9])+'
+ ],
+ ## ...and check that it is NUMA slot 0
+ ['tools', 'assert', '#STEP[-1][0]==0'], # STEP 16
+ # check that PMD thread serving VNF2 runs at NUMA slot 1
+ ## i.e. get numa slot ID serving dpdhvhostuser2...
+ ['tools', 'exec', "sudo #STEP[-3]['ovs-appctl'] " # STEP 17
+ "dpif-netdev/pmd-rxq-show | "
+ "sed -e '/dpdkvhostuser2/,$d' | tac",
+ 'pmd thread numa_id ([0-9])+'
+ ],
+ ## ...and check that it is NUMA slot 1
+ ['tools', 'assert', '#STEP[-1][0]==1'], # STEP 18
+ # clean up
+ ['vnf2', 'stop'], # STEP 19
+ ['vnf1', 'stop'], # STEP 20
+ ] +
+ STEP_VSWITCH_PVVP_FINIT # STEP 21...
+ },
]
# Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
@@ -659,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'