Browse Source

Add userspace-tso configuration in open_vswitch

Change-Id: I8ea12fd832b3d1aa5aa0150a8586410748a286d4
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr@redhat.com>
changes/99/723799/3
Gowrishankar Muthukrishnan 2 years ago
parent
commit
20577bd739
  1. 8
      doc/source/roles/role-tripleo-ovs-dpdk.rst
  2. 1
      tripleo_ansible/roles/tripleo_ovs_dpdk/defaults/main.yml
  3. 5
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/tests/test_default.py
  4. 1
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/converge.yml
  5. 6
      tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/tests/test_positive.py
  6. 18
      tripleo_ansible/roles/tripleo_ovs_dpdk/tasks/config.yml

8
doc/source/roles/role-tripleo-ovs-dpdk.rst

@ -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
tripleo_ansible/roles/tripleo_ovs_dpdk/defaults/main.yml

@ -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
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/default/tests/test_default.py

@ -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
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/converge.yml

@ -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
tripleo_ansible/roles/tripleo_ovs_dpdk/molecule/positive/tests/test_positive.py

@ -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
tripleo_ansible/roles/tripleo_ovs_dpdk/tasks/config.yml

@ -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