Add OVS Hardware Offloading to OVN
Change-Id: Ibe2d12c5befaab20510ddf2d1f8ed15f792774a3
This commit is contained in:
parent
2a9b3ad3bf
commit
7f6e916253
|
@ -33,6 +33,11 @@
|
||||||
# (optional) Name of the integration bridge.
|
# (optional) Name of the integration bridge.
|
||||||
# Defaults to 'br-int'
|
# Defaults to 'br-int'
|
||||||
#
|
#
|
||||||
|
# [*enable_hw_offload*]
|
||||||
|
# (optional) Configure OVS to use
|
||||||
|
# Hardware Offload. This feature is
|
||||||
|
# supported from ovs 2.8.0.
|
||||||
|
# Defaults to False.
|
||||||
class ovn::controller(
|
class ovn::controller(
|
||||||
$ovn_remote,
|
$ovn_remote,
|
||||||
$ovn_encap_ip,
|
$ovn_encap_ip,
|
||||||
|
@ -41,6 +46,7 @@ class ovn::controller(
|
||||||
$bridge_interface_mappings = [],
|
$bridge_interface_mappings = [],
|
||||||
$hostname = $::fqdn,
|
$hostname = $::fqdn,
|
||||||
$ovn_bridge = 'br-int',
|
$ovn_bridge = 'br-int',
|
||||||
|
$enable_hw_offload = false,
|
||||||
) {
|
) {
|
||||||
include ::ovn::params
|
include ::ovn::params
|
||||||
include ::vswitch::ovs
|
include ::vswitch::ovs
|
||||||
|
@ -89,6 +95,12 @@ class ovn::controller(
|
||||||
$bridge_items = {}
|
$bridge_items = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
create_resources('vs_config', merge($config_items, $bridge_items))
|
if $enable_hw_offload {
|
||||||
|
$hw_offload = { 'other_config:hw-offload' => { 'value' => bool2str($enable_hw_offload) } }
|
||||||
|
}else {
|
||||||
|
$hw_offload = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
create_resources('vs_config', merge($config_items, $bridge_items, $hw_offload))
|
||||||
Service['openvswitch'] -> Vs_config<||> -> Service['controller']
|
Service['openvswitch'] -> Vs_config<||> -> Service['controller']
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,8 @@ describe 'ovn::controller' do
|
||||||
:ovn_bridge_mappings => ['physnet-1:br-1'],
|
:ovn_bridge_mappings => ['physnet-1:br-1'],
|
||||||
:ovn_bridge => 'br-int',
|
:ovn_bridge => 'br-int',
|
||||||
:bridge_interface_mappings => ['br-1:eth1'],
|
:bridge_interface_mappings => ['br-1:eth1'],
|
||||||
:hostname => 'server1.example.com'
|
:hostname => 'server1.example.com',
|
||||||
|
:enable_hw_offload => false
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue