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:
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_if2 - 2nd TG interface towards DUT.
40 | | ... | - dut1 - DUT1 node
41 | | ... | - dut1_if1 - 1st DUT interface towards TG.
42 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
46 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
47 | | ... | \| Intel-X520-DA2 \|
49 | | [Arguments] | ${iface_model}
51 | | ${iface_model_list}= | Create list | ${iface_model}
52 | | Append Node | ${nodes['TG']}
53 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
54 | | Append Node | ${nodes['TG']}
55 | | Compute Path | always_same_link=${FALSE}
56 | | ${tg_if1} | ${tg}= | First Interface
57 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
58 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
59 | | ${tg_if2} | ${tg}= | Last Interface
60 | | Set Suite Variable | ${tg}
61 | | Set Suite Variable | ${tg_if1}
62 | | Set Suite Variable | ${tg_if2}
63 | | Set Suite Variable | ${dut1}
64 | | Set Suite Variable | ${dut1_if1}
65 | | Set Suite Variable | ${dut1_if2}
67 | Set variables in 3-node circular topology with DUT interface model
69 | | ... | Compute path for testing on three given nodes in circular topology
70 | | ... | based on interface model provided as an argument and set
71 | | ... | corresponding suite variables.
73 | | ... | *Arguments:*
74 | | ... | - iface_model - Interface model. Type: string
76 | | ... | _NOTE:_ This KW sets following suite variables:
77 | | ... | - tg - TG node
78 | | ... | - tg_if1 - TG interface towards DUT1.
79 | | ... | - tg_if2 - TG interface towards DUT2.
80 | | ... | - dut1 - DUT1 node
81 | | ... | - dut1_if1 - DUT1 interface towards TG.
82 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
83 | | ... | - dut2 - DUT2 node
84 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
85 | | ... | - dut2_if2 - DUT2 interface towards TG.
89 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
90 | | ... | \| Intel-X520-DA2 \|
92 | | [Arguments] | ${iface_model}
94 | | ${iface_model_list}= | Create list | ${iface_model}
95 | | Append Node | ${nodes['TG']}
96 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
97 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
98 | | Append Node | ${nodes['TG']}
100 | | ${tg_if1} | ${tg}= | Next Interface
101 | | ${dut1_if1} | ${dut1}= | Next Interface
102 | | ${dut1_if2} | ${dut1}= | Next Interface
103 | | ${dut2_if1} | ${dut2}= | Next Interface
104 | | ${dut2_if2} | ${dut2}= | Next Interface
105 | | ${tg_if2} | ${tg}= | Next Interface
106 | | Set Suite Variable | ${tg}
107 | | Set Suite Variable | ${tg_if1}
108 | | Set Suite Variable | ${tg_if2}
109 | | Set Suite Variable | ${dut1}
110 | | Set Suite Variable | ${dut1_if1}
111 | | Set Suite Variable | ${dut1_if2}
112 | | Set Suite Variable | ${dut2}
113 | | Set Suite Variable | ${dut2_if1}
114 | | Set Suite Variable | ${dut2_if2}
116 | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
118 | | ... | Compute path for testing on three given nodes in circular topology
119 | | ... | with double link between DUTs based on interface model provided as an
120 | | ... | argument and set corresponding suite variables.
122 | | ... | *Arguments:*
123 | | ... | - iface_model - Interface model. Type: string
125 | | ... | _NOTE:_ This KW sets following suite variables:
126 | | ... | - tg - TG node
127 | | ... | - tg_if1 - TG interface towards DUT1.
128 | | ... | - tg_if2 - TG interface towards DUT2.
129 | | ... | - dut1 - DUT1 node
130 | | ... | - dut1_if1 - DUT1 interface towards TG.
131 | | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
132 | | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
133 | | ... | - dut2 - DUT2 node
134 | | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
135 | | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
136 | | ... | - dut2_if2 - DUT2 interface towards TG.
140 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
141 | | ... | with double link between DUTs \| Intel-X520-DA2 \|
143 | | [Arguments] | ${iface_model}
145 | | ${iface_model_list}= | Create list | ${iface_model}
146 | | # Compute path TG - DUT1 with single link in between
147 | | Append Node | ${nodes['TG']}
148 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
149 | | Append Node | ${nodes['TG']}
151 | | ${tg_if1} | ${tg}= | Next Interface
152 | | ${dut1_if1} | ${dut1}= | Next Interface
153 | | # Compute path TG - DUT2 with single link in between
155 | | Append Node | ${nodes['TG']}
156 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
157 | | Append Node | ${nodes['TG']}
159 | | ${tg_if2} | ${tg}= | Next Interface
160 | | ${dut2_if2} | ${dut2}= | Next Interface
161 | | # Compute path DUT1 - DUT2 with double link in between
163 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
164 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
165 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
166 | | Compute Path | always_same_link=${FALSE}
167 | | ${dut1_if2_1} | ${dut1}= | First Interface
168 | | ${dut1_if2_2} | ${dut1}= | Last Interface
169 | | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
170 | | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
171 | | # Set suite variables
172 | | Set Suite Variable | ${tg}
173 | | Set Suite Variable | ${tg_if1}
174 | | Set Suite Variable | ${tg_if2}
175 | | Set Suite Variable | ${dut1}
176 | | Set Suite Variable | ${dut1_if1}
177 | | Set Suite Variable | ${dut1_if2_1}
178 | | Set Suite Variable | ${dut1_if2_2}
179 | | Set Suite Variable | ${dut2}
180 | | Set Suite Variable | ${dut2_if1_1}
181 | | Set Suite Variable | ${dut2_if1_2}
182 | | Set Suite Variable | ${dut2_if2}
184 | Tear down guest VM with dpdk-testpmd
186 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
187 | | ... | Argument is dictionary of all qemu nodes running with its names.
188 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
190 | | ... | *Arguments:*
191 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
192 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
196 | | ... | \| Tear down guest VM with dpdk-testpmd \| ${node['DUT1']} \
197 | | ... | \| ${dut_vm_refs} \|
199 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
200 | | ${vms_number}= | Get Length | ${dut_vm_refs}
201 | | ${index}= | Set Variable | ${0}
202 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
203 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
204 | | | ${index}= | Evaluate | ${index} + 1
205 | | | Dpdk Testpmd Stop | ${vm}
206 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
207 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
208 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
212 | | ... | Stop all qemu processes running on ${dut_node}.
213 | | ... | Argument is dictionary of all qemu nodes running with its names.
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 \| ${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 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
231 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
232 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
236 | Set up 2-node performance topology with DUT's NIC model
238 | | ... | Suite preparation phase that sets the default startup configuration of
239 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
240 | | ... | variables used in test cases based on interface model provided as an
241 | | ... | argument. Initializes traffic generator.
243 | | ... | *Arguments:*
244 | | ... | - topology_type - Topology type. Type: string
245 | | ... | - nic_model - Interface model. Type: string
249 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
251 | | [Arguments] | ${topology_type} | ${nic_model}
253 | | Set variables in 2-node circular topology with DUT interface model
254 | | ... | ${nic_model}
255 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
256 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
258 | Set up 2-node-switched performance topology with DUT's NIC model
260 | | ... | Suite preparation phase that sets the default startup configuration of
261 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
262 | | ... | variables used in test cases based on interface model provided as an
263 | | ... | argument. Initializes traffic generator.
265 | | ... | *Arguments:*
266 | | ... | - topology_type - Topology type. Type: string
267 | | ... | - nic_model - Interface model. Type: string
268 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
269 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
273 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
274 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
276 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
277 | | ... | ${tg_if2_dest_mac}
279 | | Set variables in 2-node circular topology with DUT interface model
280 | | ... | ${nic_model}
281 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
282 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
283 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
285 | Set up 3-node performance topology with DUT's NIC model
287 | | ... | Suite preparation phase that sets the default startup configuration of
288 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
289 | | ... | variables used in test cases based on interface model provided as an
290 | | ... | argument. Initializes traffic generator.
292 | | ... | *Arguments:*
293 | | ... | - topology_type - Topology type. Type: string
294 | | ... | - nic_model - Interface model. Type: string
298 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
299 | | ... | \| Intel-X520-DA2 \|
301 | | [Arguments] | ${topology_type} | ${nic_model}
303 | | Set variables in 3-node circular topology with DUT interface model
304 | | ... | ${nic_model}
305 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
306 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
308 | Set up 3-node performance topology with DUT's NIC model with double link between DUTs
310 | | ... | Suite preparation phase that sets the default startup configuration of
311 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
312 | | ... | variables used in test cases based on interface model provided as an
313 | | ... | argument. Initializes traffic generator.
315 | | ... | *Arguments:*
316 | | ... | - topology_type - Topology type. Type: string
317 | | ... | - nic_model - Interface model. Type: string
321 | | ... | \| Set up 3-node performance topology with DUT's NIC model with \
322 | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
324 | | [Arguments] | ${topology_type} | ${nic_model}
326 | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
327 | | ... | ${nic_model}
328 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
329 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
331 | Set up DPDK 2-node performance topology with DUT's NIC model
333 | | ... | Updates interfaces on all nodes and sets the global
334 | | ... | variables used in test cases based on interface model provided as an
335 | | ... | argument. Initializes traffic generator. Initializes DPDK test
336 | | ... | environment.
338 | | ... | *Arguments:*
339 | | ... | - topology_type - Topology type. Type: string
340 | | ... | - nic_model - Interface model. Type: string
344 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
345 | | ... | \| L2 \| Intel-X520-DA2 \|
347 | | [Arguments] | ${topology_type} | ${nic_model}
349 | | Set variables in 2-node circular topology with DUT interface model
350 | | ... | ${nic_model}
351 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
352 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
353 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
355 | Set up DPDK 3-node performance topology with DUT's NIC model
357 | | ... | Updates interfaces on all nodes and sets the global
358 | | ... | variables used in test cases based on interface model provided as an
359 | | ... | argument. Initializes traffic generator. Initializes DPDK test
360 | | ... | environment.
362 | | ... | *Arguments:*
363 | | ... | - topology_type - Topology type. Type: string
364 | | ... | - nic_model - Interface model. Type: string
368 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
370 | | [Arguments] | ${topology_type} | ${nic_model}
372 | | Set variables in 3-node circular topology with DUT interface model
373 | | ... | ${nic_model}
374 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
375 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
376 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
377 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
379 | Set up SRIOV 2-node performance topology with DUT's NIC model
381 | | ... | Suite preparation phase that sets default startup configuration of
382 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
383 | | ... | variables used in test cases based on interface model provided as an
384 | | ... | argument. Initializes traffic generator.
385 | | ... | It configures PCI device with VFs on all DUTs.
387 | | ... | *Arguments:*
388 | | ... | - topology_type - Topology type. Type: string
389 | | ... | - nic_model - Interface model. Type: string
390 | | ... | - vf_driver - Virtual function driver. Type: string
391 | | ... | - numvfs - Number of VFs. Type: integer
395 | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
396 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
398 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
399 | | ... | ${numvfs}=${1}
401 | | Set variables in 2-node circular topology with DUT interface model
402 | | ... | ${nic_model}
403 | | Run Keyword If | '${vf_driver}' == 'AVF'
404 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
405 | | ... | topology_type=${topology_type}
406 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
407 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
408 | | ... | ${topology_type}
410 | Set up SRIOV 3-node performance topology with DUT's NIC model
412 | | ... | Suite preparation phase that sets default startup configuration of
413 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
414 | | ... | variables used in test cases based on interface model provided as an
415 | | ... | argument. Initializes traffic generator.
416 | | ... | It configures PCI device with VFs on all DUTs.
418 | | ... | *Arguments:*
419 | | ... | - topology_type - Topology type. Type: string
420 | | ... | - nic_model - Interface model. Type: string
421 | | ... | - vf_driver - Virtual function driver. Type: string
422 | | ... | - numvfs - Number of VFs. Type: integer
426 | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
427 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
429 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
430 | | ... | ${numvfs}=${1}
432 | | Set variables in 3-node circular topology with DUT interface model
433 | | ... | ${nic_model}
434 | | Run Keyword If | '${vf_driver}' == 'AVF'
435 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
436 | | ... | topology_type=${topology_type}
437 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
438 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
439 | | ... | ${topology_type}
441 | Set up IPSec performance test suite
443 | | ... | Suite preparation phase that sets default startup configuration of
444 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
445 | | ... | variables used in test cases based on interface model provided as an
446 | | ... | argument. Initializes traffic generator.
447 | | ... | Then it configures crypto device and kernel module on all DUTs.
449 | | ... | *Arguments:*
450 | | ... | - topology_type - Topology type. Type: string
451 | | ... | - nic_model - Interface model. Type: string
452 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
453 | | ... | (Optional). Type: string, default value: HW_cryptodev
457 | | ... | \| Set up IPSec performance test suite \| L2 \
458 | | ... | \| Intel-X520-DA2 \|
460 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
462 | | Set up 3-node performance topology with DUT's NIC model
463 | | ... | ${topology_type} | ${nic_model}
464 | | ${numvfs}= | Set Variable If
465 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
466 | | ... | '${crypto_type}' == 'SW_cryptodev' | ${0}
467 | | Configure crypto device on all DUTs | force_init=${True} | numvfs=${numvfs}
468 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
469 | | ... | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
471 | Set up performance topology with containers
473 | | ... | Suite preparation phase that starts containers
475 | | ... | *Arguments:*
476 | | ... | - chains: Total number of chains. Type: integer
477 | | ... | - nodeness: Total number of nodes per chain. Type: integer
481 | | ... | \| Set up performance topology with containers \| 1 \| 1 \|
483 | | [Arguments] | ${chains}=${1} | ${nodeness}=${1}
485 | | Set Suite Variable | @{container_groups} | @{EMPTY}
486 | | Construct chains of containers on all DUTs | ${chains} | ${nodeness}
487 | | Acquire all 'CNF' containers
488 | | Create all 'CNF' containers
489 | | Configure VPP in all 'CNF' containers
490 | | Stop VPP service on all DUTs | ${nodes}
491 | | Install VPP in all 'CNF' containers
492 | | Start VPP service on all DUTs | ${nodes}
494 | Set up performance test suite with MEMIF
496 | | ... | Append memif_plugin.so to the list of enabled plugins.
498 | | Set Suite Variable | @{plugins_to_enable}
499 | | Append To List | ${plugins_to_enable} | memif_plugin.so
501 | Set up performance test suite with NAT
503 | | ... | Append nat_plugin.so to the list of enabled plugins.
505 | | Set Suite Variable | @{plugins_to_enable}
506 | | Append To List | ${plugins_to_enable} | nat_plugin.so
508 | Set up performance test suite with ACL
510 | | ... | Append acl_plugin.so to the list of enabled plugins.
512 | | Set Suite Variable | @{plugins_to_enable}
513 | | Append To List | ${plugins_to_enable} | acl_plugin.so
515 | Set up performance test suite with AVF driver
517 | | ... | Append avf_plugin.so to the list of enabled plugins.
519 | | Set Suite Variable | @{plugins_to_enable}
520 | | Append To List | ${plugins_to_enable} | avf_plugin.so
522 | Set up performance test suite with Static SRv6 proxy
524 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
526 | | Set Suite Variable | @{plugins_to_enable}
527 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
529 | Set up performance test suite with Dynamic SRv6 proxy
531 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
533 | | Set Suite Variable | @{plugins_to_enable}
534 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
536 | Set up performance test suite with Masquerading SRv6 proxy
538 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
540 | | Set Suite Variable | @{plugins_to_enable}
541 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
543 | Set up performance test suite with LACP mode link bonding
545 | | ... | Append lacp_plugin.so to the list of enabled plugins.
547 | | Set Suite Variable | @{plugins_to_enable}
548 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
550 | Set up 3-node performance topology with wrk and DUT's NIC model
552 | | ... | Suite preparation phase that sets the default startup configuration of
553 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
554 | | ... | variables used in test cases based on interface model provided as an
555 | | ... | argument. Installs the traffic generator.
557 | | ... | *Arguments:*
558 | | ... | - iface_model - Interface model. Type: string
562 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
563 | | ... | \| Intel-X520-DA2 \|
565 | | [Arguments] | ${iface_model}
567 | | Set variables in 3-node circular topology with DUT interface model
568 | | ... | ${iface_model}
569 | | Iface update numa node | ${tg}
570 # Make sure TRex is stopped
571 | | ${running}= | Is TRex running | ${tg}
572 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
573 | | ${curr_driver}= | Get PCI dev driver | ${tg}
574 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
575 | | Run keyword if | '${curr_driver}'!='${None}'
576 | | ... | PCI Driver Unbind | ${tg} |
577 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
578 # Bind tg_if1 to driver specified in the topology
579 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
580 | | PCI Driver Bind | ${tg}
581 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
583 | | ${intf_name}= | Get Linux interface name | ${tg}
584 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
585 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
586 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
587 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
588 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
589 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
590 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
591 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
592 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
593 | | Set Linux interface up | ${tg} | ${intf_name}
594 | | Install wrk | ${tg}
598 | Tear down 2-node performance topology
600 | | ... | Suite teardown phase with traffic generator teardown.
602 | | Teardown traffic generator | ${tg}
604 | Tear down 2-node performance topology with container
606 | | ... | Suite teardown phase with traffic generator teardown and container
609 | | Teardown traffic generator | ${tg}
610 | | :FOR | ${group} | IN | @{container_groups}
611 | | | Destroy all '${group}' containers
613 | Tear down 3-node performance topology
615 | | ... | Suite teardown phase with traffic generator teardown.
617 | | Teardown traffic generator | ${tg}
619 | Tear down 3-node performance topology with container
621 | | ... | Suite teardown phase with traffic generator teardown and container
624 | | Teardown traffic generator | ${tg}
625 | | :FOR | ${group} | IN | @{container_groups}
626 | | | Destroy all '${group}' containers
630 | Set up performance test
631 | | [Documentation] | Common test setup for performance tests.
633 | | Reset VAT History On All DUTs | ${nodes}
634 | | Create base startup configuration of VPP on all DUTs
636 | Set up tcp performance test
637 | | [Documentation] | Common test setup for TCP performance tests.
639 | | Reset VAT History On All DUTs | ${nodes}
640 | | Create base startup configuration of VPP for TCP tests on all DUTs
642 | Set up performance test with Ligato Kubernetes
643 | | [Documentation] | Common test setup for performance tests with Ligato \
644 | | ... | Kubernetes.
646 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
647 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
648 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
649 | | Apply Kubernetes resource on all duts | ${nodes}
650 | | ... | configmaps/vswitch-agent-cfg.yaml
651 | | Apply Kubernetes resource on all duts | ${nodes}
652 | | ... | configmaps/vnf-agent-cfg.yaml
653 | | Apply Kubernetes resource on all duts | ${nodes}
654 | | ... | pods/contiv-sfc-controller.yaml
655 | | Apply Kubernetes resource on all duts | ${nodes}
656 | | ... | pods/contiv-vswitch.yaml
660 | Tear down performance discovery test
661 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
664 | | ... | *Arguments:*
665 | | ... | - rate - Rate for sending packets. Type: string
666 | | ... | - framesize - L2 Frame Size [B]. Type: integer
667 | | ... | - topology_type - Topology type. Type: string
671 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
672 | | ... | \| 3-node-IPv4 \|
674 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
676 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
677 | | Show VAT History On All DUTs | ${nodes}
678 | | Run Keyword If Test Failed
679 | | ... | Set Test Variable | ${pkt_trace} | ${True}
680 | | Run Keyword If Test Failed
681 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
682 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
684 | Tear down performance mrr test
685 | | [Documentation] | Common test teardown for max-received-rate performance
688 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
689 | | Show VAT History On All DUTs | ${nodes}
691 | Tear down performance test with wrk
692 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
697 | | ... | \| Tear down performance test with wrk \|
699 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
700 | | Show VAT History On All DUTs | ${nodes}
701 | | Show statistics on all DUTs | ${nodes}
703 | Tear down performance test with vhost and VM with dpdk-testpmd
704 | | [Documentation] | Common test teardown for performance tests which use
705 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
707 | | ... | *Arguments:*
708 | | ... | - rate - Rate for sending packets. Type: string
709 | | ... | - framesize - L2 Frame Size [B]. Type: integer
710 | | ... | - topology_type - Topology type. Type: string
711 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
712 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
713 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
714 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
718 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
719 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
720 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
722 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
723 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
724 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
726 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
727 | | Show VAT History On All DUTs | ${nodes}
728 | | Show VPP vhost on all DUTs | ${nodes}
729 | | Show statistics on all DUTs | ${nodes}
730 | | Run Keyword If Test Failed
731 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
732 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
733 | | Run keyword unless | ${dut1_node}==${None}
734 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
735 | | Run keyword unless | ${dut2_node}==${None}
736 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
738 | Tear down mrr test with vhost and VM with dpdk-testpmd
739 | | [Documentation] | Common test teardown for mrr tests which use
740 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
742 | | ... | *Arguments:*
743 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
744 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
745 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
746 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
750 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
751 | | ... | \| ${node['DUT1']} \| ${dut_vm_refs} \
752 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
754 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
755 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
757 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
758 | | Show VAT History On All DUTs | ${nodes}
759 | | Show VPP vhost on all DUTs | ${nodes}
760 | | Show statistics on all DUTs | ${nodes}
761 | | Run keyword unless | ${dut1_node}==${None}
762 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
763 | | Run keyword unless | ${dut2_node}==${None}
764 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
766 | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
767 | | [Documentation] | Common test teardown for performance tests which use
768 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
770 | | ... | *Arguments:*
771 | | ... | - rate - Rate for sending packets. Type: string
772 | | ... | - framesize - L2 Frame Size [B]. Type: integer
773 | | ... | - topology_type - Topology type. Type: string
774 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
775 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
776 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
777 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
779 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
780 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
781 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
783 | | Tear down performance test with vhost and VM with dpdk-testpmd
784 | | ... | ${rate} | ${framesize} | ${topology_type}
785 | | ... | ${dut1_node} | ${dut1_vm_refs}
786 | | ... | ${dut2_node} | ${dut2_vm_refs}
787 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
788 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
789 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
791 | Tear down mrr test with vhost and VM with dpdk-testpmd and ACL
792 | | [Documentation] | Common test teardown for mrr tests which use
793 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
795 | | ... | *Arguments:*
796 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
797 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
798 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
799 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
801 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
802 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
804 | | Tear down mrr test with vhost and VM with dpdk-testpmd
805 | | ... | ${dut1_node} | ${dut1_vm_refs}
806 | | ... | ${dut2_node} | ${dut2_vm_refs}
807 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
808 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
809 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
811 | Tear down performance pdrchk test with vhost and VM with dpdk-testpmd
812 | | [Documentation] | Common test teardown for performance pdrchk tests which \
813 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
815 | | ... | *Arguments:*
816 | | ... | - rate - Rate for sending packets. Type: string
817 | | ... | - framesize - L2 Frame Size [B]. Type: integer
818 | | ... | - topology_type - Topology type. Type: string
819 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
820 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
821 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
822 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
826 | | ... | \| Tear down performance pdrchk test with vhost and VM with \
827 | | ... | dpdk-testpmd \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \
828 | | ... | \| ${dut_vm_refs} \| ${node['DUT2']} \| ${dut_vm_refs} \|
830 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
831 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
832 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
834 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
835 | | Show VAT History On All DUTs | ${nodes}
836 | | Show VPP vhost on all DUTs | ${nodes}
837 | | Show statistics on all DUTs | ${nodes}
838 | | Run keyword unless | ${dut1_node}==${None}
839 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
840 | | Run keyword unless | ${dut2_node}==${None}
841 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
843 | Tear down performance mrr test with vhost and VM with dpdk-testpmd
844 | | [Documentation] | Common test teardown for performance mrr tests which \
845 | | ... | use vhost(s) and VM(s) with dpdk-testpmd.
847 | | ... | *Arguments:*
848 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
849 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
850 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
851 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
855 | | ... | \| Tear down performance mrr test with vhost and VM with \
856 | | ... | dpdk-testpmd \| ${node['DUT1']} \| ${dut_vm_refs} \| ${node['DUT2']} \
857 | | ... | \| ${dut_vm_refs} \|
859 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
860 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
862 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
863 | | Show VAT History On All DUTs | ${nodes}
864 | | Show VPP vhost on all DUTs | ${nodes}
865 | | Run keyword unless | ${dut1_node}==${None}
866 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
867 | | Run keyword unless | ${dut2_node}==${None}
868 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
870 | Tear down DPDK 2-node performance topology
872 | | ... | Suite teardown phase with traffic generator teardown.
873 | | ... | Cleanup DPDK test environment.
875 | | Teardown traffic generator | ${tg}
876 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
878 | Tear down DPDK 3-node performance topology
880 | | ... | Suite teardown phase with traffic generator teardown.
881 | | ... | Cleanup DPDK test environment.
883 | | Teardown traffic generator | ${tg}
884 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
885 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
887 | Tear down performance discovery test with NAT
888 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
889 | | ... | tests with NAT feature used.
891 | | ... | *Arguments:*
892 | | ... | - rate - Rate for sending packets. Type: string
893 | | ... | - framesize - L2 Frame Size [B]. Type: integer
894 | | ... | - traffic_profile - Traffic profile. Type: string
898 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
899 | | ... | \| ${traffic_profile} \|
901 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
903 | | Tear down performance discovery test | ${rate} | ${framesize}
904 | | ... | ${traffic_profile}
905 | | Show NAT verbose | ${dut1}
906 | | Show NAT verbose | ${dut2}
908 | Tear down mrr test with NAT
909 | | [Documentation] | Common test teardown for mrr performance \
910 | | ... | tests with NAT feature used.
912 | | ... | \| Tear down mrr test with NAT \|
914 | | Tear down performance mrr test
915 | | Show NAT verbose | ${dut1}
916 | | Show NAT verbose | ${dut2}
918 | Tear down performance test with ACL
919 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
920 | | ... | tests with ACL feature used.
922 | | ... | *Arguments:*
923 | | ... | - rate - Rate for sending packets. Type: string
924 | | ... | - framesize - L2 Frame Size [B]. Type: integer
925 | | ... | - traffic_profile - Traffic profile. Type: string
929 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
930 | | ... | \| ${traffic_profile} \|
932 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
934 | | Tear down performance discovery test | ${rate} | ${framesize}
935 | | ... | ${traffic_profile}
936 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
937 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
938 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
940 | Tear down mrr test with ACL
941 | | [Documentation] | Common test teardown for mrr performance \
942 | | ... | tests with ACL feature used.
946 | | ... | \| Tear down mrr test with ACL \|
948 | | Tear down performance mrr test
949 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
950 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
951 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
953 | Tear down performance test with MACIP ACL
954 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
955 | | ... | tests with MACIP ACL feature used.
957 | | ... | *Arguments:*
958 | | ... | - rate - Rate for sending packets. Type: string
959 | | ... | - framesize - L2 Frame Size [B]. Type: integer
960 | | ... | - traffic_profile - Traffic profile. Type: string
964 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
965 | | ... | \| ${traffic_profile} \|
967 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
969 | | Tear down performance discovery test | ${rate} | ${framesize}
970 | | ... | ${traffic_profile}
971 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
972 | | ... | Vpp Log Macip Acl Settings | ${dut1}
973 | | Run Keyword And Ignore Error
974 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
976 | Tear down mrr test with MACIP ACL
977 | | [Documentation] | Common test teardown for mrr performance \
978 | | ... | tests with MACIP ACL feature used.
982 | | ... | \| Tear down mrr test with MACIP ACL \|
984 | | Tear down performance mrr test
985 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
986 | | ... | Vpp Log Macip Acl Settings | ${dut1}
987 | | Run Keyword And Ignore Error
988 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
990 | Tear down performance test with Ligato Kubernetes
991 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
992 | | ... | tests with Ligato Kubernetes.
994 | | Run Keyword If Test Failed
995 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
996 | | Run Keyword If Test Failed
997 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
998 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit
1000 | Tear down performance test with SRv6 with encapsulation
1001 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
1002 | | ... | tests with SRv6 with encapsulation feature used.
1004 | | ... | *Arguments:*
1005 | | ... | - rate - Rate for sending packets. Type: string
1006 | | ... | - framesize - L2 Frame Size [B]. Type: integer/string
1007 | | ... | - traffic_profile - Traffic profile. Type: string
1009 | | ... | *Example:*
1011 | | ... | \| Tear down performance test with SRv6 with encapsulation \
1012 | | ... | \| 100000pps \| 64 \| ${traffic_profile} \|
1014 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
1016 | | Tear down performance discovery test | ${rate} | ${framesize}
1017 | | ... | ${traffic_profile}
1018 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
1019 | | Run Keyword If Test Failed
1020 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
1021 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
1023 | Tear down mrr test with SRv6 with encapsulation
1024 | | [Documentation] | Common test teardown for mrr tests with SRv6 with \
1025 | | ... | encapsulation feature used.
1027 | | ... | *Example:*
1029 | | ... | \| Tear down mrr test with SRv6 with encapsulation \|
1031 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
1032 | | Show VAT History On All DUTs | ${nodes}
1033 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
1034 | | Run Keyword If Test Failed
1035 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
1036 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}