dpdk: TSO support
This change allows users to enable TSO support[1] in ovs-dpdk datapath. [1] https://docs.openvswitch.org/en/latest/topics/userspace-tso/ Change-Id: Ib88dbcfc78e703a4249b942938c0f985f826b5b4
This commit is contained in:
@@ -54,6 +54,10 @@
|
|||||||
# [*handler_cores*]
|
# [*handler_cores*]
|
||||||
# (Optional) Number of cores to be used for OVS handler threads.
|
# (Optional) Number of cores to be used for OVS handler threads.
|
||||||
#
|
#
|
||||||
|
# [*enable_tso*]
|
||||||
|
# (Optional) Enable TSO support.
|
||||||
|
# Defaults to false.
|
||||||
|
#
|
||||||
# [*vs_config*]
|
# [*vs_config*]
|
||||||
# (optional) allow configuration of arbitary vsiwtch configurations.
|
# (optional) allow configuration of arbitary vsiwtch configurations.
|
||||||
# The value is an hash of vs_config resources. Example:
|
# The value is an hash of vs_config resources. Example:
|
||||||
@@ -73,6 +77,7 @@ class vswitch::dpdk (
|
|||||||
$vlan_limit = undef,
|
$vlan_limit = undef,
|
||||||
$revalidator_cores = undef,
|
$revalidator_cores = undef,
|
||||||
$handler_cores = undef,
|
$handler_cores = undef,
|
||||||
|
$enable_tso = false,
|
||||||
$vs_config = {},
|
$vs_config = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -160,6 +165,18 @@ class vswitch::dpdk (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $enable_tso {
|
||||||
|
vs_config { 'other_config:userspace-tso-enable':
|
||||||
|
value => $enable_tso,
|
||||||
|
wait => false,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vs_config { 'other_config:userspace-tso-enable':
|
||||||
|
ensure => absent,
|
||||||
|
wait => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vs_config { 'other_config:dpdk-init':
|
vs_config { 'other_config:dpdk-init':
|
||||||
value => true,
|
value => true,
|
||||||
wait => true,
|
wait => true,
|
||||||
|
|||||||
4
releasenotes/notes/dpdk-tso-40b62581f87ed122.yaml
Normal file
4
releasenotes/notes/dpdk-tso-40b62581f87ed122.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``vswitch::dpdk::enable_tso`` parameter has been added.
|
||||||
@@ -59,6 +59,9 @@ describe 'vswitch::dpdk' do
|
|||||||
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
||||||
:value => nil, :wait => true,
|
:value => nil, :wait => true,
|
||||||
)
|
)
|
||||||
|
is_expected.to contain_vs_config('other_config:userspace-tso-enable').with(
|
||||||
|
:ensure => 'absent', :wait => false,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
it 'restarts the service when needed' do
|
it 'restarts the service when needed' do
|
||||||
is_expected.to contain_exec('restart openvswitch').with(
|
is_expected.to contain_exec('restart openvswitch').with(
|
||||||
@@ -79,6 +82,7 @@ describe 'vswitch::dpdk' do
|
|||||||
params.merge!(:enable_hw_offload => true)
|
params.merge!(:enable_hw_offload => true)
|
||||||
params.merge!(:disable_emc => true)
|
params.merge!(:disable_emc => true)
|
||||||
params.merge!(:vlan_limit => 2)
|
params.merge!(:vlan_limit => 2)
|
||||||
|
params.merge!(:enable_tso => true)
|
||||||
end
|
end
|
||||||
it 'configures dpdk options' do
|
it 'configures dpdk options' do
|
||||||
is_expected.to contain_vs_config('other_config:dpdk-init').with(
|
is_expected.to contain_vs_config('other_config:dpdk-init').with(
|
||||||
@@ -108,6 +112,9 @@ describe 'vswitch::dpdk' do
|
|||||||
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
||||||
:value => 2, :wait => true,
|
:value => 2, :wait => true,
|
||||||
)
|
)
|
||||||
|
is_expected.to contain_vs_config('other_config:userspace-tso-enable').with(
|
||||||
|
:value => true, :wait => false,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user