1 # Copyright 2015 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 # ############################
18 # use DPDK VHOST USER by default
19 RTE_SDK = RTE_SDK_USER
20 OVS_DIR = OVS_DIR_USER
22 OVS_VAR_DIR = '/usr/local/var/run/openvswitch/'
23 OVS_ETC_DIR = '/usr/local/etc/openvswitch/'
25 VSWITCH_DIR = os.path.join(ROOT_DIR, 'vswitches')
27 # ############################
29 # ############################
31 # DPDK target used when builing DPDK
32 RTE_TARGET = 'x86_64-native-linuxapp-gcc'
34 # list of NIC HWIDs which will be bound to the 'igb_uio' driver on
36 WHITELIST_NICS = ['05:00.0', '05:00.1']
38 # list of NIC HWIDs which will be ignored by the 'igb_uio' driver on
40 BLACKLIST_NICS = ['0000:09:00.0', '0000:09:00.1', '0000:09:00.2',
43 # for DPDK_MODULES the path is in reference to the build directory
49 ('eventfd_link', 'eventfd_link')
52 # list of modules that will be inserted using 'modprobe' on system init
53 SYS_MODULES = ['uio', 'cuse']
55 # vhost character device file used by dpdkvhostport QemuWrap cases
56 VHOST_DEV_FILE = 'ovs-vhost-net'
58 # location of vhost-user sockets
59 VHOST_USER_SOCKS = ['/tmp/dpdkvhostuser0', '/tmp/dpdkvhostuser1',
60 '/tmp/dpdkvhostuser2', '/tmp/dpdkvhostuser3',
61 '/tmp/myport0', '/tmp/helloworld123', '/tmp/abcstuff0']
63 # ############################
64 # vswitch configuration
65 # ############################
66 # These are DPDK EAL parameters and they may need to be changed depending on
67 # hardware configuration, like cpu numbering and NUMA.
68 VSWITCHD_DPDK_ARGS = ['-c', '0x4', '-n', '4', '--socket-mem 1024,0']
70 VSWITCHD_VANILLA_ARGS = ['--pidfile']
71 VSWITCH_VANILLA_PHY_PORT_NAMES = ['', '']
73 # use full module path to load module matching OVS version built from the source
74 VSWITCH_VANILLA_KERNEL_MODULES = [os.path.join(OVS_DIR_VANILLA, 'datapath/linux/openvswitch.ko')]
76 # Bridge name to be used by VSWTICH
77 VSWITCH_BRIDGE_NAME = 'br0'
79 # directory where hugepages will be mounted on system init
80 HUGEPAGE_DIR = '/dev/hugepages'
82 # Sets OVS PMDs core mask to 0x30 for affinitization to 5th and 6th CPU core
83 VSWITCH_PMD_CPU_MASK = '0x30'
84 VSWITCH_AFFINITIZATION_ON = 1
86 VSWITCH_FLOW_TIMEOUT = '30000'
88 # list of tuples of format (path, module_name), which will be inserted
89 # using 'insmod' on system init
91 # for OVS modules the path is in reference to the OVS directory.
94 # log file for ovs-vswitchd
95 LOG_FILE_VSWITCHD = 'vswitchd.log'
97 # log file for ovs-dpdk
98 LOG_FILE_OVS = 'ovs.log'
100 # default vswitch implementation
101 VSWITCH = "OvsDpdkVhost"