Merge "Accept array for dpdk-socket-mem"
This commit is contained in:
commit
3ebae506d8
|
@ -102,7 +102,7 @@ class vswitch::dpdk (
|
|||
|
||||
$dpdk_configs = {
|
||||
'other_config:dpdk-extra' => { value => $memory_channels_conf},
|
||||
'other_config:dpdk-socket-mem' => { value => $socket_mem},
|
||||
'other_config:dpdk-socket-mem' => { value => join(any2array($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},
|
||||
|
|
|
@ -60,7 +60,7 @@ describe 'vswitch::dpdk' do
|
|||
context 'when passing all params' do
|
||||
before :each do
|
||||
params.merge!(:host_core_list => '1,2')
|
||||
params.merge!(:socket_mem => '1024')
|
||||
params.merge!(:socket_mem => '1024,1024')
|
||||
params.merge!(:memory_channels => 2)
|
||||
params.merge!(:pmd_core_list => '22,23,24,25,66,67,68,69')
|
||||
params.merge!(:enable_hw_offload => true)
|
||||
|
@ -75,7 +75,7 @@ describe 'vswitch::dpdk' do
|
|||
:value => '3c0000000003c00000', :wait => false,
|
||||
)
|
||||
is_expected.to contain_vs_config('other_config:dpdk-socket-mem').with(
|
||||
:value => '1024', :wait => false,
|
||||
:value => '1024,1024', :wait => false,
|
||||
)
|
||||
is_expected.to contain_vs_config('other_config:dpdk-lcore-mask').with(
|
||||
:value => '6', :wait => false,
|
||||
|
@ -95,6 +95,18 @@ describe 'vswitch::dpdk' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when passing arrays' do
|
||||
before :each do
|
||||
params.merge!(:socket_mem => [1024, 1024])
|
||||
end
|
||||
|
||||
it 'configres dpdk options with comma-separated lists' do
|
||||
is_expected.to contain_vs_config('other_config:dpdk-socket-mem').with(
|
||||
:value => '1024,1024', :wait => false,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
|
Loading…
Reference in New Issue