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_utils.robot
19 | Resource | resources/libraries/robot/tcp/tcp_setup.robot
20 | Documentation | Performance suite keywords - Suite and test setups and
25 # Keywords used in setups and teardowns
27 | Set variables in 2-node circular topology with DUT interface model
29 | | ... | Compute path for testing on two given nodes in circular topology
30 | | ... | based on interface model provided as an argument and set
31 | | ... | corresponding suite variables.
33 | | ... | *Arguments:*
34 | | ... | - iface_model - Interface model. Type: string
36 | | ... | _NOTE:_ This KW sets following suite variables:
37 | | ... | - tg - TG node
38 | | ... | - tg_if1 - 1st TG interface towards DUT.
39 | | ... | - tg_if1 - 1st TG interface MAC address.
40 | | ... | - tg_if2 - 2nd TG interface towards DUT.
41 | | ... | - tg_if2 - 2nd TG interface MAC address.
42 | | ... | - dut1 - DUT1 node
43 | | ... | - dut1_if1 - 1st DUT interface towards TG.
44 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
48 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
49 | | ... | \| Intel-X520-DA2 \|
51 | | [Arguments] | ${iface_model}
53 | | ${iface_model_list}= | Create list | ${iface_model}
54 | | Append Node | ${nodes['TG']}
55 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
56 | | Append Node | ${nodes['TG']}
57 | | Compute Path | always_same_link=${FALSE}
58 | | ${tg_if1} | ${tg}= | First Interface
59 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
60 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
61 | | ${tg_if2} | ${tg}= | Last Interface
62 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
63 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
64 | | Set Suite Variable | ${tg}
65 | | Set Suite Variable | ${tg_if1}
66 | | Set Suite Variable | ${tg_if1_mac}
67 | | Set Suite Variable | ${tg_if2}
68 | | Set Suite Variable | ${tg_if2_mac}
69 | | Set Suite Variable | ${dut1}
70 | | Set Suite Variable | ${dut1_if1}
71 | | Set Suite Variable | ${dut1_if2}
73 | Set variables in 3-node circular topology with DUT interface model
75 | | ... | Compute path for testing on three given nodes in circular topology
76 | | ... | based on interface model provided as an argument and set
77 | | ... | corresponding suite variables.
79 | | ... | *Arguments:*
80 | | ... | - iface_model - Interface model. Type: string
82 | | ... | _NOTE:_ This KW sets following suite variables:
83 | | ... | - tg - TG node
84 | | ... | - tg_if1 - 1st TG interface towards DUT.
85 | | ... | - tg_if1 - 1st TG interface MAC address.
86 | | ... | - tg_if2 - 2nd TG interface towards DUT.
87 | | ... | - tg_if2 - 2nd TG interface MAC address.
88 | | ... | - dut1 - DUT1 node
89 | | ... | - dut1_if1 - DUT1 interface towards TG.
90 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
91 | | ... | - dut2 - DUT2 node
92 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
93 | | ... | - dut2_if2 - DUT2 interface towards TG.
97 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
98 | | ... | \| Intel-X520-DA2 \|
100 | | [Arguments] | ${iface_model}
102 | | ${iface_model_list}= | Create list | ${iface_model}
103 | | Append Node | ${nodes['TG']}
104 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
105 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
106 | | Append Node | ${nodes['TG']}
108 | | ${tg_if1} | ${tg}= | Next Interface
109 | | ${dut1_if1} | ${dut1}= | Next Interface
110 | | ${dut1_if2} | ${dut1}= | Next Interface
111 | | ${dut2_if1} | ${dut2}= | Next Interface
112 | | ${dut2_if2} | ${dut2}= | Next Interface
113 | | ${tg_if2} | ${tg}= | Next Interface
114 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
115 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
116 | | Set Suite Variable | ${tg}
117 | | Set Suite Variable | ${tg_if1}
118 | | Set Suite Variable | ${tg_if1_mac}
119 | | Set Suite Variable | ${tg_if2}
120 | | Set Suite Variable | ${tg_if2_mac}
121 | | Set Suite Variable | ${dut1}
122 | | Set Suite Variable | ${dut1_if1}
123 | | Set Suite Variable | ${dut1_if2}
124 | | Set Suite Variable | ${dut2}
125 | | Set Suite Variable | ${dut2_if1}
126 | | Set Suite Variable | ${dut2_if2}
128 | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
130 | | ... | Compute path for testing on three given nodes in circular topology
131 | | ... | with double link between DUTs based on interface model provided as an
132 | | ... | argument and set corresponding suite variables.
134 | | ... | *Arguments:*
135 | | ... | - iface_model - Interface model. Type: string
137 | | ... | _NOTE:_ This KW sets following suite variables:
138 | | ... | - tg - TG node
139 | | ... | - tg_if1 - 1st TG interface towards DUT.
140 | | ... | - tg_if1 - 1st TG interface MAC address.
141 | | ... | - tg_if2 - 2nd TG interface towards DUT.
142 | | ... | - tg_if2 - 2nd TG interface MAC address.
143 | | ... | - dut1 - DUT1 node
144 | | ... | - dut1_if1 - DUT1 interface towards TG.
145 | | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
146 | | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
147 | | ... | - dut2 - DUT2 node
148 | | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
149 | | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
150 | | ... | - dut2_if2 - DUT2 interface towards TG.
154 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
155 | | ... | with double link between DUTs \| Intel-X520-DA2 \|
157 | | [Arguments] | ${iface_model}
159 | | ${iface_model_list}= | Create list | ${iface_model}
160 | | # Compute path TG - DUT1 with single link in between
161 | | Append Node | ${nodes['TG']}
162 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
163 | | Append Node | ${nodes['TG']}
165 | | ${tg_if1} | ${tg}= | Next Interface
166 | | ${dut1_if1} | ${dut1}= | Next Interface
167 | | # Compute path TG - DUT2 with single link in between
169 | | Append Node | ${nodes['TG']}
170 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
171 | | Append Node | ${nodes['TG']}
173 | | ${tg_if2} | ${tg}= | Next Interface
174 | | ${dut2_if2} | ${dut2}= | Next Interface
175 | | # Compute path DUT1 - DUT2 with double link in between
177 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
178 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
179 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
180 | | Compute Path | always_same_link=${FALSE}
181 | | ${dut1_if2_1} | ${dut1}= | First Interface
182 | | ${dut1_if2_2} | ${dut1}= | Last Interface
183 | | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
184 | | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
185 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
186 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
187 | | # Set suite variables
188 | | Set Suite Variable | ${tg}
189 | | Set Suite Variable | ${tg_if1}
190 | | Set Suite Variable | ${tg_if1_mac}
191 | | Set Suite Variable | ${tg_if2}
192 | | Set Suite Variable | ${tg_if2_mac}
193 | | Set Suite Variable | ${dut1}
194 | | Set Suite Variable | ${dut1_if1}
195 | | Set Suite Variable | ${dut1_if2_1}
196 | | Set Suite Variable | ${dut1_if2_2}
197 | | Set Suite Variable | ${dut2}
198 | | Set Suite Variable | ${dut2_if1_1}
199 | | Set Suite Variable | ${dut2_if1_2}
200 | | Set Suite Variable | ${dut2_if2}
202 | Tear down guest VM with dpdk-testpmd
204 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
205 | | ... | Argument is dictionary of all qemu nodes running with its names.
206 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
208 | | ... | *Arguments:*
209 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
210 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
214 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
215 | | ... | \| ${dut_vm_refs} \|
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 | | | Dpdk Testpmd Stop | ${vm}
224 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
228 | | ... | Stop all qemu processes running on ${dut_node}.
229 | | ... | Argument is dictionary of all qemu nodes running with its names.
231 | | ... | *Arguments:*
232 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
233 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
237 | | ... | \| Tear down guest VM \| ${node['DUT1']} \
238 | | ... | \| ${dut_vm_refs} \|
240 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
241 | | ${vms_number}= | Get Length | ${dut_vm_refs}
242 | | ${index}= | Set Variable | ${0}
243 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
244 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
245 | | | ${index}= | Evaluate | ${index} + 1
246 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
250 | Set up 2-node performance topology with DUT's NIC model
252 | | ... | Suite preparation phase that sets the default startup configuration of
253 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
254 | | ... | variables used in test cases based on interface model provided as an
255 | | ... | argument. Initializes traffic generator.
257 | | ... | *Arguments:*
258 | | ... | - topology_type - Topology type. Type: string
259 | | ... | - nic_model - Interface model. Type: string
263 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
265 | | [Arguments] | ${topology_type} | ${nic_model}
267 | | Set variables in 2-node circular topology with DUT interface model
268 | | ... | ${nic_model}
269 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
270 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
272 | Set up 2-node-switched performance topology with DUT's NIC model
274 | | ... | Suite preparation phase that sets the default startup configuration of
275 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
276 | | ... | variables used in test cases based on interface model provided as an
277 | | ... | argument. Initializes traffic generator.
279 | | ... | *Arguments:*
280 | | ... | - topology_type - Topology type. Type: string
281 | | ... | - nic_model - Interface model. Type: string
282 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
283 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
287 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
288 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
290 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
291 | | ... | ${tg_if2_dest_mac}
293 | | Set variables in 2-node circular topology with DUT interface model
294 | | ... | ${nic_model}
295 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
296 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
297 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
299 | Set up 3-node performance topology with DUT's NIC model
301 | | ... | Suite preparation phase that sets the default startup configuration of
302 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
303 | | ... | variables used in test cases based on interface model provided as an
304 | | ... | argument. Initializes traffic generator.
306 | | ... | *Arguments:*
307 | | ... | - topology_type - Topology type. Type: string
308 | | ... | - nic_model - Interface model. Type: string
312 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
313 | | ... | \| Intel-X520-DA2 \|
315 | | [Arguments] | ${topology_type} | ${nic_model}
317 | | Set variables in 3-node circular topology with DUT interface model
318 | | ... | ${nic_model}
319 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
320 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
322 | Set up 3-node performance topology with DUT's NIC model with double link between DUTs
324 | | ... | Suite preparation phase that sets the default startup configuration of
325 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
326 | | ... | variables used in test cases based on interface model provided as an
327 | | ... | argument. Initializes traffic generator.
329 | | ... | *Arguments:*
330 | | ... | - topology_type - Topology type. Type: string
331 | | ... | - nic_model - Interface model. Type: string
335 | | ... | \| Set up 3-node performance topology with DUT's NIC model with \
336 | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
338 | | [Arguments] | ${topology_type} | ${nic_model}
340 | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
341 | | ... | ${nic_model}
342 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
343 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
345 | Set up DPDK 2-node performance topology with DUT's NIC model
347 | | ... | Updates interfaces on all nodes and sets the global
348 | | ... | variables used in test cases based on interface model provided as an
349 | | ... | argument. Initializes traffic generator. Initializes DPDK test
350 | | ... | environment.
352 | | ... | *Arguments:*
353 | | ... | - topology_type - Topology type. Type: string
354 | | ... | - nic_model - Interface model. Type: string
358 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
359 | | ... | \| L2 \| Intel-X520-DA2 \|
361 | | [Arguments] | ${topology_type} | ${nic_model}
363 | | Set variables in 2-node circular topology with DUT interface model
364 | | ... | ${nic_model}
365 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
366 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
367 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
369 | Set up DPDK 3-node performance topology with DUT's NIC model
371 | | ... | Updates interfaces on all nodes and sets the global
372 | | ... | variables used in test cases based on interface model provided as an
373 | | ... | argument. Initializes traffic generator. Initializes DPDK test
374 | | ... | environment.
376 | | ... | *Arguments:*
377 | | ... | - topology_type - Topology type. Type: string
378 | | ... | - nic_model - Interface model. Type: string
382 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
384 | | [Arguments] | ${topology_type} | ${nic_model}
386 | | Set variables in 3-node circular topology with DUT interface model
387 | | ... | ${nic_model}
388 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
389 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
390 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
391 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
393 | Set up SRIOV 2-node performance topology with DUT's NIC model
395 | | ... | Suite preparation phase that sets default startup configuration of
396 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
397 | | ... | variables used in test cases based on interface model provided as an
398 | | ... | argument. Initializes traffic generator.
399 | | ... | It configures PCI device with VFs on all DUTs.
401 | | ... | *Arguments:*
402 | | ... | - topology_type - Topology type. Type: string
403 | | ... | - nic_model - Interface model. Type: string
404 | | ... | - vf_driver - Virtual function driver. Type: string
405 | | ... | - numvfs - Number of VFs. Type: integer
409 | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
410 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
412 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
413 | | ... | ${numvfs}=${1}
415 | | Set variables in 2-node circular topology with DUT interface model
416 | | ... | ${nic_model}
417 | | Run Keyword If | '${vf_driver}' == 'AVF'
418 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
419 | | ... | topology_type=${topology_type}
420 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
421 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
422 | | ... | ${topology_type}
424 | Set up SRIOV 3-node performance topology with DUT's NIC model
426 | | ... | Suite preparation phase that sets default startup configuration of
427 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
428 | | ... | variables used in test cases based on interface model provided as an
429 | | ... | argument. Initializes traffic generator.
430 | | ... | It configures PCI device with VFs on all DUTs.
432 | | ... | *Arguments:*
433 | | ... | - topology_type - Topology type. Type: string
434 | | ... | - nic_model - Interface model. Type: string
435 | | ... | - vf_driver - Virtual function driver. Type: string
436 | | ... | - numvfs - Number of VFs. Type: integer
440 | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
441 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
443 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
444 | | ... | ${numvfs}=${1}
446 | | Set variables in 3-node circular topology with DUT interface model
447 | | ... | ${nic_model}
448 | | Run Keyword If | '${vf_driver}' == 'AVF'
449 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
450 | | ... | topology_type=${topology_type}
451 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
452 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
453 | | ... | ${topology_type}
455 | Set up IPSec performance test suite
457 | | ... | Suite preparation phase that sets default startup configuration of
458 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
459 | | ... | variables used in test cases based on interface model provided as an
460 | | ... | argument. Initializes traffic generator.
461 | | ... | Then it configures crypto device and kernel module on all DUTs.
463 | | ... | *Arguments:*
464 | | ... | - topology_type - Topology type. Type: string
465 | | ... | - nic_model - Interface model. Type: string
466 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
467 | | ... | (Optional). Type: string, default value: HW_cryptodev
471 | | ... | \| Set up IPSec performance test suite \| L2 \
472 | | ... | \| Intel-X520-DA2 \|
474 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
476 | | Set up 3-node performance topology with DUT's NIC model
477 | | ... | ${topology_type} | ${nic_model}
478 | | ${numvfs}= | Set Variable If
479 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
480 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
481 | | ... | Configure crypto device on all DUTs | force_init=${True}
482 | | ... | numvfs=${numvfs}
483 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
484 | | ... | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
486 | Set up performance test suite with MEMIF
488 | | ... | Append memif_plugin.so to the list of enabled plugins.
490 | | Set Suite Variable | @{plugins_to_enable}
491 | | Append To List | ${plugins_to_enable} | memif_plugin.so
493 | Set up performance test suite with NAT
495 | | ... | Append nat_plugin.so to the list of enabled plugins.
497 | | Set Suite Variable | @{plugins_to_enable}
498 | | Append To List | ${plugins_to_enable} | nat_plugin.so
500 | Set up performance test suite with ACL
502 | | ... | Append acl_plugin.so to the list of enabled plugins.
504 | | Set Suite Variable | @{plugins_to_enable}
505 | | Append To List | ${plugins_to_enable} | acl_plugin.so
507 | Set up performance test suite with AVF driver
509 | | ... | Append avf_plugin.so to the list of enabled plugins.
511 | | Set Suite Variable | @{plugins_to_enable}
512 | | Append To List | ${plugins_to_enable} | avf_plugin.so
514 | Set up performance test suite with Static SRv6 proxy
516 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
518 | | Set Suite Variable | @{plugins_to_enable}
519 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
521 | Set up performance test suite with Dynamic SRv6 proxy
523 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
525 | | Set Suite Variable | @{plugins_to_enable}
526 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
528 | Set up performance test suite with Masquerading SRv6 proxy
530 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
532 | | Set Suite Variable | @{plugins_to_enable}
533 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
535 | Set up performance test suite with LACP mode link bonding
537 | | ... | Append lacp_plugin.so to the list of enabled plugins.
539 | | Set Suite Variable | @{plugins_to_enable}
540 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
542 | Set up 3-node performance topology with wrk and DUT's NIC model
544 | | ... | Suite preparation phase that sets the default startup configuration of
545 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
546 | | ... | variables used in test cases based on interface model provided as an
547 | | ... | argument. Installs the traffic generator.
549 | | ... | *Arguments:*
550 | | ... | - iface_model - Interface model. Type: string
554 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
555 | | ... | \| Intel-X520-DA2 \|
557 | | [Arguments] | ${iface_model}
559 | | Set variables in 3-node circular topology with DUT interface model
560 | | ... | ${iface_model}
561 | | Iface update numa node | ${tg}
562 # Make sure TRex is stopped
563 | | ${running}= | Is TRex running | ${tg}
564 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
565 | | ${curr_driver}= | Get PCI dev driver | ${tg}
566 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
567 | | Run keyword if | '${curr_driver}'!='${None}'
568 | | ... | PCI Driver Unbind | ${tg} |
569 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
570 # Bind tg_if1 to driver specified in the topology
571 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
572 | | PCI Driver Bind | ${tg}
573 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
575 | | ${intf_name}= | Get Linux interface name | ${tg}
576 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
577 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
578 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
579 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
580 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
581 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
582 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
583 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
584 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
585 | | Set Linux interface up | ${tg} | ${intf_name}
586 | | Install wrk | ${tg}
590 | Tear down 2-node performance topology
592 | | ... | Suite teardown phase with traffic generator teardown.
594 | | Teardown traffic generator | ${tg}
596 | Tear down 3-node performance topology
598 | | ... | Suite teardown phase with traffic generator teardown.
600 | | Teardown traffic generator | ${tg}
604 | Set up performance test
605 | | [Documentation] | Common test setup for performance tests.
607 | | Reset PAPI History On All DUTs | ${nodes}
608 | | Create base startup configuration of VPP on all DUTs
610 | Set up tcp performance test
611 | | [Documentation] | Common test setup for TCP performance tests.
613 | | Reset PAPI History On All DUTs | ${nodes}
614 | | Create base startup configuration of VPP for TCP tests on all DUTs
616 | Set up performance test with Ligato Kubernetes
617 | | [Documentation] | Common test setup for performance tests with Ligato \
618 | | ... | Kubernetes.
620 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
621 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
622 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
623 | | Apply Kubernetes resource on all duts | ${nodes}
624 | | ... | configmaps/vswitch-agent-cfg.yaml
625 | | Apply Kubernetes resource on all duts | ${nodes}
626 | | ... | configmaps/vnf-agent-cfg.yaml
627 | | Apply Kubernetes resource on all duts | ${nodes}
628 | | ... | pods/contiv-sfc-controller.yaml
629 | | Apply Kubernetes resource on all duts | ${nodes}
630 | | ... | pods/contiv-vswitch.yaml
632 | Set up performance test with containers
634 | | ... | Common test setup for performance tests with containers
636 | | ... | *Arguments:*
637 | | ... | - chains: Total number of chains. Type: integer
638 | | ... | - nodeness: Total number of nodes per chain. Type: integer
639 | | ... | - auto_scale - If True, use same amount of Dataplane threads for
640 | | ... | network function as DUT, otherwise use single physical core for
641 | | ... | every network function. Type: boolean
645 | | ... | \| Set up performance test with containers \| 1 \| 1 \|
647 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
649 | | Set Test Variable | @{container_groups} | @{EMPTY}
650 | | Set Test Variable | ${container_group} | CNF
651 | | Set Test Variable | ${nf_nodes}
652 | | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
653 | | ... | engine=${container_engine} | WITH NAME | ${container_group}
654 | | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
655 | | ... | auto_scale=${auto_scale}
656 | | Acquire all '${container_group}' containers
657 | | Create all '${container_group}' containers
658 | | Configure VPP in all '${container_group}' containers
659 | | Stop VPP service on all DUTs | ${nodes}
660 | | Start VPP in all '${container_group}' containers
661 | | Start VPP service on all DUTs | ${nodes}
662 | | Append To List | ${container_groups} | ${container_group}
666 | Tear down performance test
667 | | [Documentation] | Common test teardown for performance tests.
669 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
670 | | Show PAPI History On All DUTs | ${nodes}
671 | | Get Core Files on All Nodes | ${nodes}
672 | | Set Test Variable | ${pkt_trace} | ${True}
674 | Tear down performance discovery test
675 | | [Documentation] | Common test teardown for ndrpdr performance tests.
677 | | ... | *Arguments:*
678 | | ... | - rate - Rate for sending packets. Type: string
679 | | ... | - framesize - L2 Frame Size [B]. Type: integer
680 | | ... | - topology_type - Topology type. Type: string
684 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
685 | | ... | \| 3-node-IPv4 \|
687 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
689 | | Tear down performance test
690 | | Show statistics on all DUTs | ${nodes}
691 | | Run Keyword If Test Failed
692 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
693 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
695 | Tear down performance mrr test
696 | | [Documentation] | Common test teardown for max-received-rate performance
699 | | Tear down performance test
701 | Tear down performance test with wrk
702 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
707 | | ... | \| Tear down performance test with wrk \|
709 | | Tear down performance test
711 | Tear down performance test with container
713 | | ... | Common test teardown for performance tests which uses containers.
715 | | :FOR | ${container_group} | IN | @{container_groups}
716 | | | Destroy all '${container_group}' containers
718 | Tear down performance test with vhost and VM with dpdk-testpmd
719 | | [Documentation] | Common test teardown for performance tests which use
720 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
722 | | ... | *Arguments:*
723 | | ... | - rate - Rate for sending packets. Type: string
724 | | ... | - framesize - L2 Frame Size [B]. Type: integer
725 | | ... | - topology_type - Topology type. Type: string
726 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
727 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
728 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
729 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
733 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
734 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
735 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
737 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
738 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
739 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
741 | | Tear down performance discovery test | ${rate} | ${framesize}
742 | | ... | ${topology_type}
743 | | Show VPP vhost on all DUTs | ${nodes}
744 | | Run keyword unless | ${dut1_node}==${None}
745 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
746 | | Run keyword unless | ${dut2_node}==${None}
747 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
749 | Tear down performance mrr test with vhost and VM with dpdk-testpmd
750 | | [Documentation] | Common test teardown for mrr tests which use
751 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
753 | | ... | *Arguments:*
754 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
755 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
756 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
757 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
761 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
762 | | ... | \| ${node['DUT1']} \| ${dut_vm_refs} \
763 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
765 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
766 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
768 | | Tear down performance mrr test
769 | | Show VPP vhost on all DUTs | ${nodes}
770 | | Run keyword unless | ${dut1_node}==${None}
771 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
772 | | Run keyword unless | ${dut2_node}==${None}
773 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
775 | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
776 | | [Documentation] | Common test teardown for performance tests which use
777 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
779 | | ... | *Arguments:*
780 | | ... | - rate - Rate for sending packets. Type: string
781 | | ... | - framesize - L2 Frame Size [B]. Type: integer
782 | | ... | - topology_type - Topology type. Type: string
783 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
784 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
785 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
786 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
788 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
789 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
790 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
792 | | Tear down performance test with vhost and VM with dpdk-testpmd
793 | | ... | ${rate} | ${framesize} | ${topology_type}
794 | | ... | ${dut1_node} | ${dut1_vm_refs}
795 | | ... | ${dut2_node} | ${dut2_vm_refs}
796 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
797 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
798 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
800 | Tear down mrr test with vhost and VM with dpdk-testpmd and ACL
801 | | [Documentation] | Common test teardown for mrr tests which use
802 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
804 | | ... | *Arguments:*
805 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
806 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
807 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
808 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
810 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
811 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
813 | | Tear down performance mrr test with vhost and VM with dpdk-testpmd
814 | | ... | ${dut1_node} | ${dut1_vm_refs}
815 | | ... | ${dut2_node} | ${dut2_vm_refs}
816 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
817 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
818 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
820 | Tear down DPDK 2-node performance topology
822 | | ... | Suite teardown phase with traffic generator teardown.
823 | | ... | Cleanup DPDK test environment.
825 | | Teardown traffic generator | ${tg}
826 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
828 | Tear down DPDK 3-node performance topology
830 | | ... | Suite teardown phase with traffic generator teardown.
831 | | ... | Cleanup DPDK test environment.
833 | | Teardown traffic generator | ${tg}
834 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
835 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
837 | Tear down performance discovery test with NAT
838 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
839 | | ... | tests with NAT feature used.
841 | | ... | *Arguments:*
842 | | ... | - rate - Rate for sending packets. Type: string
843 | | ... | - framesize - L2 Frame Size [B]. Type: integer
844 | | ... | - traffic_profile - Traffic profile. Type: string
848 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
849 | | ... | \| ${traffic_profile} \|
851 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
853 | | Tear down performance discovery test | ${rate} | ${framesize}
854 | | ... | ${traffic_profile}
855 | | Show NAT verbose | ${dut1}
856 | | Show NAT verbose | ${dut2}
858 | Tear down mrr test with NAT
859 | | [Documentation] | Common test teardown for mrr performance \
860 | | ... | tests with NAT feature used.
862 | | ... | \| Tear down mrr test with NAT \|
864 | | Tear down performance mrr test
865 | | Show NAT verbose | ${dut1}
866 | | Show NAT verbose | ${dut2}
868 | Tear down performance test with ACL
869 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
870 | | ... | tests with ACL feature used.
872 | | ... | *Arguments:*
873 | | ... | - rate - Rate for sending packets. Type: string
874 | | ... | - framesize - L2 Frame Size [B]. Type: integer
875 | | ... | - traffic_profile - Traffic profile. Type: string
879 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
880 | | ... | \| ${traffic_profile} \|
882 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
884 | | Tear down performance discovery test | ${rate} | ${framesize}
885 | | ... | ${traffic_profile}
886 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
887 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
888 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
890 | Tear down mrr test with ACL
891 | | [Documentation] | Common test teardown for mrr performance \
892 | | ... | tests with ACL feature used.
896 | | ... | \| Tear down mrr test with ACL \|
898 | | Tear down performance mrr test
899 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
900 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
901 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
903 | Tear down performance test with MACIP ACL
904 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
905 | | ... | tests with MACIP ACL feature used.
907 | | ... | *Arguments:*
908 | | ... | - rate - Rate for sending packets. Type: string
909 | | ... | - framesize - L2 Frame Size [B]. Type: integer
910 | | ... | - traffic_profile - Traffic profile. Type: string
914 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
915 | | ... | \| ${traffic_profile} \|
917 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
919 | | Tear down performance discovery test | ${rate} | ${framesize}
920 | | ... | ${traffic_profile}
921 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
922 | | ... | Vpp Log Macip Acl Settings | ${dut1}
923 | | Run Keyword And Ignore Error
924 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
926 | Tear down mrr test with MACIP ACL
927 | | [Documentation] | Common test teardown for mrr performance \
928 | | ... | tests with MACIP ACL feature used.
932 | | ... | \| Tear down mrr test with MACIP ACL \|
934 | | Tear down performance mrr test
935 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
936 | | ... | Vpp Log Macip Acl Settings | ${dut1}
937 | | Run Keyword And Ignore Error
938 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
940 | Tear down performance test with Ligato Kubernetes
941 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
942 | | ... | tests with Ligato Kubernetes.
944 | | Run Keyword If Test Failed
945 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
946 | | Run Keyword If Test Failed
947 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
948 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit
950 | Tear down performance test with SRv6 with encapsulation
951 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
952 | | ... | tests with SRv6 with encapsulation feature used.
954 | | ... | *Arguments:*
955 | | ... | - rate - Rate for sending packets. Type: string
956 | | ... | - framesize - L2 Frame Size [B]. Type: integer/string
957 | | ... | - traffic_profile - Traffic profile. Type: string
961 | | ... | \| Tear down performance test with SRv6 with encapsulation \
962 | | ... | \| 100000pps \| 64 \| ${traffic_profile} \|
964 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
966 | | Tear down performance discovery test | ${rate} | ${framesize}
967 | | ... | ${traffic_profile}
968 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
969 | | Run Keyword If Test Failed
970 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
971 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
973 | Tear down mrr test with SRv6 with encapsulation
974 | | [Documentation] | Common test teardown for mrr tests with SRv6 with \
975 | | ... | encapsulation feature used.
979 | | ... | \| Tear down mrr test with SRv6 with encapsulation \|
981 | | Tear down performance mrr test
982 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
983 | | Run Keyword If Test Failed
984 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
985 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}