Add OVS Hardware Offloading to OVN

Change-Id: Ibe2d12c5befaab20510ddf2d1f8ed15f792774a3
This commit is contained in:
Sulaiman Radwan 2018-01-23 02:39:16 -05:00
parent 2a9b3ad3bf
commit 7f6e916253
2 changed files with 15 additions and 2 deletions

View File

@ -33,6 +33,11 @@
# (optional) Name of the integration bridge.
# 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(
$ovn_remote,
$ovn_encap_ip,
@ -41,6 +46,7 @@ class ovn::controller(
$bridge_interface_mappings = [],
$hostname = $::fqdn,
$ovn_bridge = 'br-int',
$enable_hw_offload = false,
) {
include ::ovn::params
include ::vswitch::ovs
@ -89,6 +95,12 @@ class ovn::controller(
$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']
}

View File

@ -9,7 +9,8 @@ describe 'ovn::controller' do
:ovn_bridge_mappings => ['physnet-1:br-1'],
:ovn_bridge => 'br-int',
:bridge_interface_mappings => ['br-1:eth1'],
:hostname => 'server1.example.com'
:hostname => 'server1.example.com',
:enable_hw_offload => false
}
end