CSIT-866: wrk onboarding in CSIT
[csit.git] / resources / libraries / robot / performance / performance_setup.robot
1 # Copyright (c) 2018 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.DUTSetup
16 | Library | resources.tools.wrk.wrk
17 | Resource | resources/libraries/robot/performance/performance_configuration.robot
18 | Resource | resources/libraries/robot/performance/performance_utils.robot
19 | Documentation | Performance suite keywords - Suite and test setups and
20 | ... | teardowns.
21
22 *** Keywords ***
23
24 # Keywords used in setups and teardowns
25
26 | Set variables in 2-node circular topology
27 | | [Documentation]
28 | | ... | Compute path for testing on two given nodes in circular
29 | | ... | topology and set corresponding suite variables.
30 | | ...
31 | | ... | _NOTE:_ This KW sets following suite variables:
32 | | ... | - tg - TG node
33 | | ... | - tg_if1 - 1st TG interface towards DUT.
34 | | ... | - tg_if2 - 2nd TG interface towards DUT.
35 | | ... | - dut1 - DUT1 node
36 | | ... | - dut1_if1 - 1st DUT interface towards TG.
37 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
38 | | ...
39 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
40 | | Compute Path | always_same_link=${FALSE}
41 | | ${tg_if1} | ${tg}= | First Interface
42 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
43 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
44 | | ${tg_if2} | ${tg}= | Last Interface
45 | | Set Suite Variable | ${tg}
46 | | Set Suite Variable | ${tg_if1}
47 | | Set Suite Variable | ${tg_if2}
48 | | Set Suite Variable | ${dut1}
49 | | Set Suite Variable | ${dut1_if1}
50 | | Set Suite Variable | ${dut1_if2}
51
52 | Set variables in 3-node circular topology
53 | | [Documentation]
54 | | ... | Compute path for testing on three given nodes in circular
55 | | ... | topology and set corresponding suite variables.
56 | | ...
57 | | ... | _NOTE:_ This KW sets following suite variables:
58 | | ... | - tg - TG node
59 | | ... | - tg_if1 - TG interface towards DUT1.
60 | | ... | - tg_if2 - TG interface towards DUT2.
61 | | ... | - dut1 - DUT1 node
62 | | ... | - dut1_if1 - DUT1 interface towards TG.
63 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
64 | | ... | - dut2 - DUT2 node
65 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
66 | | ... | - dut2_if2 - DUT2 interface towards TG.
67 | | ...
68 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
69 | | ... | ${nodes['TG']}
70 | | Compute Path
71 | | ${tg_if1} | ${tg}= | Next Interface
72 | | ${dut1_if1} | ${dut1}= | Next Interface
73 | | ${dut1_if2} | ${dut1}= | Next Interface
74 | | ${dut2_if1} | ${dut2}= | Next Interface
75 | | ${dut2_if2} | ${dut2}= | Next Interface
76 | | ${tg_if2} | ${tg}= | Next Interface
77 | | Set Suite Variable | ${tg}
78 | | Set Suite Variable | ${tg_if1}
79 | | Set Suite Variable | ${tg_if2}
80 | | Set Suite Variable | ${dut1}
81 | | Set Suite Variable | ${dut1_if1}
82 | | Set Suite Variable | ${dut1_if2}
83 | | Set Suite Variable | ${dut2}
84 | | Set Suite Variable | ${dut2_if1}
85 | | Set Suite Variable | ${dut2_if2}
86
87 | Set variables in 2-node circular topology with DUT interface model
88 | | [Documentation]
89 | | ... | Compute path for testing on two given nodes in circular topology
90 | | ... | based on interface model provided as an argument and set
91 | | ... | corresponding suite variables.
92 | | ...
93 | | ... | *Arguments:*
94 | | ... | - iface_model - Interface model. Type: string
95 | | ...
96 | | ... | _NOTE:_ This KW sets following suite variables:
97 | | ... | - tg - TG node
98 | | ... | - tg_if1 - 1st TG interface towards DUT.
99 | | ... | - tg_if2 - 2nd TG interface towards DUT.
100 | | ... | - dut1 - DUT1 node
101 | | ... | - dut1_if1 - 1st DUT interface towards TG.
102 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
103 | | ...
104 | | ... | *Example:*
105 | | ...
106 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
107 | | ... | \| Intel-X520-DA2 \|
108 | | ...
109 | | [Arguments] | ${iface_model}
110 | | ...
111 | | ${iface_model_list}= | Create list | ${iface_model}
112 | | Append Node | ${nodes['TG']}
113 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
114 | | Append Node | ${nodes['TG']}
115 | | Compute Path | always_same_link=${FALSE}
116 | | ${tg_if1} | ${tg}= | First Interface
117 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
118 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
119 | | ${tg_if2} | ${tg}= | Last Interface
120 | | Set Suite Variable | ${tg}
121 | | Set Suite Variable | ${tg_if1}
122 | | Set Suite Variable | ${tg_if2}
123 | | Set Suite Variable | ${dut1}
124 | | Set Suite Variable | ${dut1_if1}
125 | | Set Suite Variable | ${dut1_if2}
126
127 | Set variables in 3-node circular topology with DUT interface model
128 | | [Documentation]
129 | | ... | Compute path for testing on three given nodes in circular topology
130 | | ... | based on interface model provided as an argument and set
131 | | ... | corresponding suite variables.
132 | | ...
133 | | ... | *Arguments:*
134 | | ... | - iface_model - Interface model. Type: string
135 | | ...
136 | | ... | _NOTE:_ This KW sets following suite variables:
137 | | ... | - tg - TG node
138 | | ... | - tg_if1 - TG interface towards DUT1.
139 | | ... | - tg_if2 - TG interface towards DUT2.
140 | | ... | - dut1 - DUT1 node
141 | | ... | - dut1_if1 - DUT1 interface towards TG.
142 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
143 | | ... | - dut2 - DUT2 node
144 | | ... | - dut2_if1 - DUT2 interface towards TG.
145 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
146 | | ...
147 | | ... | *Example:*
148 | | ...
149 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
150 | | ... | \| Intel-X520-DA2 \|
151 | | ...
152 | | [Arguments] | ${iface_model}
153 | | ...
154 | | ${iface_model_list}= | Create list | ${iface_model}
155 | | Append Node | ${nodes['TG']}
156 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
157 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
158 | | Append Node | ${nodes['TG']}
159 | | Compute Path
160 | | ${tg_if1} | ${tg}= | Next Interface
161 | | ${dut1_if1} | ${dut1}= | Next Interface
162 | | ${dut1_if2} | ${dut1}= | Next Interface
163 | | ${dut2_if1} | ${dut2}= | Next Interface
164 | | ${dut2_if2} | ${dut2}= | Next Interface
165 | | ${tg_if2} | ${tg}= | Next Interface
166 | | Set Suite Variable | ${tg}
167 | | Set Suite Variable | ${tg_if1}
168 | | Set Suite Variable | ${tg_if2}
169 | | Set Suite Variable | ${dut1}
170 | | Set Suite Variable | ${dut1_if1}
171 | | Set Suite Variable | ${dut1_if2}
172 | | Set Suite Variable | ${dut2}
173 | | Set Suite Variable | ${dut2_if1}
174 | | Set Suite Variable | ${dut2_if2}
175
176 | Tear down guest VM with dpdk-testpmd
177 | | [Documentation]
178 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
179 | | ... | Argument is dictionary of all qemu nodes running with its names.
180 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
181 | | ...
182 | | ... | *Arguments:*
183 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
184 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
185 | | ...
186 | | ... | *Example:*
187 | | ...
188 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
189 | | ... | \| ${dut_vm_refs} \|
190 | | ...
191 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
192 | | ${vms_number}= | Get Length | ${dut_vm_refs}
193 | | ${index}= | Set Variable | ${0}
194 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
195 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
196 | | | ${index}= | Evaluate | ${index} + 1
197 | | | Dpdk Testpmd Stop | ${vm}
198 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
199 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
200 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
201
202 | Tear down guest VM
203 | | [Documentation]
204 | | ... | Stop all qemu processes running on ${dut_node}.
205 | | ... | Argument is dictionary of all qemu nodes running with its names.
206 | | ...
207 | | ... | *Arguments:*
208 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
209 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
210 | | ...
211 | | ... | *Example:*
212 | | ...
213 | | ... | \| Tear down guest VM \| ${node['DUT1']} \
214 | | ... | \| ${dut_vm_refs} \|
215 | | ...
216 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
217 | | ${vms_number}= | Get Length | ${dut_vm_refs}
218 | | ${index}= | Set Variable | ${0}
219 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
220 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
221 | | | ${index}= | Evaluate | ${index} + 1
222 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
223 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
224 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
225
226 # Suite setups
227
228 | Set up 2-node performance topology with DUT's NIC model
229 | | [Documentation]
230 | | ... | Suite preparation phase that setup default startup configuration of
231 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
232 | | ... | variables used in test cases based on interface model provided as an
233 | | ... | argument. Initializes traffic generator.
234 | | ...
235 | | ... | *Arguments:*
236 | | ... | - topology_type - Topology type. Type: string
237 | | ... | - nic_model - Interface model. Type: string
238 | | ...
239 | | ... | *Example:*
240 | | ...
241 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
242 | | ...
243 | | [Arguments] | ${topology_type} | ${nic_model}
244 | | ...
245 | | Set variables in 2-node circular topology with DUT interface model
246 | | ... | ${nic_model}
247 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
248 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
249
250 | Set up 2-node-switched performance topology with DUT's NIC model
251 | | [Documentation]
252 | | ... | Suite preparation phase that setup default startup configuration of
253 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
254 | | ... | variables used in test cases based on interface model provided as an
255 | | ... | argument. Initializes traffic generator.
256 | | ...
257 | | ... | *Arguments:*
258 | | ... | - topology_type - Topology type. Type: string
259 | | ... | - nic_model - Interface model. Type: string
260 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
261 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
262 | | ...
263 | | ... | *Example:*
264 | | ...
265 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
266 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
267 | | ...
268 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
269 | | ... | ${tg_if2_dest_mac}
270 | | ...
271 | | Set variables in 2-node circular topology with DUT interface model
272 | | ... | ${nic_model}
273 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
274 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
275 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
276
277 | Set up 3-node performance topology with DUT's NIC model
278 | | [Documentation]
279 | | ... | Suite preparation phase that setup default startup configuration of
280 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
281 | | ... | variables used in test cases based on interface model provided as an
282 | | ... | argument. Initializes traffic generator.
283 | | ...
284 | | ... | *Arguments:*
285 | | ... | - topology_type - Topology type. Type: string
286 | | ... | - nic_model - Interface model. Type: string
287 | | ...
288 | | ... | *Example:*
289 | | ...
290 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
291 | | ... | \| Intel-X520-DA2 \|
292 | | ...
293 | | [Arguments] | ${topology_type} | ${nic_model}
294 | | ...
295 | | Set variables in 3-node circular topology with DUT interface model
296 | | ... | ${nic_model}
297 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
298 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
299
300 | Set up DPDK 2-node performance topology with DUT's NIC model
301 | | [Documentation]
302 | | ... | Updates interfaces on all nodes and setup global
303 | | ... | variables used in test cases based on interface model provided as an
304 | | ... | argument. Initializes traffic generator. Initializes DPDK test
305 | | ... | environment.
306 | | ...
307 | | ... | *Arguments:*
308 | | ... | - topology_type - Topology type. Type: string
309 | | ... | - nic_model - Interface model. Type: string
310 | | ...
311 | | ... | *Example:*
312 | | ...
313 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
314 | | ... | \| L2 \| Intel-X520-DA2 \|
315 | | ...
316 | | [Arguments] | ${topology_type} | ${nic_model}
317 | | ...
318 | | Set variables in 2-node circular topology with DUT interface model
319 | | ... | ${nic_model}
320 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
321 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
322 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
323
324 | Set up DPDK 3-node performance topology with DUT's NIC model
325 | | [Documentation]
326 | | ... | Updates interfaces on all nodes and setup global
327 | | ... | variables used in test cases based on interface model provided as an
328 | | ... | argument. Initializes traffic generator. Initializes DPDK test
329 | | ... | environment.
330 | | ...
331 | | ... | *Arguments:*
332 | | ... | - topology_type - Topology type. Type: string
333 | | ... | - nic_model - Interface model. Type: string
334 | | ...
335 | | ... | *Example:*
336 | | ...
337 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
338 | | ...
339 | | [Arguments] | ${topology_type} | ${nic_model}
340 | | ...
341 | | Set variables in 3-node circular topology with DUT interface model
342 | | ... | ${nic_model}
343 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
344 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
345 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
346 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
347
348 | Set up IPSec performance test suite
349 | | [Documentation]
350 | | ... | Suite preparation phase that sets default startup configuration of
351 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
352 | | ... | variables used in test cases based on interface model provided as an
353 | | ... | argument. Initializes traffic generator.
354 | | ... | Then it configures crypto device and kernel module on all DUTs.
355 | | ...
356 | | ... | *Arguments:*
357 | | ... | - topology_type - Topology type. Type: string
358 | | ... | - nic_model - Interface model. Type: string
359 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
360 | | ... | (Optional). Type: string, default value: HW_cryptodev
361 | | ...
362 | | ... | *Example:*
363 | | ...
364 | | ... | \| Set up IPSec performance test suite \| L2 \
365 | | ... | \| Intel-X520-DA2 \|
366 | | ...
367 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
368 | | ...
369 | | Set up 3-node performance topology with DUT's NIC model
370 | | ... | ${topology_type} | ${nic_model}
371 | | ${numvfs}= | Set Variable If
372 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
373 | | ... | '${crypto_type}' == 'SW_cryptodev' | ${0}
374 | | Configure crypto device on all DUTs | force_init=${True} | numvfs=${numvfs}
375 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
376 | | ... | Configure kernel module on all DUTs | igb_uio | force_load=${True}
377
378 | Set up performance topology with containers
379 | | [Documentation]
380 | | ... | Suite preparation phase that starts containers
381 | | ...
382 | | Set Suite Variable | @{container_groups} | @{EMPTY}
383 | | Construct VNF containers on all DUTs
384 | | Acquire all 'VNF' containers
385 | | Create all 'VNF' containers
386 | | Configure VPP in all 'VNF' containers
387 | | Install VPP in all 'VNF' containers
388
389 | Set up 3-node performance topology with wrk and DUT's NIC model
390 | | [Documentation]
391 | | ... | Suite preparation phase that setup default startup configuration of
392 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
393 | | ... | variables used in test cases based on interface model provided as an
394 | | ... | argument. Installs the traffic generator.
395 | | ...
396 | | ... | *Arguments:*
397 | | ... | - iface_model - Interface model. Type: string
398 | | ...
399 | | ... | *Example:*
400 | | ...
401 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
402 | | ... | \| Intel-X520-DA2 \|
403 | | ...
404 | | [Arguments] | ${iface_model}
405 | | ...
406 | | Set variables in 3-node circular topology with DUT interface model
407 | | ... | ${iface_model}
408 | | Iface update numa node | ${tg}
409 # Make sure TRex is stopped
410 | | ${running}= | Is TRex running | ${tg}
411 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
412 | | ${curr_driver}= | Get PCI dev driver | ${tg}
413 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
414 | | Run keyword if | '${curr_driver}'!='${None}'
415 | | ... | PCI Driver Unbind | ${tg} |
416 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
417 # Bind tg_if1 to driver specified in the topology
418 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
419 | | PCI Driver Bind | ${tg}
420 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
421 # Set IP on tg_if1
422 | | ${intf_name}= | Get Linux interface name | ${tg}
423 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
424 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
425 | | Set Linux interface up | ${tg} | ${intf_name}
426 | | Install wrk | ${tg}
427
428 # Suite teardowns
429
430 | Tear down 3-node performance topology
431 | | [Documentation]
432 | | ... | Suite teardown phase with traffic generator teardown.
433 | | ...
434 | | Teardown traffic generator | ${tg}
435
436 | Tear down 3-node performance topology with container
437 | | [Documentation]
438 | | ... | Suite teardown phase with traffic generator teardown and container
439 | | ... | destroy.
440 | | ...
441 | | Teardown traffic generator | ${tg}
442 | | :FOR | ${group} | IN | @{container_groups}
443 | | | Destroy all '${group}' containers
444
445 | Tear down 2-node performance topology
446 | | [Documentation]
447 | | ... | Suite teardown phase with traffic generator teardown.
448 | | ...
449 | | Teardown traffic generator | ${tg}
450
451 | Tear down 2-node performance topology with container
452 | | [Documentation]
453 | | ... | Suite teardown phase with traffic generator teardown and container
454 | | ... | destroy.
455 | | ...
456 | | Teardown traffic generator | ${tg}
457 | | :FOR | ${group} | IN | @{container_groups}
458 | | | Destroy all '${group}' containers
459
460 # Tests setups
461
462 | Set up performance test
463 | | [Documentation] | Common test setup for performance tests.
464 | | ...
465 | | Reset VAT History On All DUTs | ${nodes}
466 | | Create base startup configuration of VPP on all DUTs
467
468 | Set up performance test with Ligato Kubernetes
469 | | [Documentation] | Common test setup for performance tests with Ligato \
470 | | ... | Kubernetes.
471 | | ...
472 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
473 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
474 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
475 | | Apply Kubernetes resource on all duts | ${nodes}
476 | | ... | configmaps/vswitch-agent-cfg.yaml
477 | | Apply Kubernetes resource on all duts | ${nodes}
478 | | ... | configmaps/vnf-agent-cfg.yaml
479 | | Apply Kubernetes resource on all duts | ${nodes}
480 | | ... | pods/contiv-sfc-controller.yaml
481 | | Apply Kubernetes resource on all duts | ${nodes}
482 | | ... | pods/contiv-vswitch.yaml
483
484 # Tests teardowns
485
486 | Tear down performance discovery test
487 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
488 | | ... | tests.
489 | | ...
490 | | ... | *Arguments:*
491 | | ... | - rate - Rate for sending packets. Type: string
492 | | ... | - framesize - L2 Frame Size [B]. Type: integer
493 | | ... | - topology_type - Topology type. Type: string
494 | | ...
495 | | ... | *Example:*
496 | | ...
497 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
498 | | ... | \| 3-node-IPv4 \|
499 | | ...
500 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
501 | | ...
502 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
503 | | Show VAT History On All DUTs | ${nodes}
504 | | Show statistics on all DUTs | ${nodes}
505 | | Run Keyword If Test Failed
506 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
507 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
508
509 | Tear down performance ndrchk test
510 | | [Documentation] | Common test teardown for ndrchk performance tests.
511 | | ...
512 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
513 | | Show VAT History On All DUTs | ${nodes}
514 | | Show statistics on all DUTs | ${nodes}
515
516 | Tear down performance pdrchk test
517 | | [Documentation] | Common test teardown for pdrchk performance tests.
518 | | ...
519 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
520 | | Show VAT History On All DUTs | ${nodes}
521 | | Show statistics on all DUTs | ${nodes}
522
523 | Tear down performance test with wrk
524 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
525 | | ... | tests.
526 | | ...
527 | | ... | *Example:*
528 | | ...
529 | | ... | \| Tear down performance test with wrk \|
530 | | ...
531 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
532 | | Show VAT History On All DUTs | ${nodes}
533 | | Show statistics on all DUTs | ${nodes}
534
535 | Tear down performance test with vhost and VM with dpdk-testpmd
536 | | [Documentation] | Common test teardown for performance tests which use
537 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
538 | | ...
539 | | ... | *Arguments:*
540 | | ... | - rate - Rate for sending packets. Type: string
541 | | ... | - framesize - L2 Frame Size [B]. Type: integer
542 | | ... | - topology_type - Topology type. Type: string
543 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
544 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
545 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
546 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
547 | | ...
548 | | ... | *Example:*
549 | | ...
550 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
551 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
552 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
553 | | ...
554 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
555 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
556 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
557 | | ...
558 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
559 | | Show VAT History On All DUTs | ${nodes}
560 | | Show VPP vhost on all DUTs | ${nodes}
561 | | Show statistics on all DUTs | ${nodes}
562 | | Run Keyword If Test Failed
563 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
564 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
565 | | Run keyword unless | ${dut1_node}==${None}
566 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
567 | | Run keyword unless | ${dut2_node}==${None}
568 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
569
570 | Tear down performance pdrchk test with vhost and VM with dpdk-testpmd
571 | | [Documentation] | Common test teardown for performance pdrchk tests which \
572 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
573 | | ...
574 | | ... | *Arguments:*
575 | | ... | - rate - Rate for sending packets. Type: string
576 | | ... | - framesize - L2 Frame Size [B]. Type: integer
577 | | ... | - topology_type - Topology type. Type: string
578 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
579 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
580 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
581 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
582 | | ...
583 | | ... | *Example:*
584 | | ...
585 | | ... | \| Tear down performance pdrchk test with vhost and VM with \
586 | | ... | dpdk-testpmd \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \
587 | | ... | \| ${dut_vm_refs} \| ${node['DUT2']} \| ${dut_vm_refs} \|
588 | | ...
589 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
590 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
591 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
592 | | ...
593 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
594 | | Show VAT History On All DUTs | ${nodes}
595 | | Show VPP vhost on all DUTs | ${nodes}
596 | | Show statistics on all DUTs | ${nodes}
597 | | Run keyword unless | ${dut1_node}==${None}
598 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
599 | | Run keyword unless | ${dut2_node}==${None}
600 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
601
602 | Tear down DPDK 3-node performance topology
603 | | [Documentation]
604 | | ... | Suite teardown phase with traffic generator teardown.
605 | | ... | Cleanup DPDK test environment.
606 | | ...
607 | | Teardown traffic generator | ${tg}
608 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
609 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
610
611 | Tear down DPDK 2-node performance topology
612 | | [Documentation]
613 | | ... | Suite teardown phase with traffic generator teardown.
614 | | ... | Cleanup DPDK test environment.
615 | | ...
616 | | Teardown traffic generator | ${tg}
617 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
618
619 | Tear down performance discovery test with NAT
620 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
621 | | ... | tests with NAT feature used.
622 | | ...
623 | | ... | *Arguments:*
624 | | ... | - rate - Rate for sending packets. Type: string
625 | | ... | - framesize - L2 Frame Size [B]. Type: integer
626 | | ... | - traffic_profile - Traffic profile. Type: string
627 | | ...
628 | | ... | *Example:*
629 | | ...
630 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
631 | | ... | \| ${traffic_profile} \|
632 | | ...
633 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
634 | | ...
635 | | Tear down performance discovery test | ${rate} | ${framesize}
636 | | ... | ${traffic_profile}
637 | | Show NAT verbose | ${dut1}
638 | | Show NAT verbose | ${dut2}
639
640 | Tear down performance test with ACL
641 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
642 | | ... | tests with ACL feature used.
643 | | ...
644 | | ... | *Arguments:*
645 | | ... | - rate - Rate for sending packets. Type: string
646 | | ... | - framesize - L2 Frame Size [B]. Type: integer
647 | | ... | - traffic_profile - Traffic profile. Type: string
648 | | ...
649 | | ... | *Example:*
650 | | ...
651 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
652 | | ... | \| ${traffic_profile} \|
653 | | ...
654 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
655 | | ...
656 | | Tear down performance discovery test | ${rate} | ${framesize}
657 | | ... | ${traffic_profile}
658 | | Vpp Log Plugin Acl Settings | ${dut1}
659 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
660 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
661
662 | Tear down performance test with MACIP ACL
663 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
664 | | ... | tests with MACIP ACL feature used.
665 | | ...
666 | | ... | *Arguments:*
667 | | ... | - rate - Rate for sending packets. Type: string
668 | | ... | - framesize - L2 Frame Size [B]. Type: integer
669 | | ... | - traffic_profile - Traffic profile. Type: string
670 | | ...
671 | | ... | *Example:*
672 | | ...
673 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
674 | | ... | \| ${traffic_profile} \|
675 | | ...
676 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
677 | | ...
678 | | Tear down performance discovery test | ${rate} | ${framesize}
679 | | ... | ${traffic_profile}
680 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
681 | | ... | Vpp Log Macip Acl Settings | ${dut1}
682 | | Run Keyword And Ignore Error
683 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
684
685 | Tear down performance test with Ligato Kubernetes
686 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
687 | | ... | tests with Ligato Kubernetes.
688 | | ...
689 | | Run Keyword If Test Failed
690 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
691 | | Run Keyword If Test Failed
692 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
693 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit