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 | ${vm_name}.Qemu Set Node | ${dut_node}
225 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
226 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
230 | | ... | Stop all qemu processes running on ${dut_node}.
231 | | ... | Argument is dictionary of all qemu nodes running with its names.
233 | | ... | *Arguments:*
234 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
235 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
239 | | ... | \| Tear down guest VM \| ${node['DUT1']} \
240 | | ... | \| ${dut_vm_refs} \|
242 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
243 | | ${vms_number}= | Get Length | ${dut_vm_refs}
244 | | ${index}= | Set Variable | ${0}
245 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
246 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
247 | | | ${index}= | Evaluate | ${index} + 1
248 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
249 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
250 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
254 | Set up 2-node performance topology with DUT's NIC model
256 | | ... | Suite preparation phase that sets the default startup configuration of
257 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
258 | | ... | variables used in test cases based on interface model provided as an
259 | | ... | argument. Initializes traffic generator.
261 | | ... | *Arguments:*
262 | | ... | - topology_type - Topology type. Type: string
263 | | ... | - nic_model - Interface model. Type: string
267 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
269 | | [Arguments] | ${topology_type} | ${nic_model}
271 | | Set variables in 2-node circular topology with DUT interface model
272 | | ... | ${nic_model}
273 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
274 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
276 | Set up 2-node-switched performance topology with DUT's NIC model
278 | | ... | Suite preparation phase that sets the default startup configuration of
279 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
280 | | ... | variables used in test cases based on interface model provided as an
281 | | ... | argument. Initializes traffic generator.
283 | | ... | *Arguments:*
284 | | ... | - topology_type - Topology type. Type: string
285 | | ... | - nic_model - Interface model. Type: string
286 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
287 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
291 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
292 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
294 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
295 | | ... | ${tg_if2_dest_mac}
297 | | Set variables in 2-node circular topology with DUT interface model
298 | | ... | ${nic_model}
299 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
300 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
301 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
303 | Set up 3-node performance topology with DUT's NIC model
305 | | ... | Suite preparation phase that sets the default startup configuration of
306 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
307 | | ... | variables used in test cases based on interface model provided as an
308 | | ... | argument. Initializes traffic generator.
310 | | ... | *Arguments:*
311 | | ... | - topology_type - Topology type. Type: string
312 | | ... | - nic_model - Interface model. Type: string
316 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
317 | | ... | \| Intel-X520-DA2 \|
319 | | [Arguments] | ${topology_type} | ${nic_model}
321 | | Set variables in 3-node circular topology with DUT interface model
322 | | ... | ${nic_model}
323 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
324 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
326 | Set up 3-node performance topology with DUT's NIC model with double link between DUTs
328 | | ... | Suite preparation phase that sets the default startup configuration of
329 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
330 | | ... | variables used in test cases based on interface model provided as an
331 | | ... | argument. Initializes traffic generator.
333 | | ... | *Arguments:*
334 | | ... | - topology_type - Topology type. Type: string
335 | | ... | - nic_model - Interface model. Type: string
339 | | ... | \| Set up 3-node performance topology with DUT's NIC model with \
340 | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
342 | | [Arguments] | ${topology_type} | ${nic_model}
344 | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
345 | | ... | ${nic_model}
346 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
347 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
349 | Set up DPDK 2-node performance topology with DUT's NIC model
351 | | ... | Updates interfaces on all nodes and sets the global
352 | | ... | variables used in test cases based on interface model provided as an
353 | | ... | argument. Initializes traffic generator. Initializes DPDK test
354 | | ... | environment.
356 | | ... | *Arguments:*
357 | | ... | - topology_type - Topology type. Type: string
358 | | ... | - nic_model - Interface model. Type: string
362 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
363 | | ... | \| L2 \| Intel-X520-DA2 \|
365 | | [Arguments] | ${topology_type} | ${nic_model}
367 | | Set variables in 2-node circular topology with DUT interface model
368 | | ... | ${nic_model}
369 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
370 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
371 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
373 | Set up DPDK 3-node performance topology with DUT's NIC model
375 | | ... | Updates interfaces on all nodes and sets the global
376 | | ... | variables used in test cases based on interface model provided as an
377 | | ... | argument. Initializes traffic generator. Initializes DPDK test
378 | | ... | environment.
380 | | ... | *Arguments:*
381 | | ... | - topology_type - Topology type. Type: string
382 | | ... | - nic_model - Interface model. Type: string
386 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
388 | | [Arguments] | ${topology_type} | ${nic_model}
390 | | Set variables in 3-node circular topology with DUT interface model
391 | | ... | ${nic_model}
392 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
393 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
394 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
395 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
397 | Set up SRIOV 2-node performance topology with DUT's NIC model
399 | | ... | Suite preparation phase that sets default startup configuration of
400 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
401 | | ... | variables used in test cases based on interface model provided as an
402 | | ... | argument. Initializes traffic generator.
403 | | ... | It configures PCI device with VFs on all DUTs.
405 | | ... | *Arguments:*
406 | | ... | - topology_type - Topology type. Type: string
407 | | ... | - nic_model - Interface model. Type: string
408 | | ... | - vf_driver - Virtual function driver. Type: string
409 | | ... | - numvfs - Number of VFs. Type: integer
413 | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
414 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
416 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
417 | | ... | ${numvfs}=${1}
419 | | Set variables in 2-node circular topology with DUT interface model
420 | | ... | ${nic_model}
421 | | Run Keyword If | '${vf_driver}' == 'AVF'
422 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
423 | | ... | topology_type=${topology_type}
424 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
425 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
426 | | ... | ${topology_type}
428 | Set up SRIOV 3-node performance topology with DUT's NIC model
430 | | ... | Suite preparation phase that sets default startup configuration of
431 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
432 | | ... | variables used in test cases based on interface model provided as an
433 | | ... | argument. Initializes traffic generator.
434 | | ... | It configures PCI device with VFs on all DUTs.
436 | | ... | *Arguments:*
437 | | ... | - topology_type - Topology type. Type: string
438 | | ... | - nic_model - Interface model. Type: string
439 | | ... | - vf_driver - Virtual function driver. Type: string
440 | | ... | - numvfs - Number of VFs. Type: integer
444 | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
445 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
447 | | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
448 | | ... | ${numvfs}=${1}
450 | | Set variables in 3-node circular topology with DUT interface model
451 | | ... | ${nic_model}
452 | | Run Keyword If | '${vf_driver}' == 'AVF'
453 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
454 | | ... | topology_type=${topology_type}
455 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
456 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
457 | | ... | ${topology_type}
459 | Set up IPSec performance test suite
461 | | ... | Suite preparation phase that sets default startup configuration of
462 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
463 | | ... | variables used in test cases based on interface model provided as an
464 | | ... | argument. Initializes traffic generator.
465 | | ... | Then it configures crypto device and kernel module on all DUTs.
467 | | ... | *Arguments:*
468 | | ... | - topology_type - Topology type. Type: string
469 | | ... | - nic_model - Interface model. Type: string
470 | | ... | - crypto_type - Crypto device type - HW_cryptodev or SW_cryptodev
471 | | ... | (Optional). Type: string, default value: HW_cryptodev
475 | | ... | \| Set up IPSec performance test suite \| L2 \
476 | | ... | \| Intel-X520-DA2 \|
478 | | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_cryptodev
480 | | Set up 3-node performance topology with DUT's NIC model
481 | | ... | ${topology_type} | ${nic_model}
482 | | ${numvfs}= | Set Variable If
483 | | ... | '${crypto_type}' == 'HW_cryptodev' | ${32}
484 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
485 | | ... | Configure crypto device on all DUTs | force_init=${True}
486 | | ... | numvfs=${numvfs}
487 | | Run Keyword If | '${crypto_type}' == 'HW_cryptodev'
488 | | ... | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
490 | Set up performance test suite with MEMIF
492 | | ... | Append memif_plugin.so to the list of enabled plugins.
494 | | Set Suite Variable | @{plugins_to_enable}
495 | | Append To List | ${plugins_to_enable} | memif_plugin.so
497 | Set up performance test suite with NAT
499 | | ... | Append nat_plugin.so to the list of enabled plugins.
501 | | Set Suite Variable | @{plugins_to_enable}
502 | | Append To List | ${plugins_to_enable} | nat_plugin.so
504 | Set up performance test suite with ACL
506 | | ... | Append acl_plugin.so to the list of enabled plugins.
508 | | Set Suite Variable | @{plugins_to_enable}
509 | | Append To List | ${plugins_to_enable} | acl_plugin.so
511 | Set up performance test suite with AVF driver
513 | | ... | Append avf_plugin.so to the list of enabled plugins.
515 | | Set Suite Variable | @{plugins_to_enable}
516 | | Append To List | ${plugins_to_enable} | avf_plugin.so
518 | Set up performance test suite with Static SRv6 proxy
520 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
522 | | Set Suite Variable | @{plugins_to_enable}
523 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
525 | Set up performance test suite with Dynamic SRv6 proxy
527 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
529 | | Set Suite Variable | @{plugins_to_enable}
530 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
532 | Set up performance test suite with Masquerading SRv6 proxy
534 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
536 | | Set Suite Variable | @{plugins_to_enable}
537 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
539 | Set up performance test suite with LACP mode link bonding
541 | | ... | Append lacp_plugin.so to the list of enabled plugins.
543 | | Set Suite Variable | @{plugins_to_enable}
544 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
546 | Set up 3-node performance topology with wrk and DUT's NIC model
548 | | ... | Suite preparation phase that sets the default startup configuration of
549 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
550 | | ... | variables used in test cases based on interface model provided as an
551 | | ... | argument. Installs the traffic generator.
553 | | ... | *Arguments:*
554 | | ... | - iface_model - Interface model. Type: string
558 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
559 | | ... | \| Intel-X520-DA2 \|
561 | | [Arguments] | ${iface_model}
563 | | Set variables in 3-node circular topology with DUT interface model
564 | | ... | ${iface_model}
565 | | Iface update numa node | ${tg}
566 # Make sure TRex is stopped
567 | | ${running}= | Is TRex running | ${tg}
568 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
569 | | ${curr_driver}= | Get PCI dev driver | ${tg}
570 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
571 | | Run keyword if | '${curr_driver}'!='${None}'
572 | | ... | PCI Driver Unbind | ${tg} |
573 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
574 # Bind tg_if1 to driver specified in the topology
575 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
576 | | PCI Driver Bind | ${tg}
577 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
579 | | ${intf_name}= | Get Linux interface name | ${tg}
580 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
581 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
582 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
583 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
584 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
585 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
586 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
587 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
588 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
589 | | Set Linux interface up | ${tg} | ${intf_name}
590 | | Install wrk | ${tg}
594 | Tear down 2-node performance topology
596 | | ... | Suite teardown phase with traffic generator teardown.
598 | | Teardown traffic generator | ${tg}
600 | Tear down 3-node performance topology
602 | | ... | Suite teardown phase with traffic generator teardown.
604 | | Teardown traffic generator | ${tg}
608 | Set up performance test
609 | | [Documentation] | Common test setup for performance tests.
611 | | Reset PAPI History On All DUTs | ${nodes}
612 | | Create base startup configuration of VPP on all DUTs
614 | Set up tcp performance test
615 | | [Documentation] | Common test setup for TCP performance tests.
617 | | Reset PAPI History On All DUTs | ${nodes}
618 | | Create base startup configuration of VPP for TCP tests on all DUTs
620 | Set up performance test with Ligato Kubernetes
621 | | [Documentation] | Common test setup for performance tests with Ligato \
622 | | ... | Kubernetes.
624 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
625 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
626 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
627 | | Apply Kubernetes resource on all duts | ${nodes}
628 | | ... | configmaps/vswitch-agent-cfg.yaml
629 | | Apply Kubernetes resource on all duts | ${nodes}
630 | | ... | configmaps/vnf-agent-cfg.yaml
631 | | Apply Kubernetes resource on all duts | ${nodes}
632 | | ... | pods/contiv-sfc-controller.yaml
633 | | Apply Kubernetes resource on all duts | ${nodes}
634 | | ... | pods/contiv-vswitch.yaml
636 | Set up performance test with containers
638 | | ... | Common test setup for performance tests with containers
640 | | ... | *Arguments:*
641 | | ... | - chains: Total number of chains. Type: integer
642 | | ... | - nodeness: Total number of nodes per chain. Type: integer
643 | | ... | - auto_scale - If True, use same amount of Dataplane threads for
644 | | ... | network function as DUT, otherwise use single physical core for
645 | | ... | every network function. Type: boolean
649 | | ... | \| Set up performance test with containers \| 1 \| 1 \|
651 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
653 | | Set Test Variable | @{container_groups} | @{EMPTY}
654 | | Set Test Variable | ${container_group} | CNF
655 | | Set Test Variable | ${nf_nodes}
656 | | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
657 | | ... | engine=${container_engine} | WITH NAME | ${container_group}
658 | | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
659 | | ... | auto_scale=${auto_scale}
660 | | Acquire all '${container_group}' containers
661 | | Create all '${container_group}' containers
662 | | Configure VPP in all '${container_group}' containers
663 | | Stop VPP service on all DUTs | ${nodes}
664 | | Start VPP in all '${container_group}' containers
665 | | Start VPP service on all DUTs | ${nodes}
666 | | Append To List | ${container_groups} | ${container_group}
670 | Tear down performance test
671 | | [Documentation] | Common test teardown for performance tests.
673 | | Remove All Added Ports On All DUTs From Topology | ${nodes}
674 | | Show PAPI History On All DUTs | ${nodes}
675 | | Get Core Files on All Nodes | ${nodes}
676 | | Set Test Variable | ${pkt_trace} | ${True}
678 | Tear down performance discovery test
679 | | [Documentation] | Common test teardown for ndrpdr performance tests.
681 | | ... | *Arguments:*
682 | | ... | - rate - Rate for sending packets. Type: string
683 | | ... | - framesize - L2 Frame Size [B]. Type: integer
684 | | ... | - topology_type - Topology type. Type: string
688 | | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
689 | | ... | \| 3-node-IPv4 \|
691 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
693 | | Tear down performance test
694 | | Show statistics on all DUTs | ${nodes}
695 | | Run Keyword If Test Failed
696 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
697 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
699 | Tear down performance mrr test
700 | | [Documentation] | Common test teardown for max-received-rate performance
703 | | Tear down performance test
705 | Tear down performance test with wrk
706 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
711 | | ... | \| Tear down performance test with wrk \|
713 | | Tear down performance test
715 | Tear down performance test with container
717 | | ... | Common test teardown for performance tests which uses containers.
719 | | :FOR | ${container_group} | IN | @{container_groups}
720 | | | Destroy all '${container_group}' containers
722 | Tear down performance test with vhost and VM with dpdk-testpmd
723 | | [Documentation] | Common test teardown for performance tests which use
724 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
726 | | ... | *Arguments:*
727 | | ... | - rate - Rate for sending packets. Type: string
728 | | ... | - framesize - L2 Frame Size [B]. Type: integer
729 | | ... | - topology_type - Topology type. Type: string
730 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
731 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
732 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
733 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
737 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
738 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
739 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
741 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
742 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
743 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
745 | | Tear down performance discovery test | ${rate} | ${framesize}
746 | | ... | ${topology_type}
747 | | Show VPP vhost on all DUTs | ${nodes}
748 | | Run keyword unless | ${dut1_node}==${None}
749 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
750 | | Run keyword unless | ${dut2_node}==${None}
751 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
753 | Tear down performance mrr test with vhost and VM with dpdk-testpmd
754 | | [Documentation] | Common test teardown for mrr tests which use
755 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
757 | | ... | *Arguments:*
758 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
759 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
760 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
761 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
765 | | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
766 | | ... | \| ${node['DUT1']} \| ${dut_vm_refs} \
767 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
769 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
770 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
772 | | Tear down performance mrr test
773 | | Show VPP vhost on all DUTs | ${nodes}
774 | | Run keyword unless | ${dut1_node}==${None}
775 | | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
776 | | Run keyword unless | ${dut2_node}==${None}
777 | | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
779 | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
780 | | [Documentation] | Common test teardown for performance tests which use
781 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
783 | | ... | *Arguments:*
784 | | ... | - rate - Rate for sending packets. Type: string
785 | | ... | - framesize - L2 Frame Size [B]. Type: integer
786 | | ... | - topology_type - Topology type. Type: string
787 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
788 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
789 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
790 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
792 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
793 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
794 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
796 | | Tear down performance test with vhost and VM with dpdk-testpmd
797 | | ... | ${rate} | ${framesize} | ${topology_type}
798 | | ... | ${dut1_node} | ${dut1_vm_refs}
799 | | ... | ${dut2_node} | ${dut2_vm_refs}
800 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
801 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
802 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
804 | Tear down mrr test with vhost and VM with dpdk-testpmd and ACL
805 | | [Documentation] | Common test teardown for mrr tests which use
806 | | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
808 | | ... | *Arguments:*
809 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
810 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
811 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
812 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
814 | | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
815 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
817 | | Tear down performance mrr test with vhost and VM with dpdk-testpmd
818 | | ... | ${dut1_node} | ${dut1_vm_refs}
819 | | ... | ${dut2_node} | ${dut2_vm_refs}
820 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
821 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
822 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
824 | Tear down DPDK 2-node performance topology
826 | | ... | Suite teardown phase with traffic generator teardown.
827 | | ... | Cleanup DPDK test environment.
829 | | Teardown traffic generator | ${tg}
830 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
832 | Tear down DPDK 3-node performance topology
834 | | ... | Suite teardown phase with traffic generator teardown.
835 | | ... | Cleanup DPDK test environment.
837 | | Teardown traffic generator | ${tg}
838 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
839 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
841 | Tear down performance discovery test with NAT
842 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
843 | | ... | tests with NAT feature used.
845 | | ... | *Arguments:*
846 | | ... | - rate - Rate for sending packets. Type: string
847 | | ... | - framesize - L2 Frame Size [B]. Type: integer
848 | | ... | - traffic_profile - Traffic profile. Type: string
852 | | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
853 | | ... | \| ${traffic_profile} \|
855 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
857 | | Tear down performance discovery test | ${rate} | ${framesize}
858 | | ... | ${traffic_profile}
859 | | Show NAT verbose | ${dut1}
860 | | Show NAT verbose | ${dut2}
862 | Tear down mrr test with NAT
863 | | [Documentation] | Common test teardown for mrr performance \
864 | | ... | tests with NAT feature used.
866 | | ... | \| Tear down mrr test with NAT \|
868 | | Tear down performance mrr test
869 | | Show NAT verbose | ${dut1}
870 | | Show NAT verbose | ${dut2}
872 | Tear down performance test with ACL
873 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
874 | | ... | tests with ACL feature used.
876 | | ... | *Arguments:*
877 | | ... | - rate - Rate for sending packets. Type: string
878 | | ... | - framesize - L2 Frame Size [B]. Type: integer
879 | | ... | - traffic_profile - Traffic profile. Type: string
883 | | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
884 | | ... | \| ${traffic_profile} \|
886 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
888 | | Tear down performance discovery test | ${rate} | ${framesize}
889 | | ... | ${traffic_profile}
890 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
891 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
892 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
894 | Tear down mrr test with ACL
895 | | [Documentation] | Common test teardown for mrr performance \
896 | | ... | tests with ACL feature used.
900 | | ... | \| Tear down mrr test with ACL \|
902 | | Tear down performance mrr test
903 | | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
904 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
905 | | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
907 | Tear down performance test with MACIP ACL
908 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
909 | | ... | tests with MACIP ACL feature used.
911 | | ... | *Arguments:*
912 | | ... | - rate - Rate for sending packets. Type: string
913 | | ... | - framesize - L2 Frame Size [B]. Type: integer
914 | | ... | - traffic_profile - Traffic profile. Type: string
918 | | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
919 | | ... | \| ${traffic_profile} \|
921 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
923 | | Tear down performance discovery test | ${rate} | ${framesize}
924 | | ... | ${traffic_profile}
925 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
926 | | ... | Vpp Log Macip Acl Settings | ${dut1}
927 | | Run Keyword And Ignore Error
928 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
930 | Tear down mrr test with MACIP ACL
931 | | [Documentation] | Common test teardown for mrr performance \
932 | | ... | tests with MACIP ACL feature used.
936 | | ... | \| Tear down mrr test with MACIP ACL \|
938 | | Tear down performance mrr test
939 | | Run Keyword If Test Failed | Run Keyword And Ignore Error
940 | | ... | Vpp Log Macip Acl Settings | ${dut1}
941 | | Run Keyword And Ignore Error
942 | | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
944 | Tear down performance test with Ligato Kubernetes
945 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
946 | | ... | tests with Ligato Kubernetes.
948 | | Run Keyword If Test Failed
949 | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
950 | | Run Keyword If Test Failed
951 | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit
952 | | Delete Kubernetes resource on all DUTs | ${nodes} | csit
954 | Tear down performance test with SRv6 with encapsulation
955 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
956 | | ... | tests with SRv6 with encapsulation feature used.
958 | | ... | *Arguments:*
959 | | ... | - rate - Rate for sending packets. Type: string
960 | | ... | - framesize - L2 Frame Size [B]. Type: integer/string
961 | | ... | - traffic_profile - Traffic profile. Type: string
965 | | ... | \| Tear down performance test with SRv6 with encapsulation \
966 | | ... | \| 100000pps \| 64 \| ${traffic_profile} \|
968 | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
970 | | Tear down performance discovery test | ${rate} | ${framesize}
971 | | ... | ${traffic_profile}
972 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
973 | | Run Keyword If Test Failed
974 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
975 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
977 | Tear down mrr test with SRv6 with encapsulation
978 | | [Documentation] | Common test teardown for mrr tests with SRv6 with \
979 | | ... | encapsulation feature used.
983 | | ... | \| Tear down mrr test with SRv6 with encapsulation \|
985 | | Tear down performance mrr test
986 | | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
987 | | Run Keyword If Test Failed
988 | | ... | Show SR Steering Policies on all DUTs | ${nodes}
989 | | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}