aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/00_common.conf54
-rw-r--r--conf/02_vswitch.conf113
-rw-r--r--conf/04_vnf.conf14
3 files changed, 131 insertions, 50 deletions
diff --git a/conf/00_common.conf b/conf/00_common.conf
index fe4e1f5d..7f30deb2 100644
--- a/conf/00_common.conf
+++ b/conf/00_common.conf
@@ -17,6 +17,7 @@
# ###########################
import os
+import copy
# default language and encoding, which will be set in case
# that locale is not set properly
@@ -36,14 +37,51 @@ ROOT_DIR = os.path.normpath(os.path.join(
TRAFFICGEN_DIR = os.path.join(ROOT_DIR, 'tools/pkt_gen')
SYSMETRICS_DIR = os.path.join(ROOT_DIR, 'tools/collectors')
-# deployment specific paths to OVS and DPDK
-OVS_DIR_VANILLA = os.path.join(ROOT_DIR, 'src_vanilla/ovs/ovs/')
-
-RTE_SDK_USER = os.path.join(ROOT_DIR, 'src/dpdk/dpdk/')
-OVS_DIR_USER = os.path.join(ROOT_DIR, 'src/ovs/ovs/')
-
-# the same qemu version is used for vanilla and vHost User
-QEMU_DIR = os.path.join(ROOT_DIR, 'src/qemu/qemu/')
+# Dictionary PATHS is used for configuration of vswitches, dpdk and qemu.
+# It contains paths to various utilities, temporary directories and kernel
+# modules used by VSPERF. Particular sections of PATHS dictionary are spread
+# among several configuration files, i.e.:
+# conf/02_vswtich.conf - configuration of vswitches (i.e. PATHS['vswitch'])
+# and dpdk (i.e. PATHS['dpdk']) can be found there
+# conf/04_vnf.conf - configuration of qemu (i.e. PATHS['qemu']) can
+# be found there
+#
+# VSPERF will process PATHS dictionary before execution of every testcase
+# and it will create a testcase specific dictionary TOOLS with paths to the
+# utilities used by the test. During PATHS processing, following rules
+# will apply for every item of PATHS dictionary:
+# item 'type' - string, which defines the type of paths ('src' or 'bin') to be selected
+# for a given section:
+# 'src' means, that VSPERF will use OVS, DPDK or QEMU built from sources
+# e.g. by execution of systems/build_base_machine.sh script during VSPERF
+# installation
+# 'bin' means, that VSPERF will use OVS, DPDK or QEMU binaries installed
+# in the OS, e.g. via OS specific packaging system
+# item 'path' - string with valid path; Its content is checked for existence, prefixed
+# with section name and stored into TOOLS for later use
+# e.g. TOOLS['dpdk_src'] or TOOLS['vswitch_src']
+# item 'modules' - list of strings; Every value from given list is checked for '.ko'
+# suffix. In case it matches and it is not an absolute path to the module, then
+# module name is prefixed with 'path' defined for the same section
+# e.g. TOOLS['vswitch_modules'] = [
+# '/tmp/vsperf/src_vanilla/ovs/ovs/datapath/linux/openvswitch.ko']
+# all other items - string - if given string is a relative path and item 'path'
+# is defined for a given section, then item content will be prefixed with
+# content of the 'path'. Otherwise tool name will be searched within
+# standard system directories. Also any OS filename wildcards will be
+# expanded to the real path. At the end of processing, every absolute
+# path is checked for its existence. In case that temporary path (i.e. path
+# with '_tmp' suffix) doesn't exist, then log will be written and vsperf will
+# continue. If any other path will not exist, then vsperf execution will
+# be terminated with runtime error.
+#
+# Note: In case that 'bin' type is set for DPDK, then TOOLS['dpdk_src'] will be set to
+# the value of PATHS['dpdk']['src']['path']. The reason is, that VSPERF uses downloaded
+# DPDK sources to copy DPDK and testpmd into the GUEST, where testpmd is built. In case,
+# that DPDK sources are not available, then vsperf will continue with test execution,
+# but testpmd can't be used as a guest loopback. This is useful in case, that other guest
+# loopback applications (e.g. buildin) are used by CI jobs, etc.
+PATHS = {}
# ############################
# Process configuration
diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf
index abca63bb..e504d3ad 100644
--- a/conf/02_vswitch.conf
+++ b/conf/02_vswitch.conf
@@ -13,18 +13,6 @@
# limitations under the License.
# ############################
-# Directories
-# ############################
-# use DPDK VHOST USER by default
-RTE_SDK = RTE_SDK_USER
-OVS_DIR = OVS_DIR_USER
-
-OVS_VAR_DIR = '/usr/local/var/run/openvswitch/'
-OVS_ETC_DIR = '/usr/local/etc/openvswitch/'
-
-VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
-
-# ############################
# DPDK configuration
# ############################
@@ -38,29 +26,83 @@ RTE_TARGET = 'x86_64-native-linuxapp-gcc'
# will be used for testing
WHITELIST_NICS = ['0000:05:00.0', '0000:05:00.1']
-# for DPDK_MODULES the path is in reference to the build directory
-# To use vfio set
-# DPDK_MODULES = [
-# ('vfio-pci'),
-# ]
-DPDK_MODULES = [
- ('kmod', 'igb_uio'),
-]
+# vhost character device file used by dpdkvhostport QemuWrap cases
+VHOST_DEV_FILE = 'ovs-vhost-net'
-VHOST_MODULE = [
- ('eventfd_link', 'eventfd_link')
-]
+# location of vhost-user sockets relative to 'ovs_var_tmp'
+VHOST_USER_SOCKS = 'dpdkvhostuser*'
+
+# please see conf/00_common.conf for description of PATHS dictionary
+PATHS['dpdk'] = {
+ 'type' : 'src',
+ 'src': {
+ 'path': os.path.join(ROOT_DIR, 'src/dpdk/dpdk/'),
+ # To use vfio set:
+ # 'modules' : ['uio', 'vfio-pci'],
+ 'modules' : ['uio', os.path.join(RTE_TARGET, 'kmod/igb_uio.ko')],
+ 'bind-tool': 'tools/dpdk*bind.py',
+ 'testpmd': os.path.join(RTE_TARGET, 'app', 'testpmd'),
+ },
+ 'bin': {
+ 'bind-tool': '/usr/share/dpdk/tools/dpdk*bind.py',
+ 'modules' : ['uio', 'igb_uio'],
+ 'testpmd' : 'testpmd'
+ }
+ }
-# list of modules that will be inserted using 'modprobe' on system init
-# To use vfio set
-# SYS_MODULES = ['cuse']
-SYS_MODULES = ['uio', 'cuse']
+# ############################
+# Directories
+# ############################
+VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
-# vhost character device file used by dpdkvhostport QemuWrap cases
-VHOST_DEV_FILE = 'ovs-vhost-net'
+# please see conf/00_common.conf for description of PATHS dictionary
+# Every vswitch type supported by VSPERF must have its configuration
+# stored inside PATHS['vswitch']. List of all supported vswitches
+# can be obtained by call of ./vsperf --list-vswitches
+#
+# Directories defined by "ovs_var_tmp" and "ovs_etc_tmp" will be used
+# by OVS to temporarily store its configuration, pid and socket files.
+# In case, that these directories exist already, then their original
+# content will be restored after the testcase execution.
+
+PATHS['vswitch'] = {
+ 'none' : { # used by SRIOV tests
+ 'type' : 'src',
+ 'src' : {},
+ },
+ 'OvsDpdkVhost': {
+ 'type' : 'src',
+ 'src': {
+ 'path': os.path.join(ROOT_DIR, 'src/ovs/ovs/'),
+ 'ovs-vswitchd': 'vswitchd/ovs-vswitchd',
+ 'ovsdb-server': 'ovsdb/ovsdb-server',
+ 'ovsdb-tool': 'ovsdb/ovsdb-tool',
+ 'ovsschema': 'vswitchd/vswitch.ovsschema',
+ 'ovs-vsctl': 'utilities/ovs-vsctl',
+ 'ovs-ofctl': 'utilities/ovs-ofctl',
+ 'ovs-dpctl': 'utilities/ovs-dpctl',
+ 'ovs-appctl': 'utilities/ovs-appctl',
+ },
+ 'bin': {
+ 'ovs-vswitchd': 'ovs-vswitchd',
+ 'ovsdb-server': 'ovsdb-server',
+ 'ovsdb-tool': 'ovsdb-tool',
+ 'ovsschema': '/usr/share/openvswitch/vswitch.ovsschema',
+ 'ovs-vsctl': 'ovs-vsctl',
+ 'ovs-ofctl': 'ovs-ofctl',
+ 'ovs-dpctl': 'ovs-dpctl',
+ 'ovs-appctl': 'ovs-appctl',
+ }
+ },
+ 'ovs_var_tmp': '/usr/local/var/run/openvswitch/',
+ 'ovs_etc_tmp': '/usr/local/etc/openvswitch/',
+}
-# location of vhost-user sockets
-VHOST_USER_SOCKS = os.path.join(OVS_VAR_DIR, 'dpdkvhostuser*')
+# default OvsVanilla configuration is similar to OvsDpdkVhost except 'path' and 'modules'
+PATHS['vswitch'].update({'OvsVanilla' : copy.deepcopy(PATHS['vswitch']['OvsDpdkVhost'])})
+PATHS['vswitch']['OvsVanilla']['src']['path'] = os.path.join(ROOT_DIR, 'src_vanilla/ovs/ovs/')
+PATHS['vswitch']['OvsVanilla']['src']['modules'] = ['datapath/linux/openvswitch.ko']
+PATHS['vswitch']['OvsVanilla']['bin']['modules'] = ['openvswitch']
# ############################
# vswitch configuration
@@ -93,9 +135,6 @@ OVS_OLD_STYLE_MQ = False
# parameters passed to ovs-vswitchd in case that OvsVanilla is selected
VSWITCHD_VANILLA_ARGS = []
-# use full module path to load module matching OVS version built from the source
-VSWITCH_VANILLA_KERNEL_MODULES = ['libcrc32c', 'ip_tunnel', 'vxlan', 'gre', 'nf_conntrack', 'nf_defrag_ipv4', 'nf_defrag_ipv6', os.path.join(OVS_DIR_VANILLA, 'datapath/linux/openvswitch.ko')]
-
# Bridge name to be used by VSWTICH
VSWITCH_BRIDGE_NAME = 'br0'
@@ -114,12 +153,6 @@ VSWITCH_AFFINITIZATION_ON = 1
VSWITCH_FLOW_TIMEOUT = '30000'
-# list of tuples of format (path, module_name), which will be inserted
-# using 'insmod' on system init
-
-# for OVS modules the path is in reference to the OVS directory.
-OVS_MODULES = []
-
# log file for ovs-vswitchd
LOG_FILE_VSWITCHD = 'vswitchd.log'
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index 2e86b358..dcdf3316 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -20,10 +20,20 @@ VNF = 'QemuDpdkVhostUser'
VNF_AFFINITIZATION_ON = True
# ############################
-# Executables and log files
+# Directories, executables and log files
# ############################
-QEMU_BIN = os.path.join(QEMU_DIR, 'x86_64-softmmu/qemu-system-x86_64')
+# please see conf/00_common.conf for description of PATHS dictionary
+PATHS['qemu'] = {
+ 'type' : 'src',
+ 'src': {
+ 'path': os.path.join(ROOT_DIR, 'src/qemu/qemu/'),
+ 'qemu-system': 'x86_64-softmmu/qemu-system-x86_64'
+ },
+ 'bin': {
+ 'qemu-system': 'qemu-system-x86_64'
+ }
+}
# log file for qemu
LOG_FILE_QEMU = 'qemu.log'