1 # Copyright 2015-2016 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 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']
41 # for DPDK_MODULES the path is in reference to the build directory
51 ('eventfd_link', 'eventfd_link')
54 # list of modules that will be inserted using 'modprobe' on system init
56 # SYS_MODULES = ['cuse']
57 SYS_MODULES = ['uio', 'cuse']
59 # vhost character device file used by dpdkvhostport QemuWrap cases
60 VHOST_DEV_FILE = 'ovs-vhost-net'
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']
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.
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']
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 = {
81 'dpdk-lcore-mask' : '0x4',
82 'dpdk-socket-mem' : '1024,0',
84 # Note: VSPERF will automatically detect, which type of DPDK configuration should
87 # parameters passed to ovs-vswitchd in case that OvsVanilla is selected
88 VSWITCHD_VANILLA_ARGS = []
90 # use full module path to load module matching OVS version built from the source
91 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')]
93 # Bridge name to be used by VSWTICH
94 VSWITCH_BRIDGE_NAME = 'br0'
96 # directory where hugepages will be mounted on system init
97 HUGEPAGE_DIR = '/dev/hugepages'
99 # Sets OVS PMDs core mask to 30 for affinitization to 5th and 6th CPU core.
100 # Note that the '0x' notation should not be used.
101 VSWITCH_PMD_CPU_MASK = '30'
102 VSWITCH_AFFINITIZATION_ON = 1
104 VSWITCH_FLOW_TIMEOUT = '30000'
106 # list of tuples of format (path, module_name), which will be inserted
107 # using 'insmod' on system init
109 # for OVS modules the path is in reference to the OVS directory.
112 # log file for ovs-vswitchd
113 LOG_FILE_VSWITCHD = 'vswitchd.log'
115 # log file for ovs-dpdk
116 LOG_FILE_OVS = 'ovs.log'
118 # default vswitch implementation
119 VSWITCH = "OvsDpdkVhost"