Moved userguide to user directory
[vswitchperf.git] / conf / 02_vswitch.conf
1 # Copyright 2015-2016 Intel Corporation.
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 # vhost character device file used by dpdkvhostport QemuWrap cases
37 VHOST_DEV_FILE = 'ovs-vhost-net'
38
39 # location of vhost-user sockets relative to 'ovs_var_tmp'
40 VHOST_USER_SOCKS = 'dpdkvhostuser*'
41
42 # please see conf/00_common.conf for description of PATHS dictionary
43 PATHS['dpdk'] = {
44         'type' : 'src',
45         'src': {
46             'path': os.path.join(ROOT_DIR, 'src/dpdk/dpdk/'),
47             # To use vfio set:
48             # 'modules' : ['uio', 'vfio-pci'],
49             'modules' : ['uio', os.path.join(RTE_TARGET, 'kmod/igb_uio.ko')],
50             'bind-tool': 'tools/dpdk*bind.py',
51             'testpmd': os.path.join(RTE_TARGET, 'app', 'testpmd'),
52         },
53         'bin': {
54             'bind-tool': '/usr/share/dpdk/tools/dpdk*bind.py',
55             'modules' : ['uio', 'igb_uio'],
56             'testpmd' : 'testpmd'
57         }
58     }
59
60 # ############################
61 # Directories
62 # ############################
63 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
64
65 # please see conf/00_common.conf for description of PATHS dictionary
66 # Every vswitch type supported by VSPERF must have its configuration
67 # stored inside PATHS['vswitch']. List of all supported vswitches
68 # can be obtained by call of ./vsperf --list-vswitches
69 #
70 # Directories defined by "ovs_var_tmp" and "ovs_etc_tmp" will be used
71 # by OVS to temporarily store its configuration, pid and socket files.
72 # In case, that these directories exist already, then their original
73 # content will be restored after the testcase execution.
74
75 PATHS['vswitch'] = {
76     'none' : {      # used by SRIOV tests
77         'type' : 'src',
78         'src' : {},
79     },
80     'OvsDpdkVhost': {
81         'type' : 'src',
82         'src': {
83             'path': os.path.join(ROOT_DIR, 'src/ovs/ovs/'),
84             'ovs-vswitchd': 'vswitchd/ovs-vswitchd',
85             'ovsdb-server': 'ovsdb/ovsdb-server',
86             'ovsdb-tool': 'ovsdb/ovsdb-tool',
87             'ovsschema': 'vswitchd/vswitch.ovsschema',
88             'ovs-vsctl': 'utilities/ovs-vsctl',
89             'ovs-ofctl': 'utilities/ovs-ofctl',
90             'ovs-dpctl': 'utilities/ovs-dpctl',
91             'ovs-appctl': 'utilities/ovs-appctl',
92         },
93         'bin': {
94             'ovs-vswitchd': 'ovs-vswitchd',
95             'ovsdb-server': 'ovsdb-server',
96             'ovsdb-tool': 'ovsdb-tool',
97             'ovsschema': '/usr/share/openvswitch/vswitch.ovsschema',
98             'ovs-vsctl': 'ovs-vsctl',
99             'ovs-ofctl': 'ovs-ofctl',
100             'ovs-dpctl': 'ovs-dpctl',
101             'ovs-appctl': 'ovs-appctl',
102         }
103     },
104     'ovs_var_tmp': '/usr/local/var/run/openvswitch/',
105     'ovs_etc_tmp': '/usr/local/etc/openvswitch/',
106 }
107
108 # default OvsVanilla configuration is similar to OvsDpdkVhost except 'path' and 'modules'
109 PATHS['vswitch'].update({'OvsVanilla' : copy.deepcopy(PATHS['vswitch']['OvsDpdkVhost'])})
110 PATHS['vswitch']['OvsVanilla']['src']['path'] = os.path.join(ROOT_DIR, 'src_vanilla/ovs/ovs/')
111 PATHS['vswitch']['OvsVanilla']['src']['modules'] = ['datapath/linux/openvswitch.ko']
112 PATHS['vswitch']['OvsVanilla']['bin']['modules'] = ['openvswitch']
113
114 # ############################
115 # vswitch configuration
116 # ############################
117 # These are DPDK EAL parameters and they may need to be changed depending on
118 # hardware configuration, like cpu numbering and NUMA.
119 #
120 # parameters used for legacy DPDK configuration through '--dpdk' option of ovs-vswitchd
121 # e.g. ovs-vswitchd --dpdk --socket-mem 1024,0
122 # This config line is also used for pkt_fwd option (TestPMD phy2phy and pvp tests)
123 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4', '--socket-mem 1024,0']
124
125 # options used for new type of OVS configuration via calls to ovs-vsctl
126 # e.g. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
127 VSWITCHD_DPDK_CONFIG = {
128     'dpdk-init' : 'true',
129     'dpdk-lcore-mask' : '0x4',
130     'dpdk-socket-mem' : '1024,0',
131 }
132 # Note: VSPERF will automatically detect, which type of DPDK configuration should
133 # be used.
134
135 # To enable multi queue with dpdk modify the below param to the number of
136 # queues for dpdk. 0 = disabled
137 VSWITCH_DPDK_MULTI_QUEUES = 0
138
139 # Use old style OVS DPDK Multi-queue startup. If testing versions of OVS 2.5.0
140 # or before, enable this setting to allow DPDK Multi-queue to enable correctly.
141 OVS_OLD_STYLE_MQ = False
142
143 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
144 VSWITCHD_VANILLA_ARGS = []
145
146 # Bridge name to be used by VSWTICH
147 VSWITCH_BRIDGE_NAME = 'br0'
148
149 # directory where hugepages will be mounted on system init
150 HUGEPAGE_DIR = '/dev/hugepages'
151
152 # If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
153 # Default is 10 GB.
154 # 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
155 HUGEPAGE_RAM_ALLOCATION = 10485760
156
157 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
158 # Note that the '0x' notation should not be used.
159 VSWITCH_PMD_CPU_MASK = '30'
160 VSWITCH_AFFINITIZATION_ON = 1
161
162 VSWITCH_FLOW_TIMEOUT = '30000'
163
164 # log file for ovs-vswitchd
165 LOG_FILE_VSWITCHD = 'vswitchd.log'
166
167 # log file for ovs-dpdk
168 LOG_FILE_OVS = 'ovs.log'
169
170 # default vswitch implementation
171 VSWITCH = "OvsDpdkVhost"