Add userspace-tso configuration in open_vswitch

Change-Id: I8ea12fd832b3d1aa5aa0150a8586410748a286d4
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr@redhat.com>
This commit is contained in:
Gowrishankar Muthukrishnan 2020-04-27 21:34:03 +05:30
parent 9baf1b8e3a
commit 20577bd739
6 changed files with 38 additions and 1 deletions

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

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

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

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

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"

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