1 # Copyright (c) 2019 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
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_limits.robot
19 | Resource | resources/libraries/robot/performance/performance_utils.robot
20 | Resource | resources/libraries/robot/tcp/tcp_setup.robot
21 | Documentation | Performance suite keywords - Suite and test setups and
26 # Keywords used in setups and teardowns
28 | Set variables in 2-node circular topology with DUT interface model
30 | | ... | Compute path for testing on two given nodes in circular topology
31 | | ... | based on interface model provided as an argument and set
32 | | ... | corresponding suite variables.
34 | | ... | *Arguments:*
35 | | ... | - iface_model - Interface model. Type: string
37 | | ... | _NOTE:_ This KW sets following suite variables:
38 | | ... | - tg - TG node
39 | | ... | - tg_if1 - 1st TG interface towards DUT.
40 | | ... | - tg_if1 - 1st TG interface MAC address.
41 | | ... | - tg_if2 - 2nd TG interface towards DUT.
42 | | ... | - tg_if2 - 2nd TG interface MAC address.
43 | | ... | - dut1 - DUT1 node
44 | | ... | - dut1_if1 - 1st DUT interface towards TG.
45 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
49 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
50 | | ... | \| Intel-X520-DA2 \|
52 | | [Arguments] | ${iface_model}
54 | | ${iface_model_list}= | Create list | ${iface_model}
55 | | Append Node | ${nodes['TG']}
56 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
57 | | Append Node | ${nodes['TG']}
58 | | Compute Path | always_same_link=${FALSE}
59 | | ${tg_if1} | ${tg}= | First Interface
60 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
61 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
62 | | ${tg_if2} | ${tg}= | Last Interface
63 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
64 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
65 | | Set Suite Variable | ${tg}
66 | | Set Suite Variable | ${tg_if1}
67 | | Set Suite Variable | ${tg_if1_mac}
68 | | Set Suite Variable | ${tg_if2}
69 | | Set Suite Variable | ${tg_if2_mac}
70 | | Set Suite Variable | ${dut1}
71 | | Set Suite Variable | ${dut1_if1}
72 | | Set Suite Variable | ${dut1_if2}
74 | Set variables in 3-node circular topology with DUT interface model
76 | | ... | Compute path for testing on three given nodes in circular topology
77 | | ... | based on interface model provided as an argument and set
78 | | ... | corresponding suite variables.
80 | | ... | *Arguments:*
81 | | ... | - iface_model - Interface model. Type: string
83 | | ... | _NOTE:_ This KW sets following suite variables:
84 | | ... | - tg - TG node
85 | | ... | - tg_if1 - 1st TG interface towards DUT.
86 | | ... | - tg_if1 - 1st TG interface MAC address.
87 | | ... | - tg_if2 - 2nd TG interface towards DUT.
88 | | ... | - tg_if2 - 2nd TG interface MAC address.
89 | | ... | - dut1 - DUT1 node
90 | | ... | - dut1_if1 - DUT1 interface towards TG.
91 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
92 | | ... | - dut2 - DUT2 node
93 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
94 | | ... | - dut2_if2 - DUT2 interface towards TG.
98 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
99 | | ... | \| Intel-X520-DA2 \|
101 | | [Arguments] | ${iface_model}
103 | | ${iface_model_list}= | Create list | ${iface_model}
104 | | Append Node | ${nodes['TG']}
105 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
106 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
107 | | Append Node | ${nodes['TG']}
109 | | ${tg_if1} | ${tg}= | Next Interface
110 | | ${dut1_if1} | ${dut1}= | Next Interface
111 | | ${dut1_if2} | ${dut1}= | Next Interface
112 | | ${dut2_if1} | ${dut2}= | Next Interface
113 | | ${dut2_if2} | ${dut2}= | Next Interface
114 | | ${tg_if2} | ${tg}= | Next Interface
115 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
116 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
117 | | Set Suite Variable | ${tg}
118 | | Set Suite Variable | ${tg_if1}
119 | | Set Suite Variable | ${tg_if1_mac}
120 | | Set Suite Variable | ${tg_if2}
121 | | Set Suite Variable | ${tg_if2_mac}
122 | | Set Suite Variable | ${dut1}
123 | | Set Suite Variable | ${dut1_if1}
124 | | Set Suite Variable | ${dut1_if2}
125 | | Set Suite Variable | ${dut2}
126 | | Set Suite Variable | ${dut2_if1}
127 | | Set Suite Variable | ${dut2_if2}
129 | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
131 | | ... | Compute path for testing on three given nodes in circular topology
132 | | ... | with double link between DUTs based on interface model provided as an
133 | | ... | argument and set corresponding suite variables.
135 | | ... | *Arguments:*
136 | | ... | - iface_model - Interface model. Type: string
138 | | ... | _NOTE:_ This KW sets following suite variables:
139 | | ... | - tg - TG node
140 | | ... | - tg_if1 - 1st TG interface towards DUT.
141 | | ... | - tg_if1 - 1st TG interface MAC address.
142 | | ... | - tg_if2 - 2nd TG interface towards DUT.
143 | | ... | - tg_if2 - 2nd TG interface MAC address.
144 | | ... | - dut1 - DUT1 node
145 | | ... | - dut1_if1 - DUT1 interface towards TG.
146 | | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
147 | | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
148 | | ... | - dut2 - DUT2 node
149 | | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
150 | | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
151 | | ... | - dut2_if2 - DUT2 interface towards TG.
155 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
156 | | ... | with double link between DUTs \| Intel-X520-DA2 \|
158 | | [Arguments] | ${iface_model}
160 | | ${iface_model_list}= | Create list | ${iface_model}
161 | | # Compute path TG - DUT1 with single link in between
162 | | Append Node | ${nodes['TG']}
163 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
164 | | Append Node | ${nodes['TG']}
166 | | ${tg_if1} | ${tg}= | Next Interface
167 | | ${dut1_if1} | ${dut1}= | Next Interface
168 | | # Compute path TG - DUT2 with single link in between
170 | | Append Node | ${nodes['TG']}
171 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
172 | | Append Node | ${nodes['TG']}
174 | | ${tg_if2} | ${tg}= | Next Interface
175 | | ${dut2_if2} | ${dut2}= | Next Interface
176 | | # Compute path DUT1 - DUT2 with double link in between
178 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
179 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
180 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
181 | | Compute Path | always_same_link=${FALSE}
182 | | ${dut1_if2_1} | ${dut1}= | First Interface
183 | | ${dut1_if2_2} | ${dut1}= | Last Interface
184 | | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
185 | | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
186 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
187 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
188 | | # Set suite variables
189 | | Set Suite Variable | ${tg}
190 | | Set Suite Variable | ${tg_if1}
191 | | Set Suite Variable | ${tg_if1_mac}
192 | | Set Suite Variable | ${tg_if2}
193 | | Set Suite Variable | ${tg_if2_mac}
194 | | Set Suite Variable | ${dut1}
195 | | Set Suite Variable | ${dut1_if1}
196 | | Set Suite Variable | ${dut1_if2_1}
197 | | Set Suite Variable | ${dut1_if2_2}
198 | | Set Suite Variable | ${dut2}
199 | | Set Suite Variable | ${dut2_if1_1}
200 | | Set Suite Variable | ${dut2_if1_2}
201 | | Set Suite Variable | ${dut2_if2}
205 | | ... | Stop all qemu processes running on nodes.
207 | | Run Keyword | vnf_manager.Kill All VMs
209 | Tear down guest VM with dpdk-testpmd
211 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
212 | | ... | Argument is dictionary of all qemu nodes running with its names.
213 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
215 | | ... | *Arguments:*
216 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
217 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
221 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
222 | | ... | \| ${dut_vm_refs} \|
224 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
225 | | ${vms_number}= | Get Length | ${dut_vm_refs}
226 | | ${index}= | Set Variable | ${0}
227 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
228 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
229 | | | ${index}= | Evaluate | ${index} + 1
230 | | | Dpdk Testpmd Stop | ${vm}
231 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
235 | Set up 2-node performance topology with DUT's NIC model
237 | | ... | Suite preparation phase that sets the default startup configuration of
238 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
239 | | ... | variables used in test cases based on interface model provided as an
240 | | ... | argument. Initializes traffic generator.
242 | | ... | *Arguments:*
243 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
244 | | ... | - nic_name - Interface model. Type: string
248 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
250 | | [Arguments] | ${traffic_profile} | ${nic_name}
252 | | Set variables in 2-node circular topology with DUT interface model
253 | | ... | ${nic_name}
254 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
255 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
257 | Set up 2-node-switched performance topology with DUT's NIC model
259 | | ... | Suite preparation phase that sets the default startup configuration of
260 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
261 | | ... | variables used in test cases based on interface model provided as an
262 | | ... | argument. Initializes traffic generator.
264 | | ... | *Arguments:*
265 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
266 | | ... | - nic_name - Interface model. Type: string
267 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
268 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
272 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
273 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
275 | | [Arguments] | ${traffic_profile} | ${nic_name} | ${tg_if1_dest_mac}
276 | | ... | ${tg_if2_dest_mac}
278 | | Set variables in 2-node circular topology with DUT interface model
279 | | ... | ${nic_name}
280 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
281 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
282 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
284 | Set up 3-node performance topology with DUT's NIC model
286 | | ... | Suite preparation phase that sets the default startup configuration of
287 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
288 | | ... | variables used in test cases based on interface model provided as an
289 | | ... | argument. Initializes traffic generator.
291 | | ... | *Arguments:*
292 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
293 | | ... | - nic_name - Interface model. Type: string
297 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
298 | | ... | \| Intel-X520-DA2 \|
300 | | [Arguments] | ${traffic_profile} | ${nic_name}
302 | | Set variables in 3-node circular topology with DUT interface model
303 | | ... | ${nic_name}
304 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
305 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
307 | Set up 3-node performance topology with DUT's NIC model with double link between DUTs
309 | | ... | Suite preparation phase that sets the default startup configuration of
310 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
311 | | ... | variables used in test cases based on interface model provided as an
312 | | ... | argument. Initializes traffic generator.
314 | | ... | *Arguments:*
315 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
316 | | ... | - nic_name - Interface model. Type: string
320 | | ... | \| Set up 3-node performance topology with DUT's NIC model with \
321 | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
323 | | [Arguments] | ${traffic_profile} | ${nic_name}
325 | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
326 | | ... | ${nic_name}
327 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
328 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
330 | Set up DPDK 2-node performance topology with DUT's NIC model
332 | | ... | Updates interfaces on all nodes and sets the global
333 | | ... | variables used in test cases based on interface model provided as an
334 | | ... | argument. Initializes traffic generator. Initializes DPDK test
335 | | ... | environment.
337 | | ... | *Arguments:*
338 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
339 | | ... | - nic_name - Interface model. Type: string
343 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
344 | | ... | \| L2 \| Intel-X520-DA2 \|
346 | | [Arguments] | ${traffic_profile} | ${nic_name}
348 | | Set variables in 2-node circular topology with DUT interface model
349 | | ... | ${nic_name}
350 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
351 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
352 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
354 | Set up DPDK 3-node performance topology with DUT's NIC model
356 | | ... | Updates interfaces on all nodes and sets the global
357 | | ... | variables used in test cases based on interface model provided as an
358 | | ... | argument. Initializes traffic generator. Initializes DPDK test
359 | | ... | environment.
361 | | ... | *Arguments:*
362 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
363 | | ... | - nic_name - Interface model. Type: string
367 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
369 | | [Arguments] | ${traffic_profile} | ${nic_name}
371 | | Set variables in 3-node circular topology with DUT interface model
372 | | ... | ${nic_name}
373 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
374 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
375 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
376 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
378 | Set up SRIOV 2-node performance topology with DUT's NIC model
380 | | ... | Suite preparation phase that sets default startup configuration of
381 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
382 | | ... | variables used in test cases based on interface model provided as an
383 | | ... | argument. Initializes traffic generator.
384 | | ... | It configures PCI device with VFs on all DUTs.
386 | | ... | *Arguments:*
387 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
388 | | ... | - nic_name - Interface model. Type: string
389 | | ... | - vf_driver - Virtual function driver. Type: string
390 | | ... | - numvfs - Number of VFs. Type: integer
394 | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
395 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
397 | | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver}
398 | | ... | ${numvfs}=${1}
400 | | Set variables in 2-node circular topology with DUT interface model
401 | | ... | ${nic_name}
402 | | Run Keyword If | '${vf_driver}' == 'AVF'
403 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
404 | | ... | traffic_profile=${traffic_profile}
405 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
406 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
407 | | ... | ${traffic_profile}
409 | Set up SRIOV 3-node performance topology with DUT's NIC model
411 | | ... | Suite preparation phase that sets default startup configuration of
412 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
413 | | ... | variables used in test cases based on interface model provided as an
414 | | ... | argument. Initializes traffic generator.
415 | | ... | It configures PCI device with VFs on all DUTs.
417 | | ... | *Arguments:*
418 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
419 | | ... | - nic_name - Interface model. Type: string
420 | | ... | - vf_driver - Virtual function driver. Type: string
421 | | ... | - numvfs - Number of VFs. Type: integer
425 | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
426 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
428 | | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver}
429 | | ... | ${numvfs}=${1}
431 | | Set variables in 3-node circular topology with DUT interface model
432 | | ... | ${nic_name}
433 | | Run Keyword If | '${vf_driver}' == 'AVF'
434 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
435 | | ... | traffic_profile=${traffic_profile}
436 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
437 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
438 | | ... | ${traffic_profile}
440 | Set up IPSec performance test suite
442 | | ... | Suite preparation phase that sets default startup configuration of
443 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
444 | | ... | variables used in test cases based on interface model provided as an
445 | | ... | argument. Initializes traffic generator.
446 | | ... | Then it configures crypto device and kernel module on all DUTs.
448 | | ... | TODO CSIT-1481: Crypto HW should be read from topology file instead.
450 | | ... | *Arguments:*
451 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
452 | | ... | - nic_name - Interface model. Type: string
453 | | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx or
454 | | ... | SW_cryptodev. Type: string, default value: HW_DH895xcc
458 | | ... | \| Set up IPSec performance test suite \| L2 \
459 | | ... | \| Intel-X520-DA2 \| HW_DH895xcc \|
461 | | [Arguments] | ${traffic_profile} | ${nic_name} | ${crypto_type}=HW_DH895xcc
463 | | Set up 3-node performance topology with DUT's NIC model
464 | | ... | ${traffic_profile} | ${nic_name}
465 | | Return From Keyword If | '${crypto_type}' == 'SW_cryptodev'
466 | | ${numvfs}= | Set Variable If
467 | | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
468 | | ... | '${crypto_type}' == 'HW_C3xxx' | ${16}
469 | | Configure crypto device on all DUTs | ${crypto_type} | numvfs=${numvfs}
470 | | ... | force_init=${True}
471 | | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
473 | Set up performance test suite with MEMIF
475 | | ... | Append memif_plugin.so to the list of enabled plugins.
477 | | Set Suite Variable | @{plugins_to_enable}
478 | | Append To List | ${plugins_to_enable} | memif_plugin.so
480 | Set up performance test suite with NAT
482 | | ... | Append nat_plugin.so to the list of enabled plugins.
484 | | Set Suite Variable | @{plugins_to_enable}
485 | | Append To List | ${plugins_to_enable} | nat_plugin.so
487 | Set up performance test suite with ACL
489 | | ... | Append acl_plugin.so to the list of enabled plugins.
491 | | Set Suite Variable | @{plugins_to_enable}
492 | | Append To List | ${plugins_to_enable} | acl_plugin.so
494 | Set up performance test suite with AVF driver
496 | | ... | Append avf_plugin.so to the list of enabled plugins.
498 | | Set Suite Variable | @{plugins_to_enable}
499 | | Append To List | ${plugins_to_enable} | avf_plugin.so
501 | Set up performance test suite with Static SRv6 proxy
503 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
505 | | Set Suite Variable | @{plugins_to_enable}
506 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
508 | Set up performance test suite with Dynamic SRv6 proxy
510 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
512 | | Set Suite Variable | @{plugins_to_enable}
513 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
515 | Set up performance test suite with Masquerading SRv6 proxy
517 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
519 | | Set Suite Variable | @{plugins_to_enable}
520 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
522 | Set up performance test suite with LACP mode link bonding
524 | | ... | Append lacp_plugin.so to the list of enabled plugins.
526 | | Set Suite Variable | @{plugins_to_enable}
527 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
529 | Set up 3-node performance topology with wrk and DUT's NIC model
531 | | ... | Suite preparation phase that sets the default startup configuration of
532 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
533 | | ... | variables used in test cases based on interface model provided as an
534 | | ... | argument. Installs the traffic generator.
536 | | ... | *Arguments:*
537 | | ... | - iface_model - Interface model. Type: string
541 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
542 | | ... | \| Intel-X520-DA2 \|
544 | | [Arguments] | ${iface_model}
546 | | Set variables in 3-node circular topology with DUT interface model
547 | | ... | ${iface_model}
548 | | Iface update numa node | ${tg}
549 # Make sure TRex is stopped
550 | | ${running}= | Is TRex running | ${tg}
551 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
552 | | ${curr_driver}= | Get PCI dev driver | ${tg}
553 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
554 | | Run keyword if | '${curr_driver}'!='${None}'
555 | | ... | PCI Driver Unbind | ${tg} |
556 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
557 # Bind tg_if1 to driver specified in the topology
558 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
559 | | PCI Driver Bind | ${tg}
560 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
562 | | ${intf_name}= | Get Linux interface name | ${tg}
563 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
564 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
565 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
566 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
567 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
568 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
569 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
570 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
571 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
572 | | Set Linux interface up | ${tg} | ${intf_name}
573 | | Install wrk | ${tg}
577 | Tear down 2-node performance topology
579 | | ... | Suite teardown phase with traffic generator teardown.
581 | | Teardown traffic generator | ${tg}
583 | Tear down 3-node performance topology
585 | | ... | Suite teardown phase with traffic generator teardown.
587 | | Teardown traffic generator | ${tg}
591 | Set up performance test
592 | | [Documentation] | Common test setup for performance tests.
594 | | Reset PAPI History On All DUTs | ${nodes}
595 | | Create base startup configuration of VPP on all DUTs
597 | Set up tcp performance test
598 | | [Documentation] | Common test setup for TCP performance tests.
600 | | Reset PAPI History On All DUTs | ${nodes}
601 | | Create base startup configuration of VPP for TCP tests on all DUTs
603 | Set up performance test with Ligato Kubernetes
604 | | [Documentation] | Common test setup for performance tests with Ligato \
605 | | ... | Kubernetes.
607 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
608 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
609 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
610 | | Apply Kubernetes resource on all duts | ${nodes}
611 | | ... | configmaps/vswitch-agent-cfg.yaml
612 | | Apply Kubernetes resource on all duts | ${nodes}
613 | | ... | configmaps/vnf-agent-cfg.yaml
614 | | Apply Kubernetes resource on all duts | ${nodes}
615 | | ... | pods/contiv-sfc-controller.yaml
616 | | Apply Kubernetes resource on all duts | ${nodes}
617 | | ... | pods/contiv-vswitch.yaml
619 | Set up performance test with containers
621 | | ... | Common test setup for performance tests with containers
623 | | ... | *Arguments:*
624 | | ... | - chains: Total number of chains. Type: integer
625 | | ... | - nodeness: Total number of nodes per chain. Type: integer
626 | | ... | - auto_scale - If True, use same amount of Dataplane threads for
627 | | ... | network function as DUT, otherwise use single physical core for
628 | | ... | every network function. Type: boolean
632 | | ... | \| Set up performance test with containers \| 1 \| 1 \|
634 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
636 | | Set Test Variable | @{container_groups} | @{EMPTY}
637 | | Set Test Variable | ${container_group} | CNF
638 | | Set Test Variable | ${nf_nodes}
639 | | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
640 | | ... | engine=${container_engine} | WITH NAME | ${container_group}
641 | | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
642 | | ... | auto_scale=${auto_scale}
643 | | Acquire all '${container_group}' containers
644 | | Create all '${container_group}' containers
645 | | Configure VPP in all '${container_group}' containers
646 | | Stop VPP service on all DUTs | ${nodes}
647 | | Start VPP in all '${container_group}' containers
648 | | Start VPP service on all DUTs | ${nodes}
649 | | Append To List | ${container_groups} | ${container_group}
653 | Tear down performance test
654 | | [Documentation] | Common test teardown for performance tests.
656 | | ... | TODO: Rename to "Tear down VPP performance test"?
657 | | ... | most steps do not apply to DPDK nor other vswitch solutions.
658 | | ... | TODO: Document at least some steps this keyword takes.
660 | | ... | To save space in suites, this keyword does not accept
661 | | ... | any explicit arguments. Instead, it requires few variables
662 | | ... | to be defined in at least test scope.
664 | | ... | *Test Variables needed:*
665 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
666 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
667 | | ... | - nodes - Parsed information object. Type: dict
671 | | ... | \| Set Test Variable \| \${frame_size} \| 64 \|
672 | | ... | \| Tear down performance test \|
674 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
675 | | Show PAPI History On All DUTs | ${nodes}
676 | | Get Core Files on All Nodes | ${nodes}
677 | | Set Test Variable | ${pkt_trace} | ${True}
678 | | Show statistics on all DUTs | ${nodes}
679 | | Run Keyword If Test Failed
680 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | 10000pps
681 | | ... | ${frame_size} | ${traffic_profile} | fail_on_loss=${False}
683 | Tear down performance test with container
685 | | ... | Common test teardown for performance tests which uses containers.
687 | | ... | TODO: Call Tear down performance test?
689 | | :FOR | ${container_group} | IN | @{container_groups}
690 | | | Destroy all '${container_group}' containers
692 | Tear down performance test with vhost
693 | | [Documentation] | Common test teardown for performance tests which use
694 | | ... | vhost(s) and VM(s).
696 | | Tear down performance test
697 | | Show VPP vhost on all DUTs | ${nodes}
698 | | Tear down guest VM
700 | Tear down performance test with vhost and VM with dpdk-testpmd
701 | | [Documentation] | Common test teardown for performance tests which use
702 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
704 | | ... | *Test Variables needed:*
705 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
706 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
708 | | ... | *Arguments:*
709 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
710 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
711 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
712 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
716 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
717 | | ... | \| ${node['DUT1']} \| ${dut_vm_refs} \
718 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
720 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
721 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
723 | | Tear down performance test
724 | | Show VPP vhost on all DUTs | ${nodes}
725 | | Run keyword unless | ${dut1_node}==${None}
726 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
727 | | Run keyword unless | ${dut2_node}==${None}
728 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
730 | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
731 | | [Documentation] | Common test teardown for performance tests which use
732 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
734 | | ... | *Test Variables needed:*
735 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
736 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
738 | | ... | *Arguments:*
739 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
740 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
741 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
742 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
744 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
745 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
747 | | Tear down performance test with vhost and VM with dpdk-testpmd
748 | | ... | ${dut1_node} | ${dut1_vm_refs}
749 | | ... | ${dut2_node} | ${dut2_vm_refs}
750 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
751 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
752 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
754 | Tear down DPDK 2-node performance topology
756 | | ... | Suite teardown phase with traffic generator teardown.
757 | | ... | Cleanup DPDK test environment.
759 | | ... | TODO: Add "Traffic should pass with no loss" with min rate
760 | | ... | on failure, as in the VPP test teardown?
762 | | Teardown traffic generator | ${tg}
763 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
765 | Tear down DPDK 3-node performance topology
767 | | ... | Suite teardown phase with traffic generator teardown.
768 | | ... | Cleanup DPDK test environment.
770 | | ... | TODO: Add "Traffic should pass with no loss" with min rate
771 | | ... | on failure, as in the VPP test teardown?
773 | | Teardown traffic generator | ${tg}
774 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
775 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
777 | Tear down performance test with NAT
778 | | [Documentation] | Common test teardown for performance \
779 | | ... | tests with NAT feature used.
781 | | ... | *Test Variables needed:*
782 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
783 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
787 | | ... | \| Tear down performance test with NAT \|
789 | | Tear down performance test
790 | | Show NAT verbose | ${dut1}
791 | | Show NAT verbose | ${dut2}
793 | Tear down performance test with ACL
794 | | [Documentation] | Common test teardown for performance \
795 | | ... | tests with ACL feature used.
797 | | ... | *Test Variables needed:*
798 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
799 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
803 | | ... | \| Tear down performance test with ACL \|
805 | | Tear down performance test
806 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
807 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
808 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
810 | Tear down performance test with MACIP ACL
811 | | [Documentation] | Common test teardown for performance \
812 | | ... | tests with MACIP ACL feature used.
814 | | ... | *Test Variables needed:*
815 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
816 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
820 | | ... | \| Tear down performance test with MACIP ACL \|
822 | | Tear down performance test
823 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
824 | | ... | Vpp Log Macip Acl Settings | ${dut1}
825 | | Run Keyword And Ignore Error
826 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
828 | Tear down performance test with Ligato Kubernetes
829 | | [Documentation] | Common test teardown for performance \
830 | | ... | tests with Ligato Kubernetes.
832 | | ... | TODO: Call Tear down performance test?
834 | | Run Keyword If Test Failed
835 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
836 | | Run Keyword If Test Failed
837 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
838 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit
840 | Tear down performance test with SRv6 with encapsulation
841 | | [Documentation] | Common test teardown for performance \
842 | | ... | tests with SRv6 with encapsulation feature used.
844 | | ... | *Test Variables needed:*
845 | | ... | - frame_size - L2 Frame Size [B]. Type: integer
846 | | ... | - traffic_profile - Profile name to initialize TG with. Type: string
850 | | ... | \| Tear down performance test with SRv6 with encapsulation \|
852 | | Tear down performance test
853 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
854 | | Run Keyword If Test Failed
855 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
856 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}