Skip to content

Commit f014776

Browse files
committed
Multqueue Discovery: Allow to set down interfaces
The MQ discovery test is designed to have a 1:1 match between sriov interfaces in trex VM and dpdk interfaces in testpmd-dpdk-dut VM. This is a typical workflow deployed by Pre Tempest stage and used in Multiqueue Discovery stage: +-------------------------+----------------------------------+ | Name | Networks | +-------------------------+----------------------------------+ | testpmd-dpdk-dut | dpdk_net_nic0_167=10.10.167.143; | | | dpdk_net_nic1_168=10.10.168.160 | | trex | sriov_net_167=10.10.167.149; | | | sriov_net_168=10.10.168.164 | +-------------------------+----------------------------------+ The trex VM will inject traffic in sriov_net_167 and sriov_net_168 and it will be received in dpdk_net_nic0_167 and dpdk_net_nic1_168 respectively on testpmd-dpdk-dut. In MQ exclusively dedicated scenarios we have a NIC configuration like this: - type: ovs_user_bridge name: br-dpdk0 mtu: 9000 use_dhcp: false members: - type: ovs_dpdk_port name: dpdk2 mtu: 9000 rx_queue: 3 members: - type: interface name: nic5 - type: ovs_user_bridge name: br-dpdk1 mtu: 9000 use_dhcp: false members: - type: ovs_dpdk_port name: dpdk3 mtu: 9000 rx_queue: 3 members: - type: interface name: nic6 Along with this config in tempest_config.yml: pmd_rxq_affinity: - interface: "dpdk2" pmd_rxq_affinity: "0:3,1:5,2:7" - interface: "dpdk3" pmd_rxq_affinity: "0:3,1:5,2:7" Using the configuration above we got the 1:1 matching between sriov and dpdk interfaces. However, for non MQ exclusively dedicated scenarios we have a NIC configuration like this: - type: ovs_user_bridge name: br-dpdk0 mtu: 9000 use_dhcp: false members: - type: ovs_dpdk_bond name: dpdkbond1 mtu: 9000 rx_queue: 3 members: - type: ovs_dpdk_port name: dpdk2 members: - type: interface name: nic5 - type: ovs_dpdk_port name: dpdk3 members: - type: interface name: nic6 - type: ovs_user_bridge name: br-dpdk1 mtu: 9000 use_dhcp: false members: - type: ovs_dpdk_port name: dpdk4 mtu: 9000 rx_queue: 3 members: - type: interface name: nic4 Then the test failed because the injected traffic in sriov_net_167 and sriov_net_168 is received in dpdk2, dpdk3, dpdk4 (no 1:1): sriov_net_167 -> dpdk2, dpdk3 sriov_net_168 -> dpdk4 Since non expected traffic deteced in one of the dpdk interfaces and error error like this was raised: Traceback (most recent call last): File "/opt/trex/current/multiqueue.py", line 486, in <module> main() File "/opt/trex/current/multiqueue.py", line 461, in main ast.literal_eval(args.pps)), File "/opt/trex/current/multiqueue.py", line 190, in parse_pmd_stats queue = queues_json[port_index]["queues"][str(queue_id)] KeyError: '3' To solve this issue the following config in tempest_config.yml is necessary: pmd_rxq_affinity: - interface: "dpdk2" pmd_rxq_affinity: "0:3,1:5,2:7" - interface: "dpdk4" pmd_rxq_affinity: "0:3,1:5,2:7" Along with this new ansible variable: testpmd_down_interfaces: - bridge: "br-dpdk0" interface: "dpdk3" This change provides support for testpmd_down_interfaces. This way, bringing down one of the dpdk interfaces the 1:1 relatioship between sriov and dpdk interfaces is kept and the MQ Discovery test can be executed successfully Change-Id: I46382eb519d11851529f062d7268944e9b32302f (cherry picked from commit e69ba19)
1 parent 7c8e6ef commit f014776

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

playbooks/tripleo/multiqueue/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ pmd_rxq_affinity: [ {'interface': 'dpdk2', 'pmd_rxq_affinity': '0:3,1:5,2:7'},
125125
{'interface': 'dpdk3', 'pmd_rxq_affinity': '0:3,1:5,2:7'} ]
126126
```
127127

128+
set down interfaces in OVS bridge
129+
130+
```
131+
testpmd_down_interfaces: [{'bridge': '<BRIDGE>', 'interface': '<IFACE>'}]
132+
```
133+
128134
multiqueue config
129135

130136
```

playbooks/tripleo/multiqueue/multiqueue_learning.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
value: "{{ item.pmd_rxq_affinity }}"
2121
loop: "{{ pmd_rxq_affinity }}"
2222

23+
- name: set down interfaces
24+
command:
25+
cmd: "ovs-ofctl mod-port {{ item.bridge }} {{ item.interface }} down"
26+
loop: "{{ testpmd_down_interfaces | default([]) }}"
27+
2328
- hosts: testpmd-dpdk-dut
2429
gather_facts: no
2530
pre_tasks:
@@ -143,6 +148,11 @@
143148
cmd: "ovs-vsctl remove interface {{ item.interface }} other_config pmd-rxq-affinity"
144149
loop: "{{ pmd_rxq_affinity }}"
145150

151+
- name: set up interfaces
152+
command:
153+
cmd: "ovs-ofctl mod-port {{ item.bridge }} {{ item.interface }} up"
154+
loop: "{{ testpmd_down_interfaces | default([]) }}"
155+
146156
- hosts: trex
147157
become: true
148158
pre_tasks:

0 commit comments

Comments
 (0)