OVS Revalidator and handler threads config

OVS revalidator hanlder threads are not contained to limited cores.
This patch will enable them to be configured in puppet vswitch module

Change-Id: I576b00bb28d0d531eb91a856632a7b5afe552f43
Closes-Bug: #1822571
This commit is contained in:
hakhande 2019-04-08 13:20:49 +05:30
parent 97eb675dcc
commit 6bc5b206e7
2 changed files with 24 additions and 12 deletions

View File

@ -32,6 +32,12 @@
# [*disable_emc*]
# (optional) Configure OVS to disable EMC.
#
# [*revalidator_cores*]
# (Optional) Number of cores to be used for OVS Revalidator threads.
#
# [*handler_cores*]
# (Optional) Number of cores to be used for OVS handler threads.
#
# DEPRECATED PARAMETERS
#
# [*driver_type*]
@ -40,14 +46,16 @@
# This parameter is required only for OVS versions <= 2.5.
#
class vswitch::dpdk (
$memory_channels = undef,
$host_core_list = undef,
$package_ensure = 'present',
$pmd_core_list = undef,
$socket_mem = undef,
$disable_emc = false,
$memory_channels = undef,
$host_core_list = undef,
$package_ensure = 'present',
$pmd_core_list = undef,
$socket_mem = undef,
$disable_emc = false,
$revalidator_cores = undef,
$handler_cores = undef,
# DEPRECATED PARAMETERS
$driver_type = 'vfio-pci',
$driver_type = 'vfio-pci',
) {
include ::vswitch::params
@ -65,7 +73,6 @@ class vswitch::dpdk (
$pmd_core_mask = range_to_mask($pmd_core_list)
$dpdk_lcore_mask = range_to_mask($host_core_list)
if $memory_channels and !empty($memory_channels) {
$memory_channels_conf = "-n ${memory_channels}"
}
@ -74,10 +81,12 @@ class vswitch::dpdk (
}
$dpdk_configs = {
'other_config:dpdk-extra' => { value => $memory_channels_conf},
'other_config:dpdk-socket-mem' => { value => $socket_mem},
'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask},
'other_config:pmd-cpu-mask' => { value => $pmd_core_mask},
'other_config:dpdk-extra' => { value => $memory_channels_conf},
'other_config:dpdk-socket-mem' => { value => $socket_mem},
'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask},
'other_config:pmd-cpu-mask' => { value => $pmd_core_mask},
'other_config:n-revalidator-threads' => { value => $revalidator_cores},
'other_config:n-handler-threads' => { value => $handler_cores},
}
$dpdk_dependencies = {

View File

@ -0,0 +1,3 @@
---
features:
- Introduced two new parameters revalidator_cores and handler_cores to set values of n-revalidator-threads and n-handler-threads on openvswitch.