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_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 # 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 become: true
kolla_toolbox: kolla_toolbox:
user: root user: root
@ -8,10 +8,13 @@
module_args: module_args:
table: Open_vSwitch table: Open_vSwitch
record: . record: .
col: external_ids col: "{{ item.col }}"
key: system-id key: "{{ item.name }}"
value: "{{ openvswitch_system_id }}" value: "{{ item.value }}"
state: present 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 - name: Ensuring OVS bridge is properly setup
become: true become: true

View File

@ -71,6 +71,13 @@ VFs enabled:
[sriov_nic] [sriov_nic]
exclude_devices = 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. Run deployment.
Verification Verification

View File

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