228ff057702c241b31f8e757467dcbd076672ac6
[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 # ############################
16 # Directories
17 # ############################
18 # use DPDK VHOST USER by default
19 RTE_SDK = RTE_SDK_USER
20 OVS_DIR = OVS_DIR_USER
21
22 OVS_VAR_DIR = '/usr/local/var/run/openvswitch/'
23 OVS_ETC_DIR = '/usr/local/etc/openvswitch/'
24
25 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
26
27 # ############################
28 # DPDK configuration
29 # ############################
30
31 # DPDK target used when builing DPDK
32 RTE_TARGET = 'x86_64-native-linuxapp-gcc'
33
34 # list of NIC HWIDs to which traffic generator is connected
35 # In case of NIC with SRIOV suport, it is possible to define,
36 # which virtual function should be used
37 # e.g. value '0000:05:00.0|vf1' will configure two VFs and second VF
38 # will be used for testing
39 WHITELIST_NICS = ['0000:05:00.0', '0000:05:00.1']
40
41 # for DPDK_MODULES the path is in reference to the build directory
42 # To use vfio set
43 # DPDK_MODULES = [
44 #     ('vfio-pci'),
45 # ]
46 DPDK_MODULES = [
47     ('kmod', 'igb_uio'),
48 ]
49
50 VHOST_MODULE = [
51     ('eventfd_link', 'eventfd_link')
52 ]
53
54 # list of modules that will be inserted using 'modprobe' on system init
55 # To use vfio set
56 # SYS_MODULES = ['cuse']
57 SYS_MODULES = ['uio', 'cuse']
58
59 # vhost character device file used by dpdkvhostport QemuWrap cases
60 VHOST_DEV_FILE = 'ovs-vhost-net'
61
62 # location of vhost-user sockets
63 VHOST_USER_SOCKS = ['/tmp/dpdkvhostuser0', '/tmp/dpdkvhostuser1',
64                     '/tmp/dpdkvhostuser2', '/tmp/dpdkvhostuser3',
65                     '/tmp/dpdkvhostuser4', '/tmp/dpdkvhostuser5',
66                     '/tmp/dpdkvhostuser6', '/tmp/dpdkvhostuser7',
67                     '/tmp/dpdkvhostuser8', '/tmp/dpdkvhostuser9',
68                     '/tmp/dpdkvhostuser10', '/tmp/dpdkvhostuser11',
69                     '/tmp/myport0', '/tmp/helloworld123', '/tmp/abcstuff0']
70
71 # ############################
72 # vswitch configuration
73 # ############################
74 # These are DPDK EAL parameters and they may need to be changed depending on
75 # hardware configuration, like cpu numbering and NUMA.
76 #
77 # parameters used for legacy DPDK configuration through '--dpdk' option of ovs-vswitchd
78 # e.g. ovs-vswitchd --dpdk --socket-mem 1024,0
79 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4', '--socket-mem 1024,0']
80
81 # options used for new type of OVS configuration via calls to ovs-vsctl
82 # e.g. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
83 VSWITCHD_DPDK_CONFIG = {
84     'dpdk-init' : 'true',
85     'dpdk-lcore-mask' : '0x4',
86     'dpdk-socket-mem' : '1024,0',
87 }
88 # Note: VSPERF will automatically detect, which type of DPDK configuration should
89 # be used.
90
91 # To enable multi queue modify the below param to the number of queues.
92 # 0 = disabled
93 VSWITCH_MULTI_QUEUES = 0
94
95 # Use old style OVS Multi-queue startup. If testing versions of OVS 2.5.0 or
96 # before, enable this setting to allow multi-queue to enable correctly.
97 OVS_OLD_STYLE_MQ = False
98
99 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
100 VSWITCHD_VANILLA_ARGS = []
101
102 # use full module path to load module matching OVS version built from the source
103 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')]
104
105 # Bridge name to be used by VSWTICH
106 VSWITCH_BRIDGE_NAME = 'br0'
107
108 # directory where hugepages will be mounted on system init
109 HUGEPAGE_DIR = '/dev/hugepages'
110
111 # If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
112 # Default is 10 GB.
113 # 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
114 HUGEPAGE_RAM_ALLOCATION = 10485760
115
116 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
117 # Note that the '0x' notation should not be used.
118 VSWITCH_PMD_CPU_MASK = '30'
119 VSWITCH_AFFINITIZATION_ON = 1
120
121 VSWITCH_FLOW_TIMEOUT = '30000'
122
123 # list of tuples of format (path, module_name), which will be inserted
124 # using 'insmod' on system init
125
126 # for OVS modules the path is in reference to the OVS directory.
127 OVS_MODULES = []
128
129 # log file for ovs-vswitchd
130 LOG_FILE_VSWITCHD = 'vswitchd.log'
131
132 # log file for ovs-dpdk
133 LOG_FILE_OVS = 'ovs.log'
134
135 # default vswitch implementation
136 VSWITCH = "OvsDpdkVhost"