1 # Copyright 2015-2016 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # ############################
17 # ############################
19 # DPDK target used when builing DPDK
20 RTE_TARGET = 'x86_64-native-linuxapp-gcc'
22 # list of NIC HWIDs to which traffic generator is connected
23 # In case of NIC with SRIOV suport, it is possible to define,
24 # which virtual function should be used
25 # e.g. value '0000:05:00.0|vf1' will configure two VFs and second VF
26 # will be used for testing
27 WHITELIST_NICS = ['0000:05:00.0', '0000:05:00.1']
29 # vhost character device file used by dpdkvhostport QemuWrap cases
30 VHOST_DEV_FILE = 'ovs-vhost-net'
32 # location of vhost-user sockets relative to 'ovs_var_tmp'
33 VHOST_USER_SOCKS = 'dpdkvhostuser*'
35 # please see conf/00_common.conf for description of PATHS dictionary
39 'path': os.path.join(ROOT_DIR, 'src/dpdk/dpdk/'),
41 # 'modules' : ['uio', 'vfio-pci'],
42 'modules' : ['uio', os.path.join(RTE_TARGET, 'kmod/igb_uio.ko')],
43 'bind-tool': 'tools/dpdk*bind.py',
44 'testpmd': os.path.join(RTE_TARGET, 'app', 'testpmd'),
47 'bind-tool': '/usr/share/dpdk/tools/dpdk*bind.py',
48 'modules' : ['uio', 'igb_uio'],
53 # ############################
55 # ############################
56 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
58 # please see conf/00_common.conf for description of PATHS dictionary
59 # Every vswitch type supported by VSPERF must have its configuration
60 # stored inside PATHS['vswitch']. List of all supported vswitches
61 # can be obtained by call of ./vsperf --list-vswitches
63 # Directories defined by "ovs_var_tmp" and "ovs_etc_tmp" will be used
64 # by OVS to temporarily store its configuration, pid and socket files.
65 # In case, that these directories exist already, then their original
66 # content will be restored after the testcase execution.
69 'none' : { # used by SRIOV tests
76 'path': os.path.join(ROOT_DIR, 'src/ovs/ovs/'),
77 'ovs-vswitchd': 'vswitchd/ovs-vswitchd',
78 'ovsdb-server': 'ovsdb/ovsdb-server',
79 'ovsdb-tool': 'ovsdb/ovsdb-tool',
80 'ovsschema': 'vswitchd/vswitch.ovsschema',
81 'ovs-vsctl': 'utilities/ovs-vsctl',
82 'ovs-ofctl': 'utilities/ovs-ofctl',
83 'ovs-dpctl': 'utilities/ovs-dpctl',
84 'ovs-appctl': 'utilities/ovs-appctl',
87 'ovs-vswitchd': 'ovs-vswitchd',
88 'ovsdb-server': 'ovsdb-server',
89 'ovsdb-tool': 'ovsdb-tool',
90 'ovsschema': '/usr/share/openvswitch/vswitch.ovsschema',
91 'ovs-vsctl': 'ovs-vsctl',
92 'ovs-ofctl': 'ovs-ofctl',
93 'ovs-dpctl': 'ovs-dpctl',
94 'ovs-appctl': 'ovs-appctl',
97 'ovs_var_tmp': '/usr/local/var/run/openvswitch/',
98 'ovs_etc_tmp': '/usr/local/etc/openvswitch/',
101 # default OvsVanilla configuration is similar to OvsDpdkVhost except 'path' and 'modules'
102 PATHS['vswitch'].update({'OvsVanilla' : copy.deepcopy(PATHS['vswitch']['OvsDpdkVhost'])})
103 PATHS['vswitch']['OvsVanilla']['src']['path'] = os.path.join(ROOT_DIR, 'src_vanilla/ovs/ovs/')
104 PATHS['vswitch']['OvsVanilla']['src']['modules'] = ['datapath/linux/openvswitch.ko']
105 PATHS['vswitch']['OvsVanilla']['bin']['modules'] = ['openvswitch']
107 # ############################
108 # vswitch configuration
109 # ############################
110 # These are DPDK EAL parameters and they may need to be changed depending on
111 # hardware configuration, like cpu numbering and NUMA.
113 # parameters used for legacy DPDK configuration through '--dpdk' option of ovs-vswitchd
114 # e.g. ovs-vswitchd --dpdk --socket-mem 1024,0
115 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4', '--socket-mem 1024,0']
117 # options used for new type of OVS configuration via calls to ovs-vsctl
118 # e.g. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
119 VSWITCHD_DPDK_CONFIG = {
120 'dpdk-init' : 'true',
121 'dpdk-lcore-mask' : '0x4',
122 'dpdk-socket-mem' : '1024,0',
124 # Note: VSPERF will automatically detect, which type of DPDK configuration should
127 # To enable multi queue with dpdk modify the below param to the number of
128 # queues for dpdk. 0 = disabled
129 VSWITCH_DPDK_MULTI_QUEUES = 0
131 # Use old style OVS DPDK Multi-queue startup. If testing versions of OVS 2.5.0
132 # or before, enable this setting to allow DPDK Multi-queue to enable correctly.
133 OVS_OLD_STYLE_MQ = False
135 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
136 VSWITCHD_VANILLA_ARGS = []
138 # Bridge name to be used by VSWTICH
139 VSWITCH_BRIDGE_NAME = 'br0'
141 # directory where hugepages will be mounted on system init
142 HUGEPAGE_DIR = '/dev/hugepages'
144 # If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
146 # 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
147 HUGEPAGE_RAM_ALLOCATION = 10485760
149 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
150 # Note that the '0x' notation should not be used.
151 VSWITCH_PMD_CPU_MASK = '30'
152 VSWITCH_AFFINITIZATION_ON = 1
154 VSWITCH_FLOW_TIMEOUT = '30000'
156 # log file for ovs-vswitchd
157 LOG_FILE_VSWITCHD = 'vswitchd.log'
159 # log file for ovs-dpdk
160 LOG_FILE_OVS = 'ovs.log'
162 # default vswitch implementation
163 VSWITCH = "OvsDpdkVhost"