3 # Configures and installs OVS with DPDK support service
8 # rte_target to compile OVS DPDK
9 # Defaults to 'x86_64-native-linuxapp-gcc'
11 # [*ovs_dpdk_mem_segments*]
12 # another parameter for OVS DPDK build
15 # [*ovs_dpdk_rte_librte_vhost*]
16 # another parameter for OVS DPDK build
19 # [*ovs_dpdk_vhost_user_debug*]
20 # (True/False) indicates whether to enable debugging for VHOST USER in DPDK
23 # [*ovs_allocate_hugepages*]
24 # (True/False) indicates whether to allocate hugepages during ovs-dpdk startup
27 # [*ovs_datapath_type*]
28 # OVS bridges will be set to use this datapath, possible values are 'system'
29 # for kernel OVS and 'netdev' for userspace OVS
30 # Defaults to 'netdev'
32 # [*ovs_tunnel_cidr_mapping*]
33 # (bridge:cidr) when specified, this option enables automatic assignment of
34 # the tunnel endpoint ip to a specific interface.
35 # e.g. OVS_TUNNEL_CIDR_MAPPING=br-phy:192.168.50.1/24 assignes the ip of
36 # 192.168.50.1 with subnetmask 255.255.255.0 to the br-phy local port.
37 # This is required to enabled vxlan or other tunneling protocols with ovs-dpdk
38 # and dpdk physical ports.
40 # [*ovs_hugepage_mount*]
41 # mount point to use for hugepages. It's created and hugepages mounted if
42 # it doesn't exist on the filesystem
43 # Defaults to '/mnt/huge'
45 # [*ovs_hugepage_mount_pagesize*]
46 # preffered hugepage size (2M/1G)
47 # Defaults to OS defaults if not set. If '1G' value is used hugepages should be
48 # allocated before starting ovs (e.g. kernel boot command line)
50 # [*ovs_num_hugepages*]
51 # amount of hugepages to mount if ovs_allocate_hugepages is True
54 # amount of memory to allocate on socket, recommended minimum is '512' MB
56 # [*ovs_mem_channels*]
57 # number of memory channels into the processor OVS will use
60 # cpu core mask in hexa format, is used for ovs-vswitchd process as -c option
63 # ovs_core_mask=3 (0x11 binary -> first two cores taken)
65 # [*ovs_pmd_core_mask*]
66 # mask in hexa format for PMD threads od OVS set in the db.
67 # ovs_pmd_core_mask value is used for other_config:pmd-cpu-mask parameter in
69 # Defaults is '4'. In case of HT enabled, it's 4 + sibling
71 # [*ovs_bridge_mappings*]
72 # (network:bridge) list of comma separated pairs of "physical network:bridge"
74 # Example: ovs_bridge_mappings=default:br-eth1,defaul1:br-enp9s0f0
76 # [*ovs_dpdk_port_mappings*]
77 # (nic:bridge) list of comma separated pairs of "nic:bridge name" used by
78 # OVS/DPDK. "nic" must be a NIC interface present in the system
79 # "bridge" is the linux bridge created by OVS
80 # Example: ovs_dpdk_port_mappings=eth1:br-01,eth2:br02
83 # directory where ovs-vswitchd.log will be created
87 # directory containing OVS lock file
89 # [*ovs_interface_driver*]
90 # (vfio-pci/igb_uio) NIC driver to use for physical network interfaces.
91 # Drivers names are the ones supported by DPDK, i.e: not the kernel names.
97 # [*ovs_dpdk_patches*]
101 $rte_target = 'x86_64-native-linuxapp-gcc',
102 $ovs_dpdk_mem_segments = '256',
103 $ovs_dpdk_rte_librte_vhost = 'y',
104 $ovs_dpdk_vhost_user_debug = 'n',
105 $ovs_allocate_hugepages = 'True',
106 $ovs_datapath_type = 'netdev',
107 $ovs_tunnel_cidr_mapping = '',
108 $ovs_hugepage_mount = '/mnt/huge',
109 $ovs_hugepage_mount_pagesize = '2M',
110 $ovs_num_hugepages = '1024',
111 $ovs_socket_mem = 'auto',
112 $ovs_mem_channels = '4',
113 $ovs_core_mask = '2',
114 $ovs_pmd_core_mask = '4',
115 $ovs_bridge_mappings = '',
116 $ovs_dpdk_port_mappings = '',
117 $ovs_log_dir = '/tmp',
119 $ovs_interface_driver = 'igb_uio',
121 $ovs_dpdk_patches = '',
122 $controller = 'False',
124 ) inherits ::ovsdpdk::params {
126 include '::ovsdpdk::clone'
127 include '::ovsdpdk::uninstall_ovs'
128 include '::ovsdpdk::build_ovs_dpdk'
129 include '::ovsdpdk::install_ovs_dpdk'
130 include '::ovsdpdk::postinstall_ovs_dpdk'