Merge "Add support for the hw-offload option in dpdk"
This commit is contained in:
commit
ab3595ecc5
|
@ -29,6 +29,12 @@
|
|||
# socket 1 and no allocation for socket 0, the value should be "0,1024"
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*enable_hw_offload*]
|
||||
# (optional) Configure OVS to use
|
||||
# Hardware Offload. This feature is
|
||||
# supported from ovs 2.8.0.
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*disable_emc*]
|
||||
# (optional) Configure OVS to disable EMC.
|
||||
# Defaults to false
|
||||
|
@ -56,6 +62,7 @@ class vswitch::dpdk (
|
|||
$package_ensure = 'present',
|
||||
$pmd_core_list = undef,
|
||||
$socket_mem = undef,
|
||||
$enable_hw_offload = false,
|
||||
$disable_emc = false,
|
||||
$vlan_limit = $::os_service_default,
|
||||
$revalidator_cores = undef,
|
||||
|
@ -101,6 +108,16 @@ class vswitch::dpdk (
|
|||
notify => Vs_config['other_config:dpdk-init'],
|
||||
}
|
||||
|
||||
# lint:ignore:quoted_booleans
|
||||
if $enable_hw_offload {
|
||||
vs_config { 'other_config:hw-offload':
|
||||
value => 'true',
|
||||
notify => Service['openvswitch'],
|
||||
wait => true,
|
||||
}
|
||||
}
|
||||
# lint:endignore
|
||||
|
||||
if $disable_emc {
|
||||
vs_config { 'other_config:emc-insert-inv-prob':
|
||||
value => '0',
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``vsiwtch::dpdk::enable_hw_offload`` parameter has been added. This
|
||||
parameter can be used to enable or disable hardware offload when dpdk is
|
||||
used.
|
|
@ -27,6 +27,7 @@ describe 'vswitch::dpdk' do
|
|||
params.merge!(:socket_mem => '')
|
||||
params.merge!(:memory_channels => '' )
|
||||
params.merge!(:pmd_core_list => '')
|
||||
params.merge!(:enable_hw_offload => false)
|
||||
params.merge!(:disable_emc => false)
|
||||
end
|
||||
it 'configures dpdk options' do
|
||||
|
@ -45,6 +46,7 @@ describe 'vswitch::dpdk' do
|
|||
is_expected.to contain_vs_config('other_config:dpdk-extra').with(
|
||||
:value => nil, :wait => false,
|
||||
)
|
||||
is_expected.to_not contain_vs_config('other_config:hw-offload')
|
||||
is_expected.to_not contain_vs_config('other_config:emc-insert-inv-prob')
|
||||
is_expected.to_not contain_vs_config('other_config:vlan-limit')
|
||||
|
||||
|
@ -57,6 +59,7 @@ describe 'vswitch::dpdk' do
|
|||
params.merge!(:socket_mem => '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)
|
||||
params.merge!(:disable_emc => true)
|
||||
params.merge!(:vlan_limit => 2)
|
||||
end
|
||||
|
@ -76,6 +79,9 @@ describe 'vswitch::dpdk' do
|
|||
is_expected.to contain_vs_config('other_config:dpdk-extra').with(
|
||||
:value => '-n 2', :wait => false,
|
||||
)
|
||||
is_expected.to contain_vs_config('other_config:hw-offload').with(
|
||||
:value => 'true', :notify => 'Service[openvswitch]', :wait => true,
|
||||
)
|
||||
is_expected.to contain_vs_config('other_config:emc-insert-inv-prob').with(
|
||||
:value => '0', :notify => 'Service[openvswitch]', :wait => false,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue