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

  include '::ovsdpdk::clone'
  include '::ovsdpdk::uninstall_ovs'
  include '::ovsdpdk::build_ovs_dpdk'
  include '::ovsdpdk::install_ovs_dpdk'
  include '::ovsdpdk::postinstall_ovs_dpdk'
}