integration: fix ovsdpdk_mq_pvp_rxqs_testpmd
[vswitchperf.git] / conf / 02_vswitch.conf
1 # Copyright 2015-2018 Intel Corporation, Tieto and others.
2 #
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
6 #
7 #   http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15 # OVS Command timeout for execution of commands.
16 OVS_CMD_TIMEOUT = 10
17
18 # ############################
19 # DPDK configuration
20 # ############################
21
22 # DPDK target used when builing DPDK
23 RTE_TARGET = 'x86_64-native-linuxapp-gcc'
24
25 # list of NIC HWIDs to which traffic generator is connected
26 # e.g. WHITELIST_NICS = ['05:00.0', '05:00.1']
27 # NIC HWIDs for given network device name can be retrieved
28 # by call of ehtool:
29 # e.g. ethtool -i eth0
30 # In case of NIC with SRIOV support, it is possible to define,
31 # which virtual function should be used
32 # e.g. value '0000:05:00.0|vf1' will configure two VFs and second VF
33 # will be used for testing
34 WHITELIST_NICS = []
35
36 # List defines an amount of memory to be allocated by DPDK at NUMA nodes. This
37 # option is shared by all vSwitches with DPDK support. In case, that there is
38 # a socket-mem configuration specified in vSwitch specific configuration option,
39 # then it will be overridden by DPDK_SOCKET_MEM value.
40 DPDK_SOCKET_MEM = ['1024', '0']
41
42 # vhost character device file used by dpdkvhostport QemuWrap cases
43 VHOST_DEV_FILE = 'ovs-vhost-net'
44
45 # location of vhost-user sockets relative to 'ovs_var_tmp'
46 VHOST_USER_SOCKS = 'dpdkvhostuser*'
47
48 # please see conf/00_common.conf for description of PATHS dictionary
49 PATHS['dpdk'] = {
50         'type' : 'src',
51         'src': {
52             'path': os.path.join(ROOT_DIR, 'src/dpdk/dpdk/'),
53             # To use vfio set:
54             # 'modules' : ['uio', 'vfio-pci'],
55             'modules' : ['uio', os.path.join(RTE_TARGET, 'kmod/igb_uio.ko')],
56             'bind-tool': '*tools/dpdk*bind.py',
57             'testpmd': os.path.join(RTE_TARGET, 'app', 'testpmd'),
58         },
59         'bin': {
60             'bind-tool': '/usr/share/dpdk/tools/dpdk*bind.py',
61             'modules' : ['uio', 'igb_uio'],
62             'testpmd' : 'testpmd'
63         }
64     }
65
66 # ############################
67 # Directories
68 # ############################
69 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
70
71 # please see conf/00_common.conf for description of PATHS dictionary
72 # Every vswitch type supported by VSPERF must have its configuration
73 # stored inside PATHS['vswitch']. List of all supported vswitches
74 # can be obtained by call of ./vsperf --list-vswitches
75 #
76 # Directories defined by "ovs_var_tmp" and "ovs_etc_tmp" will be used
77 # by OVS to temporarily store its configuration, pid and socket files.
78 # In case, that these directories exist already, then their original
79 # content will be restored after the testcase execution.
80
81 PATHS['vswitch'] = {
82     'none' : {      # used by SRIOV tests
83         'type' : 'src',
84         'src' : {},
85     },
86     'OvsDpdkVhost': {
87         'type' : 'src',
88         'src': {
89             'path': os.path.join(ROOT_DIR, 'src/ovs/ovs/'),
90             'ovs-vswitchd': 'vswitchd/ovs-vswitchd',
91             'ovsdb-server': 'ovsdb/ovsdb-server',
92             'ovsdb-tool': 'ovsdb/ovsdb-tool',
93             'ovsschema': 'vswitchd/vswitch.ovsschema',
94             'ovs-vsctl': 'utilities/ovs-vsctl',
95             'ovs-ofctl': 'utilities/ovs-ofctl',
96             'ovs-dpctl': 'utilities/ovs-dpctl',
97             'ovs-appctl': 'utilities/ovs-appctl',
98         },
99         'bin': {
100             'ovs-vswitchd': 'ovs-vswitchd',
101             'ovsdb-server': 'ovsdb-server',
102             'ovsdb-tool': 'ovsdb-tool',
103             'ovsschema': '/usr/share/openvswitch/vswitch.ovsschema',
104             'ovs-vsctl': 'ovs-vsctl',
105             'ovs-ofctl': 'ovs-ofctl',
106             'ovs-dpctl': 'ovs-dpctl',
107             'ovs-appctl': 'ovs-appctl',
108         }
109     },
110     'ovs_var_tmp': '/usr/local/var/run/openvswitch/',
111     'ovs_etc_tmp': '/usr/local/etc/openvswitch/',
112     'VppDpdkVhost': {
113         'type' : 'src',
114         'src': {
115             'path': os.path.join(ROOT_DIR, 'src/vpp/vpp/build-root/install-vpp-native/vpp'),
116             'vpp': 'bin/vpp',
117             'vppctl': 'bin/vppctl',
118             'vpp_plugin_path' : 'lib64/vpp_plugins',
119         },
120         'bin': {
121             'vpp': 'vpp',
122             'vppctl': 'vppctl',
123             'vpp_plugin_path' : '/usr/lib/vpp_plugins',
124         }
125     },
126 }
127
128 # default OvsVanilla configuration is similar to OvsDpdkVhost except 'path' and 'modules'
129 PATHS['vswitch'].update({'OvsVanilla' : copy.deepcopy(PATHS['vswitch']['OvsDpdkVhost'])})
130 PATHS['vswitch']['OvsVanilla']['src']['path'] = os.path.join(ROOT_DIR, 'src_vanilla/ovs/ovs/')
131 PATHS['vswitch']['OvsVanilla']['src']['modules'] = ['datapath/linux/openvswitch.ko']
132 PATHS['vswitch']['OvsVanilla']['bin']['modules'] = ['openvswitch']
133
134 # ############################
135 # vswitch configuration
136 # ############################
137 # These are DPDK EAL parameters and they may need to be changed depending on
138 # hardware configuration, like cpu numbering and NUMA.
139
140 # parameters used for legacy DPDK configuration through '--dpdk' option of ovs-vswitchd
141 # e.g. ovs-vswitchd --dpdk --socket-mem 1024,0
142 # This config line is also used for pkt_fwd option (TestPMD phy2phy and pvp tests)
143 # NOTE: DPDK socket mem allocation is driven by parameter DPDK_SOCKET_MEM
144 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4']
145
146 # options used for new type of OVS configuration via calls to ovs-vsctl
147 # e.g. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
148 # NOTE: DPDK socket mem allocation is driven by parameter DPDK_SOCKET_MEM
149 VSWITCHD_DPDK_CONFIG = {
150     'dpdk-init' : 'true',
151     'dpdk-lcore-mask' : '0x4',
152 }
153 # Note: VSPERF will automatically detect, which type of DPDK configuration should
154 # be used.
155
156 # Defines if VSWITCH should be a server for sockets of DPDK vhost-user
157 # interfaces (True) or not (False). Support of vhost user server mode
158 # in Open vSwitch is deprecated and will be removed in future releases.
159 # Note: Qemu 2.7 and newer is required to support settings
160 # VSWITCH_VHOSTUSER_SERVER_MODE = False
161 VSWITCH_VHOSTUSER_SERVER_MODE = True
162
163 # To enable multi queue with dpdk modify the below param to the number of
164 # queues for dpdk. 0 = disabled
165 VSWITCH_DPDK_MULTI_QUEUES = 0
166
167 # Use old style OVS DPDK Multi-queue startup. If testing versions of OVS 2.5.0
168 # or before, enable this setting to allow DPDK Multi-queue to enable correctly.
169 OVS_OLD_STYLE_MQ = False
170
171 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
172 VSWITCHD_VANILLA_ARGS = []
173
174 # Bridge name to be used by VSWTICH
175 VSWITCH_BRIDGE_NAME = 'vsperf-br0'
176
177 # A tunnel type used by OP2P and PTUNP deployments
178 # Supported values: 'vxlan', 'gre' or 'geneve'
179 TUNNEL_TYPE = 'vxlan'
180
181 # directory where hugepages will be mounted on system init
182 HUGEPAGE_DIR = '/dev/hugepages'
183
184 # If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
185 # Default is 10 GB.
186 # 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
187 HUGEPAGE_RAM_ALLOCATION = 10485760
188
189 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
190 # Note that the '0x' notation should not be used.
191 VSWITCH_PMD_CPU_MASK = '30'
192 VSWITCH_AFFINITIZATION_ON = 1
193
194 VSWITCH_FLOW_TIMEOUT = '30000'
195
196 # log file for ovs-vswitchd
197 LOG_FILE_VSWITCHD = 'vswitchd.log'
198
199 # log file for ovs-dpdk
200 LOG_FILE_OVS = 'ovs.log'
201
202 # default vswitch implementation
203 VSWITCH = "OvsDpdkVhost"
204
205 VSWITCH_JUMBO_FRAMES_ENABLED = False
206 VSWITCH_JUMBO_FRAMES_SIZE = 9000
207
208 # default arguments of OVS ctl tools
209 OVS_VSCTL_ARGS = []
210 OVS_OFCTL_ARGS = ['-O', 'OpenFlow13']   # backward compatible default value
211 OVS_APPCTL_ARGS = []
212
213 # default flow template to be used by OVS classes
214 OVS_FLOW_TEMPLATE = {
215     'idle_timeout': '0'
216 }
217
218 # enable or disable configuration of routing tables; See vswitchperf_design.rst
219 # for details.
220 OVS_ROUTING_TABLES = False
221
222 #########################
223 ## VPP
224 #########################
225 # Set of arguments used for startup of VPP
226 # NOTE: DPDK socket mem allocation is driven by parameter DPDK_SOCKET_MEM
227 VSWITCH_VPP_CLI_SOCK = ''
228 VSWITCH_VPP_ARGS = {
229     'unix' : [
230         'interactive',      # required by VSPERF to detect successful VPP startup
231         'log /tmp/vpp.log',
232         'full-coredump',
233     ],
234     'cpu' : [
235         'main-core 2',
236         'workers 2',
237         'corelist-workers 4,5',
238     ],
239 }
240
241 # log file for VPP
242 LOG_FILE_VPP = 'vsperf-vpp.log'
243
244 # Select l2 connection method used by VPP.
245 # Supported values are: 'xconnect', 'l2patch' and 'bridge'
246 VSWITCH_VPP_L2_CONNECT_MODE = 'xconnect'
247
248 # Options used during creation of dpdkvhostuser interface
249 VSWITCH_VPP_VHOSTUSER_ARGS = ['feature-mask',  '0xFF']