openvswitch: add option to set hw offload

Change-Id: I8bf5453c6943fd2ad8912e5d80af179296ada894
This commit is contained in:
Michal Nasiadka 2021-11-25 07:01:47 +01:00
parent 8df6cf4814
commit dac58808c0
4 changed files with 21 additions and 5 deletions

View File

@ -104,3 +104,4 @@ openvswitch_vswitchd_extra_volumes: "{{ openvswitch_extra_volumes }}"
#############
openvswitch_system_id: "{{ ansible_facts.hostname }}"
openvswitch_hw_offload: "no"

View File

@ -1,6 +1,6 @@
---
# NOTE(mnasiadka): external_ids:system-id uniquely identifies a physical system, used by OVN and other controllers
- name: Set system-id
- name: Set system-id and hw-offload
become: true
kolla_toolbox:
user: root
@ -8,10 +8,13 @@
module_args:
table: Open_vSwitch
record: .
col: external_ids
key: system-id
value: "{{ openvswitch_system_id }}"
state: present
col: "{{ item.col }}"
key: "{{ item.name }}"
value: "{{ item.value }}"
state: "{{ item.state | default('present') }}"
loop:
- { col: "external_ids", name: "system-id", value: "{{ openvswitch_system_id }}" }
- { col: "other_config", name: "hw-offload", value: true, state: "{{ 'present' if openvswitch_hw_offload | bool else 'absent' }}" }
- name: Ensuring OVS bridge is properly setup
become: true

View File

@ -71,6 +71,13 @@ VFs enabled:
[sriov_nic]
exclude_devices =
To use OpenvSwitch hardware offloading modify `/etc/kolla/globals.yml``:
.. path /etc/kolla/globals.yml
.. code-block:: yaml
openvswitch_hw_offload: "yes"
Run deployment.
Verification

View File

@ -0,0 +1,5 @@
---
features:
- |
Adds functionality to enable HW offload in OpenvSwitch using
``openvswitch_hw_offload`` variable.