Browse Source

Merge "Add userspace-tso configuration in open_vswitch"

changes/03/737003/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
d4c3b7e1ea
6 changed files with 38 additions and 1 deletions
  1. +7
    -1
      doc/source/roles/role-tripleo-ovs-dpdk.rst
  2. +1
    -0
      tripleo_ansible/roles/tripleo_ovs_dpdk/defaults/main.yml
  3. +5
    -0
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/tests/test_default.py
  4. +1
    -0
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/converge.yml
  5. +6
    -0
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/tests/test_positive.py
  6. +18
    -0
      tripleo_ansible/roles/tripleo_ovs_dpdk/tasks/config.yml

+ 7
- 1
doc/source/roles/role-tripleo-ovs-dpdk.rst View File

@@ -75,7 +75,7 @@ Role Defaults
- **Default**: ``''``
- **Examples**: ``'2'``

- ``triploe_ovs_dpdk_emc_insertion_probablity``
- ``tripleo_ovs_dpdk_emc_insertion_probablity``

- **Description**: (*Optional*) EMC insertion inverse probability. Its a
string with a number of flows (out of which 1 flow will cached). Having
@@ -83,6 +83,12 @@ Role Defaults
- **Default**: ``''``
- **Examples**: ``'100'``

- ``tripleo_ovs_dpdk_enable_tso``

- **Description**: (*Optional*) Enable TSO support in OVS DPDK datapath.
- **Default**: ``false``
- **Examples**: ``true``



Modules


+ 1
- 0
tripleo_ansible/roles/tripleo_ovs_dpdk/defaults/main.yml View File

@@ -27,3 +27,4 @@ tripleo_ovs_dpdk_socket_memory: ""
tripleo_ovs_dpdk_revalidator_cores: ""
tripleo_ovs_dpdk_handler_cores: ""
tripleo_ovs_dpdk_emc_insertion_probablity: ""
tripleo_ovs_dpdk_enable_tso: false

+ 5
- 0
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/tests/test_default.py View File

@@ -70,3 +70,8 @@ def test_positive_handler_threads(host):
def test_positive_emc_prob(host):
other_config = get_config(host)
assert 'emc-insert-inv-prob' not in other_config


def test_positive_enable_tso(host):
other_config = get_config(host)
assert 'userspace-tso-enable' not in other_config

+ 1
- 0
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/converge.yml View File

@@ -30,3 +30,4 @@
tripleo_ovs_dpdk_revalidator_cores: 2
tripleo_ovs_dpdk_handler_cores: 2
tripleo_ovs_dpdk_emc_insertion_probablity: 0
tripleo_ovs_dpdk_enable_tso: true

+ 6
- 0
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/tests/test_positive.py View File

@@ -74,3 +74,9 @@ def test_positive_emc_prob(host):
other_config = get_config(host)
dpdk_extra = other_config['emc-insert-inv-prob'].replace('"', '')
assert dpdk_extra == "0"


def test_positive_enable_tso(host):
other_config = get_config(host)
tso_enabled = other_config['userspace-tso-enable'].replace('"', '')
assert tso_enabled == "true"

+ 18
- 0
tripleo_ansible/roles/tripleo_ovs_dpdk/tasks/config.yml View File

@@ -125,3 +125,21 @@
col: other_config
key: emc-insert-inv-prob
when: not tripleo_ovs_dpdk_emc_insertion_probablity|string

- name: Enable TSO in datapath
openvswitch_db:
table: open_vswitch
record: .
col: other_config
key: userspace-tso-enable
value: "{{ tripleo_ovs_dpdk_enable_tso }}"
when: tripleo_ovs_dpdk_enable_tso|bool

- name: Disable TSO in datapath
openvswitch_db:
state: absent
table: open_vswitch
record: .
col: other_config
key: userspace-tso-enable
when: not tripleo_ovs_dpdk_enable_tso|bool

Loading…
Cancel
Save