diff --git a/ansible/roles/openvswitch/defaults/main.yml b/ansible/roles/openvswitch/defaults/main.yml index dce692f112..a5e3d84537 100644 --- a/ansible/roles/openvswitch/defaults/main.yml +++ b/ansible/roles/openvswitch/defaults/main.yml @@ -104,3 +104,4 @@ openvswitch_vswitchd_extra_volumes: "{{ openvswitch_extra_volumes }}" ############# openvswitch_system_id: "{{ ansible_facts.hostname }}" +openvswitch_hw_offload: "no" diff --git a/ansible/roles/openvswitch/tasks/post-config.yml b/ansible/roles/openvswitch/tasks/post-config.yml index 74995b1274..d4e0b5e9b9 100644 --- a/ansible/roles/openvswitch/tasks/post-config.yml +++ b/ansible/roles/openvswitch/tasks/post-config.yml @@ -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 diff --git a/doc/source/reference/networking/sriov.rst b/doc/source/reference/networking/sriov.rst index 53d6db4564..404dddd8ba 100644 --- a/doc/source/reference/networking/sriov.rst +++ b/doc/source/reference/networking/sriov.rst @@ -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 diff --git a/releasenotes/notes/openvswitch-hw-offload-5d9319d69472db69.yaml b/releasenotes/notes/openvswitch-hw-offload-5d9319d69472db69.yaml new file mode 100644 index 0000000000..9a4f089eaa --- /dev/null +++ b/releasenotes/notes/openvswitch-hw-offload-5d9319d69472db69.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds functionality to enable HW offload in OpenvSwitch using + ``openvswitch_hw_offload`` variable.