Merge "dpdk: Require integer for memory_channels"

This commit is contained in:
Zuul 2024-04-29 15:36:39 +00:00 committed by Gerrit Code Review
commit 681038b750
2 changed files with 8 additions and 10 deletions

View File

@ -106,7 +106,7 @@ class vswitch::dpdk (
String[1] $package_name, String[1] $package_name,
String[1] $service_name, String[1] $service_name,
String $package_ensure = 'present', String $package_ensure = 'present',
Optional[Variant[Integer[0], String]] $memory_channels = undef, Optional[Integer[0]] $memory_channels = undef,
Optional[String] $host_core_list = undef, Optional[String] $host_core_list = undef,
Optional[String] $pmd_core_list = undef, Optional[String] $pmd_core_list = undef,
Optional[Variant[String, Integer, Array[String], Array[Integer]]] $socket_mem = undef, Optional[Variant[String, Integer, Array[String], Array[Integer]]] $socket_mem = undef,
@ -140,16 +140,9 @@ class vswitch::dpdk (
$pmd_core_mask = range_to_mask($pmd_core_list) $pmd_core_mask = range_to_mask($pmd_core_list)
$dpdk_lcore_mask = range_to_mask($host_core_list) $dpdk_lcore_mask = range_to_mask($host_core_list)
if $memory_channels =~ String {
warning('Support for string by memory_channels is deprecated. Use integer instead')
}
$memory_channels_conf = $memory_channels ? { $memory_channels_conf = $memory_channels ? {
String => empty($memory_channels) ? { undef => undef,
true => undef, default => "-n ${memory_channels}",
default => "-n ${memory_channels}",
},
Integer => "-n ${memory_channels}",
default => undef,
} }
$dpdk_configs = { $dpdk_configs = {

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``vswitch::dpdk::memory_channels`` parmeter now requires an integer
value.