Merge "hugepages: change default num pages + deallocate"
[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/myport0', '/tmp/helloworld123', '/tmp/abcstuff0']
66
67 # ############################
68 # vswitch configuration
69 # ############################
70 # These are DPDK EAL parameters and they may need to be changed depending on
71 # hardware configuration, like cpu numbering and NUMA.
72 #
73 # parameters used for legacy DPDK configuration through '--dpdk' option of ovs-vswitchd
74 # e.g. ovs-vswitchd --dpdk --socket-mem 1024,0
75 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4', '--socket-mem 1024,0']
76
77 # options used for new type of OVS configuration via calls to ovs-vsctl
78 # e.g. ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
79 VSWITCHD_DPDK_CONFIG = {
80     'dpdk-init' : 'true',
81     'dpdk-lcore-mask' : '0x4',
82     'dpdk-socket-mem' : '1024,0',
83 }
84 # Note: VSPERF will automatically detect, which type of DPDK configuration should
85 # be used.
86
87 # To enable multi queue modify the below param to the number of queues.
88 # 0 = disabled
89 VSWITCH_MULTI_QUEUES = 0
90
91 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
92 VSWITCHD_VANILLA_ARGS = []
93
94 # use full module path to load module matching OVS version built from the source
95 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')]
96
97 # Bridge name to be used by VSWTICH
98 VSWITCH_BRIDGE_NAME = 'br0'
99
100 # directory where hugepages will be mounted on system init
101 HUGEPAGE_DIR = '/dev/hugepages'
102
103 # If no hugepages are available, try to allocate HUGEPAGE_RAM_ALLOCATION.
104 # Default is 10 GB.
105 # 10 GB (10485760 kB) or more is recommended for PVP & PVVP testing scenarios.
106 HUGEPAGE_RAM_ALLOCATION = 10485760
107
108 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
109 # Note that the '0x' notation should not be used.
110 VSWITCH_PMD_CPU_MASK = '30'
111 VSWITCH_AFFINITIZATION_ON = 1
112
113 VSWITCH_FLOW_TIMEOUT = '30000'
114
115 # list of tuples of format (path, module_name), which will be inserted
116 # using 'insmod' on system init
117
118 # for OVS modules the path is in reference to the OVS directory.
119 OVS_MODULES = []
120
121 # log file for ovs-vswitchd
122 LOG_FILE_VSWITCHD = 'vswitchd.log'
123
124 # log file for ovs-dpdk
125 LOG_FILE_OVS = 'ovs.log'
126
127 # default vswitch implementation
128 VSWITCH = "OvsDpdkVhost"