CSIT-1097: Migrate ip4 to NDRPDR and edit MRR
[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 | Resource | resources/libraries/robot/tcp/tcp_setup.robot
20 | Documentation | Performance suite keywords - Suite and test setups and
21 | ... | teardowns.
22
23 *** Keywords ***
24
25 # Keywords used in setups and teardowns
26
27 | Set variables in 2-node circular topology
28 | | [Documentation]
29 | | ... | Compute path for testing on two given nodes in circular
30 | | ... | topology and set corresponding suite variables.
31 | | ...
32 | | ... | _NOTE:_ This KW sets following suite variables:
33 | | ... | - tg - TG node
34 | | ... | - tg_if1 - 1st TG interface towards DUT.
35 | | ... | - tg_if2 - 2nd TG interface towards DUT.
36 | | ... | - dut1 - DUT1 node
37 | | ... | - dut1_if1 - 1st DUT interface towards TG.
38 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
39 | | ...
40 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
41 | | Compute Path | always_same_link=${FALSE}
42 | | ${tg_if1} | ${tg}= | First Interface
43 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
44 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
45 | | ${tg_if2} | ${tg}= | Last Interface
46 | | Set Suite Variable | ${tg}
47 | | Set Suite Variable | ${tg_if1}
48 | | Set Suite Variable | ${tg_if2}
49 | | Set Suite Variable | ${dut1}
50 | | Set Suite Variable | ${dut1_if1}
51 | | Set Suite Variable | ${dut1_if2}
52
53 | Set variables in 3-node circular topology
54 | | [Documentation]
55 | | ... | Compute path for testing on three given nodes in circular
56 | | ... | topology and set corresponding suite variables.
57 | | ...
58 | | ... | _NOTE:_ This KW sets following suite variables:
59 | | ... | - tg - TG node
60 | | ... | - tg_if1 - TG interface towards DUT1.
61 | | ... | - tg_if2 - TG interface towards DUT2.
62 | | ... | - dut1 - DUT1 node
63 | | ... | - dut1_if1 - DUT1 interface towards TG.
64 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
65 | | ... | - dut2 - DUT2 node
66 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
67 | | ... | - dut2_if2 - DUT2 interface towards TG.
68 | | ...
69 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
70 | | ... | ${nodes['TG']}
71 | | Compute Path
72 | | ${tg_if1} | ${tg}= | Next Interface
73 | | ${dut1_if1} | ${dut1}= | Next Interface
74 | | ${dut1_if2} | ${dut1}= | Next Interface
75 | | ${dut2_if1} | ${dut2}= | Next Interface
76 | | ${dut2_if2} | ${dut2}= | Next Interface
77 | | ${tg_if2} | ${tg}= | Next Interface
78 | | Set Suite Variable | ${tg}
79 | | Set Suite Variable | ${tg_if1}
80 | | Set Suite Variable | ${tg_if2}
81 | | Set Suite Variable | ${dut1}
82 | | Set Suite Variable | ${dut1_if1}
83 | | Set Suite Variable | ${dut1_if2}
84 | | Set Suite Variable | ${dut2}
85 | | Set Suite Variable | ${dut2_if1}
86 | | Set Suite Variable | ${dut2_if2}
87
88 | Set variables in 2-node circular topology with DUT interface model
89 | | [Documentation]
90 | | ... | Compute path for testing on two given nodes in circular topology
91 | | ... | based on interface model provided as an argument and set
92 | | ... | corresponding suite variables.
93 | | ...
94 | | ... | *Arguments:*
95 | | ... | - iface_model - Interface model. Type: string
96 | | ...
97 | | ... | _NOTE:_ This KW sets following suite variables:
98 | | ... | - tg - TG node
99 | | ... | - tg_if1 - 1st TG interface towards DUT.
100 | | ... | - tg_if2 - 2nd TG interface towards DUT.
101 | | ... | - dut1 - DUT1 node
102 | | ... | - dut1_if1 - 1st DUT interface towards TG.
103 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
104 | | ...
105 | | ... | *Example:*
106 | | ...
107 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
108 | | ... | \| Intel-X520-DA2 \|
109 | | ...
110 | | [Arguments] | ${iface_model}
111 | | ...
112 | | ${iface_model_list}= | Create list | ${iface_model}
113 | | Append Node | ${nodes['TG']}
114 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
115 | | Append Node | ${nodes['TG']}
116 | | Compute Path | always_same_link=${FALSE}
117 | | ${tg_if1} | ${tg}= | First Interface
118 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
119 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
120 | | ${tg_if2} | ${tg}= | Last Interface
121 | | Set Suite Variable | ${tg}
122 | | Set Suite Variable | ${tg_if1}
123 | | Set Suite Variable | ${tg_if2}
124 | | Set Suite Variable | ${dut1}
125 | | Set Suite Variable | ${dut1_if1}
126 | | Set Suite Variable | ${dut1_if2}
127
128 | Set variables in 3-node circular topology with DUT interface model
129 | | [Documentation]
130 | | ... | Compute path for testing on three given nodes in circular topology
131 | | ... | based on interface model provided as an argument and set
132 | | ... | corresponding suite variables.
133 | | ...
134 | | ... | *Arguments:*
135 | | ... | - iface_model - Interface model. Type: string
136 | | ...
137 | | ... | _NOTE:_ This KW sets following suite variables:
138 | | ... | - tg - TG node
139 | | ... | - tg_if1 - TG interface towards DUT1.
140 | | ... | - tg_if2 - TG interface towards DUT2.
141 | | ... | - dut1 - DUT1 node
142 | | ... | - dut1_if1 - DUT1 interface towards TG.
143 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
144 | | ... | - dut2 - DUT2 node
145 | | ... | - dut2_if1 - DUT2 interface towards TG.
146 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
147 | | ...
148 | | ... | *Example:*
149 | | ...
150 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
151 | | ... | \| Intel-X520-DA2 \|
152 | | ...
153 | | [Arguments] | ${iface_model}
154 | | ...
155 | | ${iface_model_list}= | Create list | ${iface_model}
156 | | Append Node | ${nodes['TG']}
157 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
158 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
159 | | Append Node | ${nodes['TG']}
160 | | Compute Path
161 | | ${tg_if1} | ${tg}= | Next Interface
162 | | ${dut1_if1} | ${dut1}= | Next Interface
163 | | ${dut1_if2} | ${dut1}= | Next Interface
164 | | ${dut2_if1} | ${dut2}= | Next Interface
165 | | ${dut2_if2} | ${dut2}= | Next Interface
166 | | ${tg_if2} | ${tg}= | Next Interface
167 | | Set Suite Variable | ${tg}
168 | | Set Suite Variable | ${tg_if1}
169 | | Set Suite Variable | ${tg_if2}
170 | | Set Suite Variable | ${dut1}
171 | | Set Suite Variable | ${dut1_if1}
172 | | Set Suite Variable | ${dut1_if2}
173 | | Set Suite Variable | ${dut2}
174 | | Set Suite Variable | ${dut2_if1}
175 | | Set Suite Variable | ${dut2_if2}
176
177 | Tear down guest VM with dpdk-testpmd
178 | | [Documentation]
179 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
180 | | ... | Argument is dictionary of all qemu nodes running with its names.
181 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
182 | | ...
183 | | ... | *Arguments:*
184 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
185 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
186 | | ...
187 | | ... | *Example:*
188 | | ...
189 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
190 | | ... | \| ${dut_vm_refs} \|
191 | | ...
192 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
193 | | ${vms_number}= | Get Length | ${dut_vm_refs}
194 | | ${index}= | Set Variable | ${0}
195 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
196 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
197 | | | ${index}= | Evaluate | ${index} + 1
198 | | | Dpdk Testpmd Stop | ${vm}
199 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
200 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
201 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
202
203 | Tear down guest VM
204 | | [Documentation]
205 | | ... | Stop all qemu processes running on ${dut_node}.
206 | | ... | Argument is dictionary of all qemu nodes running with its names.
207 | | ...
208 | | ... | *Arguments:*
209 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
210 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
211 | | ...
212 | | ... | *Example:*
213 | | ...
214 | | ... | \| Tear down guest VM \| ${node['DUT1']} \
215 | | ... | \| ${dut_vm_refs} \|
216 | | ...
217 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
218 | | ${vms_number}= | Get Length | ${dut_vm_refs}
219 | | ${index}= | Set Variable | ${0}
220 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
221 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
222 | | | ${index}= | Evaluate | ${index} + 1
223 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
224 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
225 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
226
227 # Suite setups
228
229 | Set up 2-node performance topology with DUT's NIC model
230 | | [Documentation]
231 | | ... | Suite preparation phase that setup default startup configuration of
232 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
233 | | ... | variables used in test cases based on interface model provided as an
234 | | ... | argument. Initializes traffic generator.
235 | | ...
236 | | ... | *Arguments:*
237 | | ... | - topology_type - Topology type. Type: string
238 | | ... | - nic_model - Interface model. Type: string
239 | | ...
240 | | ... | *Example:*
241 | | ...
242 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
243 | | ...
244 | | [Arguments] | ${topology_type} | ${nic_model}
245 | | ...
246 | | Set variables in 2-node circular topology with DUT interface model
247 | | ... | ${nic_model}
248 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
249 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
250
251 | Set up 2-node-switched performance topology with DUT's NIC model
252 | | [Documentation]
253 | | ... | Suite preparation phase that setup default startup configuration of
254 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
255 | | ... | variables used in test cases based on interface model provided as an
256 | | ... | argument. Initializes traffic generator.
257 | | ...
258 | | ... | *Arguments:*
259 | | ... | - topology_type - Topology type. Type: string
260 | | ... | - nic_model - Interface model. Type: string
261 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
262 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
263 | | ...
264 | | ... | *Example:*
265 | | ...
266 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
267 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
268 | | ...
269 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
270 | | ... | ${tg_if2_dest_mac}
271 | | ...
272 | | Set variables in 2-node circular topology with DUT interface model
273 | | ... | ${nic_model}
274 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
275 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
276 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
277
278 | Set up 3-node performance topology with DUT's NIC model
279 | | [Documentation]
280 | | ... | Suite preparation phase that setup default startup configuration of
281 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
282 | | ... | variables used in test cases based on interface model provided as an
283 | | ... | argument. Initializes traffic generator.
284 | | ...
285 | | ... | *Arguments:*
286 | | ... | - topology_type - Topology type. Type: string
287 | | ... | - nic_model - Interface model. Type: string
288 | | ...
289 | | ... | *Example:*
290 | | ...
291 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
292 | | ... | \| Intel-X520-DA2 \|
293 | | ...
294 | | [Arguments] | ${topology_type} | ${nic_model}
295 | | ...
296 | | Set variables in 3-node circular topology with DUT interface model
297 | | ... | ${nic_model}
298 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
299 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
300
301 | Set up DPDK 2-node performance topology with DUT's NIC model
302 | | [Documentation]
303 | | ... | Updates interfaces on all nodes and setup global
304 | | ... | variables used in test cases based on interface model provided as an
305 | | ... | argument. Initializes traffic generator. Initializes DPDK test
306 | | ... | environment.
307 | | ...
308 | | ... | *Arguments:*
309 | | ... | - topology_type - Topology type. Type: string
310 | | ... | - nic_model - Interface model. Type: string
311 | | ...
312 | | ... | *Example:*
313 | | ...
314 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
315 | | ... | \| L2 \| Intel-X520-DA2 \|
316 | | ...
317 | | [Arguments] | ${topology_type} | ${nic_model}
318 | | ...
319 | | Set variables in 2-node circular topology with DUT interface model
320 | | ... | ${nic_model}
321 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
322 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
323 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
324
325 | Set up DPDK 3-node performance topology with DUT's NIC model
326 | | [Documentation]
327 | | ... | Updates interfaces on all nodes and setup global
328 | | ... | variables used in test cases based on interface model provided as an
329 | | ... | argument. Initializes traffic generator. Initializes DPDK test
330 | | ... | environment.
331 | | ...
332 | | ... | *Arguments:*
333 | | ... | - topology_type - Topology type. Type: string
334 | | ... | - nic_model - Interface model. Type: string
335 | | ...
336 | | ... | *Example:*
337 | | ...
338 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
339 | | ...
340 | | [Arguments] | ${topology_type} | ${nic_model}
341 | | ...
342 | | Set variables in 3-node circular topology with DUT interface model
343 | | ... | ${nic_model}
344 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
345 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
346 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
347 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
348
349 | Set up IPSec performance test suite
350 | | [Documentation]
351 | | ... | Suite preparation phase that sets default startup configuration of
352 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
353 | | ... | variables used in test cases based on interface model provided as an
354 | | ... | argument. Initializes traffic generator.
355 | | ... | Then it configures crypto device and kernel module on all DUTs.
356 | | ...
357 | | ... | *Arguments:*
358 | | ... | - topology_type - Topology type. Type: string
359 | | ... | - nic_model - Interface model. Type: string
360 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
361 | | ... | (Optional). Type: string, default value: HW_cryptodev
362 | | ...
363 | | ... | *Example:*
364 | | ...
365 | | ... | \| Set up IPSec performance test suite \| L2 \
366 | | ... | \| Intel-X520-DA2 \|
367 | | ...
368 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
369 | | ...
370 | | Set up 3-node performance topology with DUT's NIC model
371 | | ... | ${topology_type} | ${nic_model}
372 | | ${numvfs}= | Set Variable If
373 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
374 | | ... | '${crypto_type}' == 'SW_cryptodev' | ${0}
375 | | Configure crypto device on all DUTs | force_init=${True} | numvfs=${numvfs}
376 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
377 | | ... | Configure kernel module on all DUTs | igb_uio | force_load=${True}
378
379 | Set up performance topology with containers
380 | | [Documentation]
381 | | ... | Suite preparation phase that starts containers
382 | | ...
383 | | Set Suite Variable | @{container_groups} | @{EMPTY}
384 | | Construct VNF containers on all DUTs
385 | | Acquire all 'VNF' containers
386 | | Create all 'VNF' containers
387 | | Configure VPP in all 'VNF' containers
388 | | Install VPP in all 'VNF' containers
389
390 | Set up performance test suite with MEMIF
391 | | [Documentation]
392 | | ... | Append memif_plugin.so to the list of enabled plugins.
393 | | ...
394 | | Set Suite Variable | @{plugins_to_enable}
395 | | Append To List | ${plugins_to_enable} | memif_plugin.so
396
397 | Set up performance test suite with NAT
398 | | [Documentation]
399 | | ... | Append nat_plugin.so to the list of enabled plugins.
400 | | ...
401 | | Set Suite Variable | @{plugins_to_enable}
402 | | Append To List | ${plugins_to_enable} | nat_plugin.so
403
404 | Set up performance test suite with ACL
405 | | [Documentation]
406 | | ... | Append acl_plugin.so to the list of enabled plugins.
407 | | ...
408 | | Set Suite Variable | @{plugins_to_enable}
409 | | Append To List | ${plugins_to_enable} | acl_plugin.so
410
411 | Set up performance test suite with Static SRv6 proxy
412 | | [Documentation]
413 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
414 | | ...
415 | | Set Suite Variable | @{plugins_to_enable}
416 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
417
418 | Set up performance test suite with Dynamic SRv6 proxy
419 | | [Documentation]
420 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
421 | | ...
422 | | Set Suite Variable | @{plugins_to_enable}
423 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
424
425 | Set up performance test suite with Masquerading SRv6 proxy
426 | | [Documentation]
427 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
428 | | ...
429 | | Set Suite Variable | @{plugins_to_enable}
430 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
431
432 | Set up performance test suite with LACP mode link bonding
433 | | [Documentation]
434 | | ... | Append lacp_plugin.so to the list of enabled plugins.
435 | | ...
436 | | Set Suite Variable | @{plugins_to_enable}
437 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
438
439 | Set up 3-node performance topology with wrk and DUT's NIC model
440 | | [Documentation]
441 | | ... | Suite preparation phase that setup default startup configuration of
442 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
443 | | ... | variables used in test cases based on interface model provided as an
444 | | ... | argument. Installs the traffic generator.
445 | | ...
446 | | ... | *Arguments:*
447 | | ... | - iface_model - Interface model. Type: string
448 | | ...
449 | | ... | *Example:*
450 | | ...
451 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
452 | | ... | \| Intel-X520-DA2 \|
453 | | ...
454 | | [Arguments] | ${iface_model}
455 | | ...
456 | | Set variables in 3-node circular topology with DUT interface model
457 | | ... | ${iface_model}
458 | | Iface update numa node | ${tg}
459 # Make sure TRex is stopped
460 | | ${running}= | Is TRex running | ${tg}
461 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
462 | | ${curr_driver}= | Get PCI dev driver | ${tg}
463 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
464 | | Run keyword if | '${curr_driver}'!='${None}'
465 | | ... | PCI Driver Unbind | ${tg} |
466 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
467 # Bind tg_if1 to driver specified in the topology
468 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
469 | | PCI Driver Bind | ${tg}
470 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
471 # Set IP on tg_if1
472 | | ${intf_name}= | Get Linux interface name | ${tg}
473 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
474 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
475 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
476 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
477 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
478 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
479 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
480 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
481 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
482 | | Set Linux interface up | ${tg} | ${intf_name}
483 | | Install wrk | ${tg}
484
485 # Suite teardowns
486
487 | Tear down 2-node performance topology
488 | | [Documentation]
489 | | ... | Suite teardown phase with traffic generator teardown.
490 | | ...
491 | | Teardown traffic generator | ${tg}
492
493 | Tear down 2-node performance topology with container
494 | | [Documentation]
495 | | ... | Suite teardown phase with traffic generator teardown and container
496 | | ... | destroy.
497 | | ...
498 | | Teardown traffic generator | ${tg}
499 | | :FOR | ${group} | IN | @{container_groups}
500 | | | Destroy all '${group}' containers
501
502 | Tear down 3-node performance topology
503 | | [Documentation]
504 | | ... | Suite teardown phase with traffic generator teardown.
505 | | ...
506 | | Teardown traffic generator | ${tg}
507
508 | Tear down 3-node performance topology with container
509 | | [Documentation]
510 | | ... | Suite teardown phase with traffic generator teardown and container
511 | | ... | destroy.
512 | | ...
513 | | Teardown traffic generator | ${tg}
514 | | :FOR | ${group} | IN | @{container_groups}
515 | | | Destroy all '${group}' containers
516
517 # Tests setups
518
519 | Set up performance test
520 | | [Documentation] | Common test setup for performance tests.
521 | | ...
522 | | Reset VAT History On All DUTs | ${nodes}
523 | | Create base startup configuration of VPP on all DUTs
524
525 | Set up tcp performance test
526 | | [Documentation] | Common test setup for TCP performance tests.
527 | | ...
528 | | Reset VAT History On All DUTs | ${nodes}
529 | | Create base startup configuration of VPP for TCP tests on all DUTs
530
531 | Set up performance test with Ligato Kubernetes
532 | | [Documentation] | Common test setup for performance tests with Ligato \
533 | | ... | Kubernetes.
534 | | ...
535 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
536 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
537 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
538 | | Apply Kubernetes resource on all duts | ${nodes}
539 | | ... | configmaps/vswitch-agent-cfg.yaml
540 | | Apply Kubernetes resource on all duts | ${nodes}
541 | | ... | configmaps/vnf-agent-cfg.yaml
542 | | Apply Kubernetes resource on all duts | ${nodes}
543 | | ... | pods/contiv-sfc-controller.yaml
544 | | Apply Kubernetes resource on all duts | ${nodes}
545 | | ... | pods/contiv-vswitch.yaml
546
547 # Tests teardowns
548
549 | Tear down performance discovery test
550 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
551 | | ... | tests.
552 | | ...
553 | | ... | *Arguments:*
554 | | ... | - rate - Rate for sending packets. Type: string
555 | | ... | - framesize - L2 Frame Size [B]. Type: integer
556 | | ... | - topology_type - Topology type. Type: string
557 | | ...
558 | | ... | *Example:*
559 | | ...
560 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
561 | | ... | \| 3-node-IPv4 \|
562 | | ...
563 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
564 | | ...
565 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
566 | | Show VAT History On All DUTs | ${nodes}
567 | | Run Keyword If Test Failed
568 | | ... | Set Test Variable | ${pkt_trace} | ${True}
569 | | Run Keyword If Test Failed
570 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
571 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
572
573 | Tear down performance ndrchk test
574 | | [Documentation] | Common test teardown for ndrchk performance tests.
575 | | ...
576 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
577 | | Show VAT History On All DUTs | ${nodes}
578
579 | Tear down performance pdrchk test
580 | | [Documentation] | Common test teardown for pdrchk performance tests.
581 | | ...
582 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
583 | | Show VAT History On All DUTs | ${nodes}
584
585 | Tear down performance mrr test
586 | | [Documentation] | Common test teardown for max-received-rate performance
587 | | ... | tests.
588 | | ...
589 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
590 | | Show VAT History On All DUTs | ${nodes}
591
592 | Tear down performance test with wrk
593 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
594 | | ... | tests.
595 | | ...
596 | | ... | *Example:*
597 | | ...
598 | | ... | \| Tear down performance test with wrk \|
599 | | ...
600 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
601 | | Show VAT History On All DUTs | ${nodes}
602 | | Show statistics on all DUTs | ${nodes}
603
604 | Tear down performance test with vhost and VM with dpdk-testpmd
605 | | [Documentation] | Common test teardown for performance tests which use
606 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
607 | | ...
608 | | ... | *Arguments:*
609 | | ... | - rate - Rate for sending packets. Type: string
610 | | ... | - framesize - L2 Frame Size [B]. Type: integer
611 | | ... | - topology_type - Topology type. Type: string
612 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
613 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
614 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
615 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
616 | | ...
617 | | ... | *Example:*
618 | | ...
619 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
620 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
621 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
622 | | ...
623 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
624 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
625 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
626 | | ...
627 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
628 | | Show VAT History On All DUTs | ${nodes}
629 | | Show VPP vhost on all DUTs | ${nodes}
630 | | Show statistics on all DUTs | ${nodes}
631 | | Run Keyword If Test Failed
632 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
633 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
634 | | Run keyword unless | ${dut1_node}==${None}
635 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
636 | | Run keyword unless | ${dut2_node}==${None}
637 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
638
639 | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
640 | | [Documentation] | Common test teardown for performance tests which use
641 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
642 | | ...
643 | | ... | *Arguments:*
644 | | ... | - rate - Rate for sending packets. Type: string
645 | | ... | - framesize - L2 Frame Size [B]. Type: integer
646 | | ... | - topology_type - Topology type. Type: string
647 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
648 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
649 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
650 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
651 | | ...
652 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
653 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
654 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
655 | | ...
656 | | Tear down performance test with vhost and VM with dpdk-testpmd
657 | | ... | ${rate} | ${framesize} | ${topology_type}
658 | | ... | ${dut1_node} | ${dut1_vm_refs}
659 | | ... | ${dut2_node} | ${dut2_vm_refs}
660 | | Vpp Log Plugin Acl Settings | ${dut1}
661 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
662 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
663
664 | Tear down performance pdrchk test with vhost and VM with dpdk-testpmd
665 | | [Documentation] | Common test teardown for performance pdrchk tests which \
666 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
667 | | ...
668 | | ... | *Arguments:*
669 | | ... | - rate - Rate for sending packets. Type: string
670 | | ... | - framesize - L2 Frame Size [B]. Type: integer
671 | | ... | - topology_type - Topology type. Type: string
672 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
673 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
674 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
675 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
676 | | ...
677 | | ... | *Example:*
678 | | ...
679 | | ... | \| Tear down performance pdrchk test with vhost and VM with \
680 | | ... | dpdk-testpmd \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \
681 | | ... | \| ${dut_vm_refs} \| ${node['DUT2']} \| ${dut_vm_refs} \|
682 | | ...
683 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
684 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
685 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
686 | | ...
687 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
688 | | Show VAT History On All DUTs | ${nodes}
689 | | Show VPP vhost on all DUTs | ${nodes}
690 | | Show statistics on all DUTs | ${nodes}
691 | | Run keyword unless | ${dut1_node}==${None}
692 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
693 | | Run keyword unless | ${dut2_node}==${None}
694 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
695
696 | Tear down performance mrr test with vhost and VM with dpdk-testpmd
697 | | [Documentation] | Common test teardown for performance mrr tests which \
698 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
699 | | ...
700 | | ... | *Arguments:*
701 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
702 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
703 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
704 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
705 | | ...
706 | | ... | *Example:*
707 | | ...
708 | | ... | \| Tear down performance mrr test with vhost and VM with \
709 | | ... | dpdk-testpmd \| ${node['DUT1']} \| ${dut_vm_refs} \| ${node['DUT2']} \
710 | | ... | \| ${dut_vm_refs} \|
711 | | ...
712 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
713 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
714 | | ...
715 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
716 | | Show VAT History On All DUTs | ${nodes}
717 | | Show VPP vhost on all DUTs | ${nodes}
718 | | Run keyword unless | ${dut1_node}==${None}
719 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
720 | | Run keyword unless | ${dut2_node}==${None}
721 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
722
723 | Tear down DPDK 2-node performance topology
724 | | [Documentation]
725 | | ... | Suite teardown phase with traffic generator teardown.
726 | | ... | Cleanup DPDK test environment.
727 | | ...
728 | | Teardown traffic generator | ${tg}
729 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
730
731 | Tear down DPDK 3-node performance topology
732 | | [Documentation]
733 | | ... | Suite teardown phase with traffic generator teardown.
734 | | ... | Cleanup DPDK test environment.
735 | | ...
736 | | Teardown traffic generator | ${tg}
737 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
738 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
739
740 | Tear down performance discovery test with NAT
741 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
742 | | ... | tests with NAT feature used.
743 | | ...
744 | | ... | *Arguments:*
745 | | ... | - rate - Rate for sending packets. Type: string
746 | | ... | - framesize - L2 Frame Size [B]. Type: integer
747 | | ... | - traffic_profile - Traffic profile. Type: string
748 | | ...
749 | | ... | *Example:*
750 | | ...
751 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
752 | | ... | \| ${traffic_profile} \|
753 | | ...
754 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
755 | | ...
756 | | Tear down performance discovery test | ${rate} | ${framesize}
757 | | ... | ${traffic_profile}
758 | | Show NAT verbose | ${dut1}
759 | | Show NAT verbose | ${dut2}
760
761 | Tear down mrr test with NAT
762 | | [Documentation] | Common test teardown for mrr performance \
763 | | ... | tests with NAT feature used.
764 | | ...
765 | | ... | \| Tear down mrr test with NAT \|
766 | | ...
767 | | Tear down performance mrr test
768 | | Show NAT verbose | ${dut1}
769 | | Show NAT verbose | ${dut2}
770
771 | Tear down performance test with ACL
772 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
773 | | ... | tests with ACL feature used.
774 | | ...
775 | | ... | *Arguments:*
776 | | ... | - rate - Rate for sending packets. Type: string
777 | | ... | - framesize - L2 Frame Size [B]. Type: integer
778 | | ... | - traffic_profile - Traffic profile. Type: string
779 | | ...
780 | | ... | *Example:*
781 | | ...
782 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
783 | | ... | \| ${traffic_profile} \|
784 | | ...
785 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
786 | | ...
787 | | Tear down performance discovery test | ${rate} | ${framesize}
788 | | ... | ${traffic_profile}
789 | | Vpp Log Plugin Acl Settings | ${dut1}
790 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
791 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
792
793 | Tear down mrr test with ACL
794 | | [Documentation] | Common test teardown for mrr performance \
795 | | ... | tests with ACL feature used.
796 | | ...
797 | | ... | *Example:*
798 | | ...
799 | | ... | \| Tear down mrr test with ACL \|
800 | | ...
801 | | Tear down performance mrr test
802 | | Vpp Log Plugin Acl Settings | ${dut1}
803 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
804 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
805
806 | Tear down performance test with MACIP ACL
807 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
808 | | ... | tests with MACIP ACL feature used.
809 | | ...
810 | | ... | *Arguments:*
811 | | ... | - rate - Rate for sending packets. Type: string
812 | | ... | - framesize - L2 Frame Size [B]. Type: integer
813 | | ... | - traffic_profile - Traffic profile. Type: string
814 | | ...
815 | | ... | *Example:*
816 | | ...
817 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
818 | | ... | \| ${traffic_profile} \|
819 | | ...
820 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
821 | | ...
822 | | Tear down performance discovery test | ${rate} | ${framesize}
823 | | ... | ${traffic_profile}
824 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
825 | | ... | Vpp Log Macip Acl Settings | ${dut1}
826 | | Run Keyword And Ignore Error
827 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
828
829 | Tear down performance test with Ligato Kubernetes
830 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
831 | | ... | tests with Ligato Kubernetes.
832 | | ...
833 | | Run Keyword If Test Failed
834 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
835 | | Run Keyword If Test Failed
836 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
837 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit
838
839 | Tear down performance test with SRv6 with encapsulation
840 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
841 | | ... | tests with SRv6 with encapsulation feature used.
842 | | ...
843 | | ... | *Arguments:*
844 | | ... | - rate - Rate for sending packets. Type: string
845 | | ... | - framesize - L2 Frame Size [B]. Type: integer/string
846 | | ... | - traffic_profile - Traffic profile. Type: string
847 | | ...
848 | | ... | *Example:*
849 | | ...
850 | | ... | \| Tear down performance test with SRv6 with encapsulation \
851 | | ... | \| 100000pps \| 64 \| ${traffic_profile} \|
852 | | ...
853 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
854 | | ...
855 | | Tear down performance discovery test | ${rate} | ${framesize}
856 | | ... | ${traffic_profile}
857 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
858 | | Run Keyword If Test Failed
859 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
860 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
861
862 | Tear down mrr test with SRv6 with encapsulation
863 | | [Documentation] | Common test teardown for mrr tests with SRv6 with \
864 | | ... | encapsulation feature used.
865 | | ...
866 | | ... | *Example:*
867 | | ...
868 | | ... | \| Tear down mrr test with SRv6 with encapsulation \|
869 | | ...
870 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
871 | | Show VAT History On All DUTs | ${nodes}
872 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
873 | | Run Keyword If Test Failed
874 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
875 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}