3e27c18d6a726de7e8e4433146051edc5e72f494
[csit.git] / resources / libraries / robot / performance / performance_setup.robot
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.DUTSetup
16 | Library | resources.tools.wrk.wrk
17 | Resource | resources/libraries/robot/performance/performance_configuration.robot
18 | Resource | resources/libraries/robot/performance/performance_limits.robot
19 | Resource | resources/libraries/robot/performance/performance_utils.robot
20 | Resource | resources/libraries/robot/tcp/tcp_setup.robot
21 | Documentation | Performance suite keywords - Suite and test setups and
22 | ... | teardowns.
23
24 *** Keywords ***
25
26 # Keywords used in setups and teardowns
27
28 | Set variables in 2-node circular topology with DUT interface model
29 | | [Documentation]
30 | | ... | Compute path for testing on two given nodes in circular topology
31 | | ... | based on interface model provided as an argument and set
32 | | ... | corresponding suite variables.
33 | | ...
34 | | ... | *Arguments:*
35 | | ... | - iface_model - Interface model. Type: string
36 | | ...
37 | | ... | _NOTE:_ This KW sets following suite variables:
38 | | ... | - tg - TG node
39 | | ... | - tg_if1 - 1st TG interface towards DUT.
40 | | ... | - tg_if1 - 1st TG interface MAC address.
41 | | ... | - tg_if2 - 2nd TG interface towards DUT.
42 | | ... | - tg_if2 - 2nd TG interface MAC address.
43 | | ... | - dut1 - DUT1 node
44 | | ... | - dut1_if1 - 1st DUT interface towards TG.
45 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
46 | | ...
47 | | ... | *Example:*
48 | | ...
49 | | ... | \| Set variables in 2-node circular topology with DUT interface model\
50 | | ... | \| Intel-X520-DA2 \|
51 | | ...
52 | | [Arguments] | ${iface_model}
53 | | ...
54 | | ${iface_model_list}= | Create list | ${iface_model}
55 | | Append Node | ${nodes['TG']}
56 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
57 | | Append Node | ${nodes['TG']}
58 | | Compute Path | always_same_link=${FALSE}
59 | | ${tg_if1} | ${tg}= | First Interface
60 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
61 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
62 | | ${tg_if2} | ${tg}= | Last Interface
63 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
64 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
65 | | Set Suite Variable | ${tg}
66 | | Set Suite Variable | ${tg_if1}
67 | | Set Suite Variable | ${tg_if1_mac}
68 | | Set Suite Variable | ${tg_if2}
69 | | Set Suite Variable | ${tg_if2_mac}
70 | | Set Suite Variable | ${dut1}
71 | | Set Suite Variable | ${dut1_if1}
72 | | Set Suite Variable | ${dut1_if2}
73
74 | Set variables in 3-node circular topology with DUT interface model
75 | | [Documentation]
76 | | ... | Compute path for testing on three given nodes in circular topology
77 | | ... | based on interface model provided as an argument and set
78 | | ... | corresponding suite variables.
79 | | ...
80 | | ... | *Arguments:*
81 | | ... | - iface_model - Interface model. Type: string
82 | | ...
83 | | ... | _NOTE:_ This KW sets following suite variables:
84 | | ... | - tg - TG node
85 | | ... | - tg_if1 - 1st TG interface towards DUT.
86 | | ... | - tg_if1 - 1st TG interface MAC address.
87 | | ... | - tg_if2 - 2nd TG interface towards DUT.
88 | | ... | - tg_if2 - 2nd TG interface MAC address.
89 | | ... | - dut1 - DUT1 node
90 | | ... | - dut1_if1 - DUT1 interface towards TG.
91 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
92 | | ... | - dut2 - DUT2 node
93 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
94 | | ... | - dut2_if2 - DUT2 interface towards TG.
95 | | ...
96 | | ... | *Example:*
97 | | ...
98 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
99 | | ... | \| Intel-X520-DA2 \|
100 | | ...
101 | | [Arguments] | ${iface_model}
102 | | ...
103 | | ${iface_model_list}= | Create list | ${iface_model}
104 | | Append Node | ${nodes['TG']}
105 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
106 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
107 | | Append Node | ${nodes['TG']}
108 | | Compute Path
109 | | ${tg_if1} | ${tg}= | Next Interface
110 | | ${dut1_if1} | ${dut1}= | Next Interface
111 | | ${dut1_if2} | ${dut1}= | Next Interface
112 | | ${dut2_if1} | ${dut2}= | Next Interface
113 | | ${dut2_if2} | ${dut2}= | Next Interface
114 | | ${tg_if2} | ${tg}= | Next Interface
115 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
116 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
117 | | Set Suite Variable | ${tg}
118 | | Set Suite Variable | ${tg_if1}
119 | | Set Suite Variable | ${tg_if1_mac}
120 | | Set Suite Variable | ${tg_if2}
121 | | Set Suite Variable | ${tg_if2_mac}
122 | | Set Suite Variable | ${dut1}
123 | | Set Suite Variable | ${dut1_if1}
124 | | Set Suite Variable | ${dut1_if2}
125 | | Set Suite Variable | ${dut2}
126 | | Set Suite Variable | ${dut2_if1}
127 | | Set Suite Variable | ${dut2_if2}
128
129 | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
130 | | [Documentation]
131 | | ... | Compute path for testing on three given nodes in circular topology
132 | | ... | with double link between DUTs based on interface model provided as an
133 | | ... | argument and set corresponding suite variables.
134 | | ...
135 | | ... | *Arguments:*
136 | | ... | - iface_model - Interface model. Type: string
137 | | ...
138 | | ... | _NOTE:_ This KW sets following suite variables:
139 | | ... | - tg - TG node
140 | | ... | - tg_if1 - 1st TG interface towards DUT.
141 | | ... | - tg_if1 - 1st TG interface MAC address.
142 | | ... | - tg_if2 - 2nd TG interface towards DUT.
143 | | ... | - tg_if2 - 2nd TG interface MAC address.
144 | | ... | - dut1 - DUT1 node
145 | | ... | - dut1_if1 - DUT1 interface towards TG.
146 | | ... | - dut1_if2_1 - DUT1 interface 1 towards DUT2.
147 | | ... | - dut1_if2_2 - DUT1 interface 2 towards DUT2.
148 | | ... | - dut2 - DUT2 node
149 | | ... | - dut2_if1_1 - DUT2 interface 1 towards DUT1.
150 | | ... | - dut2_if1_2 - DUT2 interface 2 towards DUT1.
151 | | ... | - dut2_if2 - DUT2 interface towards TG.
152 | | ...
153 | | ... | *Example:*
154 | | ...
155 | | ... | \| Set variables in 3-node circular topology with DUT interface model\
156 | | ... | with double link between DUTs \| Intel-X520-DA2 \|
157 | | ...
158 | | [Arguments] | ${iface_model}
159 | | ...
160 | | ${iface_model_list}= | Create list | ${iface_model}
161 | | # Compute path TG - DUT1 with single link in between
162 | | Append Node | ${nodes['TG']}
163 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
164 | | Append Node | ${nodes['TG']}
165 | | Compute Path
166 | | ${tg_if1} | ${tg}= | Next Interface
167 | | ${dut1_if1} | ${dut1}= | Next Interface
168 | | # Compute path TG - DUT2 with single link in between
169 | | Clear Path
170 | | Append Node | ${nodes['TG']}
171 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
172 | | Append Node | ${nodes['TG']}
173 | | Compute Path
174 | | ${tg_if2} | ${tg}= | Next Interface
175 | | ${dut2_if2} | ${dut2}= | Next Interface
176 | | # Compute path DUT1 - DUT2 with double link in between
177 | | Clear Path
178 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
179 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
180 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
181 | | Compute Path | always_same_link=${FALSE}
182 | | ${dut1_if2_1} | ${dut1}= | First Interface
183 | | ${dut1_if2_2} | ${dut1}= | Last Interface
184 | | ${dut2_if1_1} | ${dut2}= | First Ingress Interface
185 | | ${dut2_if1_2} | ${dut2}= | Last Egress Interface
186 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
187 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
188 | | # Set suite variables
189 | | Set Suite Variable | ${tg}
190 | | Set Suite Variable | ${tg_if1}
191 | | Set Suite Variable | ${tg_if1_mac}
192 | | Set Suite Variable | ${tg_if2}
193 | | Set Suite Variable | ${tg_if2_mac}
194 | | Set Suite Variable | ${dut1}
195 | | Set Suite Variable | ${dut1_if1}
196 | | Set Suite Variable | ${dut1_if2_1}
197 | | Set Suite Variable | ${dut1_if2_2}
198 | | Set Suite Variable | ${dut2}
199 | | Set Suite Variable | ${dut2_if1_1}
200 | | Set Suite Variable | ${dut2_if1_2}
201 | | Set Suite Variable | ${dut2_if2}
202
203 # Suite setups
204
205 | Set up 2-node performance topology with DUT's NIC model
206 | | [Documentation]
207 | | ... | Suite preparation phase that sets the default startup configuration of
208 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
209 | | ... | variables used in test cases based on interface model provided as an
210 | | ... | argument. Initializes traffic generator.
211 | | ...
212 | | ... | *Arguments:*
213 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
214 | | ... | - nic_name - Interface model. Type: string
215 | | ...
216 | | ... | *Example:*
217 | | ...
218 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
219 | | ...
220 | | [Arguments] | ${osi_layer} | ${nic_name}
221 | | ...
222 | | Set variables in 2-node circular topology with DUT interface model
223 | | ... | ${nic_name}
224 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
225 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
226
227 | Set up 2-node-switched performance topology with DUT's NIC model
228 | | [Documentation]
229 | | ... | Suite preparation phase that sets the default startup configuration of
230 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
231 | | ... | variables used in test cases based on interface model provided as an
232 | | ... | argument. Initializes traffic generator.
233 | | ...
234 | | ... | *Arguments:*
235 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
236 | | ... | - nic_name - Interface model. Type: string
237 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
238 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
239 | | ...
240 | | ... | *Example:*
241 | | ...
242 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
243 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
244 | | ...
245 | | [Arguments] | ${osi_layer} | ${nic_name} | ${tg_if1_dest_mac}
246 | | ... | ${tg_if2_dest_mac}
247 | | ...
248 | | Set variables in 2-node circular topology with DUT interface model
249 | | ... | ${nic_name}
250 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
251 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
252 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
253
254 | Set up 3-node performance topology with DUT's NIC model
255 | | [Documentation]
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.
260 | | ...
261 | | ... | *Arguments:*
262 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
263 | | ... | - nic_name - Interface model. Type: string
264 | | ...
265 | | ... | *Example:*
266 | | ...
267 | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
268 | | ... | \| Intel-X520-DA2 \|
269 | | ...
270 | | [Arguments] | ${osi_layer} | ${nic_name}
271 | | ...
272 | | Set variables in 3-node circular topology with DUT interface model
273 | | ... | ${nic_name}
274 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
275 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
276
277 | Set up 3-node performance topology with DUT's NIC model with double link between DUTs
278 | | [Documentation]
279 | | ... | Suite preparation phase that sets the default startup configuration of
280 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
281 | | ... | variables used in test cases based on interface model provided as an
282 | | ... | argument. Initializes traffic generator.
283 | | ...
284 | | ... | *Arguments:*
285 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
286 | | ... | - nic_name - Interface model. Type: string
287 | | ...
288 | | ... | *Example:*
289 | | ...
290 | | ... | \| Set up 3-node performance topology with DUT's NIC model with \
291 | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
292 | | ...
293 | | [Arguments] | ${osi_layer} | ${nic_name}
294 | | ...
295 | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
296 | | ... | ${nic_name}
297 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
298 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
299
300 | Set up DPDK 2-node performance topology with DUT's NIC model
301 | | [Documentation]
302 | | ... | 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. Initializes DPDK test
305 | | ... | environment.
306 | | ...
307 | | ... | *Arguments:*
308 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
309 | | ... | - nic_name - Interface model. Type: string
310 | | ...
311 | | ... | *Example:*
312 | | ...
313 | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
314 | | ... | \| L2 \| Intel-X520-DA2 \|
315 | | ...
316 | | [Arguments] | ${osi_layer} | ${nic_name}
317 | | ...
318 | | Set variables in 2-node circular topology with DUT interface model
319 | | ... | ${nic_name}
320 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
321 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer}
322 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
323
324 | Set up DPDK 3-node performance topology with DUT's NIC model
325 | | [Documentation]
326 | | ... | Updates interfaces on all nodes and sets the global
327 | | ... | variables used in test cases based on interface model provided as an
328 | | ... | argument. Initializes traffic generator. Initializes DPDK test
329 | | ... | environment.
330 | | ...
331 | | ... | *Arguments:*
332 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
333 | | ... | - nic_name - Interface model. Type: string
334 | | ...
335 | | ... | *Example:*
336 | | ...
337 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
338 | | ...
339 | | [Arguments] | ${osi_layer} | ${nic_name}
340 | | ...
341 | | Set variables in 3-node circular topology with DUT interface model
342 | | ... | ${nic_name}
343 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
344 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer}
345 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
346 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
347
348 | Set up SRIOV 2-node performance topology with DUT's NIC model
349 | | [Documentation]
350 | | ... | Suite preparation phase that sets default startup configuration of
351 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
352 | | ... | variables used in test cases based on interface model provided as an
353 | | ... | argument. Initializes traffic generator.
354 | | ... | It configures PCI device with VFs on all DUTs.
355 | | ...
356 | | ... | *Arguments:*
357 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
358 | | ... | - nic_name - Interface model. Type: string
359 | | ... | - vf_driver - Virtual function driver. Type: string
360 | | ... | - numvfs - Number of VFs. Type: integer
361 | | ...
362 | | ... | *Example:*
363 | | ...
364 | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
365 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
366 | | ...
367 | | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver}
368 | | ... | ${numvfs}=${1}
369 | | ...
370 | | Set variables in 2-node circular topology with DUT interface model
371 | | ... | ${nic_name}
372 | | Run Keyword If | '${vf_driver}' == 'AVF'
373 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
374 | | ... | osi_layer=${osi_layer}
375 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
376 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
377 | | ... | ${osi_layer}
378
379 | Set up SRIOV 3-node performance topology with DUT's NIC model
380 | | [Documentation]
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.
386 | | ...
387 | | ... | *Arguments:*
388 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
389 | | ... | - nic_name - Interface model. Type: string
390 | | ... | - vf_driver - Virtual function driver. Type: string
391 | | ... | - numvfs - Number of VFs. Type: integer
392 | | ...
393 | | ... | *Example:*
394 | | ...
395 | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
396 | | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
397 | | ...
398 | | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver}
399 | | ... | ${numvfs}=${1}
400 | | ...
401 | | Set variables in 3-node circular topology with DUT interface model
402 | | ... | ${nic_name}
403 | | Run Keyword If | '${vf_driver}' == 'AVF'
404 | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
405 | | ... | osi_layer=${osi_layer}
406 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
407 | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
408 | | ... | ${osi_layer}
409
410 | Set up IPSec performance test suite
411 | | [Documentation]
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 | | ... | Then it configures crypto device and kernel module on all DUTs.
417 | | ...
418 | | ... | TODO CSIT-1481: Crypto HW should be read from topology file instead.
419 | | ...
420 | | ... | *Arguments:*
421 | | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string
422 | | ... | - nic_name - Interface model. Type: string
423 | | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx or
424 | | ... |   SW_cryptodev. Type: string, default value: HW_DH895xcc
425 | | ...
426 | | ... | *Example:*
427 | | ...
428 | | ... | \| Set up IPSec performance test suite \| L2 \
429 | | ... | \| Intel-X520-DA2 \| HW_DH895xcc \|
430 | | ...
431 | | [Arguments] | ${osi_layer} | ${nic_name} | ${crypto_type}=HW_DH895xcc
432 | | ...
433 | | Set up 3-node performance topology with DUT's NIC model
434 | | ... | ${osi_layer} | ${nic_name}
435 | | Return From Keyword If | '${crypto_type}' == 'SW_cryptodev'
436 | | ${numvfs}= | Set Variable If
437 | | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
438 | | ... | '${crypto_type}' == 'HW_C3xxx' | ${16}
439 | | Configure crypto device on all DUTs | ${crypto_type} | numvfs=${numvfs}
440 | | ... | force_init=${True}
441 | | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
442
443 | Set up performance test suite with MEMIF
444 | | [Documentation]
445 | | ... | Append memif_plugin.so to the list of enabled plugins.
446 | | ...
447 | | Set Suite Variable | @{plugins_to_enable}
448 | | Append To List | ${plugins_to_enable} | memif_plugin.so
449
450 | Set up performance test suite with NAT
451 | | [Documentation]
452 | | ... | Append nat_plugin.so to the list of enabled plugins.
453 | | ...
454 | | Set Suite Variable | @{plugins_to_enable}
455 | | Append To List | ${plugins_to_enable} | nat_plugin.so
456
457 | Set up performance test suite with ACL
458 | | [Documentation]
459 | | ... | Append acl_plugin.so to the list of enabled plugins.
460 | | ...
461 | | Set Suite Variable | @{plugins_to_enable}
462 | | Append To List | ${plugins_to_enable} | acl_plugin.so
463
464 | Set up performance test suite with AVF driver
465 | | [Documentation]
466 | | ... | Append avf_plugin.so to the list of enabled plugins.
467 | | ...
468 | | Set Suite Variable | @{plugins_to_enable}
469 | | Append To List | ${plugins_to_enable} | avf_plugin.so
470
471 | Set up performance test suite with Static SRv6 proxy
472 | | [Documentation]
473 | | ... | Append srv6as_plugin.so to the list of enabled plugins.
474 | | ...
475 | | Set Suite Variable | @{plugins_to_enable}
476 | | Append To List | ${plugins_to_enable} | srv6as_plugin.so
477
478 | Set up performance test suite with Dynamic SRv6 proxy
479 | | [Documentation]
480 | | ... | Append srv6ad_plugin.so to the list of enabled plugins.
481 | | ...
482 | | Set Suite Variable | @{plugins_to_enable}
483 | | Append To List | ${plugins_to_enable} | srv6ad_plugin.so
484
485 | Set up performance test suite with Masquerading SRv6 proxy
486 | | [Documentation]
487 | | ... | Append srv6am_plugin.so to the list of enabled plugins.
488 | | ...
489 | | Set Suite Variable | @{plugins_to_enable}
490 | | Append To List | ${plugins_to_enable} | srv6am_plugin.so
491
492 | Set up performance test suite with LACP mode link bonding
493 | | [Documentation]
494 | | ... | Append lacp_plugin.so to the list of enabled plugins.
495 | | ...
496 | | Set Suite Variable | @{plugins_to_enable}
497 | | Append To List | ${plugins_to_enable} | lacp_plugin.so
498
499 | Set up performance test suite with crypto ipsecmb
500 | | [Documentation]
501 | | ... | Append crypto_ipsecmb_plugin.so to the list of enabled plugins.
502 | | ...
503 | | Set Suite Variable | @{plugins_to_enable}
504 | | Append To List | ${plugins_to_enable} | crypto_ia32_plugin.so
505 | | Append To List | ${plugins_to_enable} | crypto_ipsecmb_plugin.so
506 | | Append To List | ${plugins_to_enable} | crypto_openssl_plugin.so
507
508 | Set up 3-node performance topology with wrk and DUT's NIC model
509 | | [Documentation]
510 | | ... | Suite preparation phase that sets the default startup configuration of
511 | | ... | VPP on all DUTs. Updates interfaces on all nodes and sets the global
512 | | ... | variables used in test cases based on interface model provided as an
513 | | ... | argument. Installs the traffic generator.
514 | | ...
515 | | ... | *Arguments:*
516 | | ... | - iface_model - Interface model. Type: string
517 | | ...
518 | | ... | *Example:*
519 | | ...
520 | | ... | \| Set up 3-node performance topology with wrk and DUT's NIC model\
521 | | ... | \| Intel-X520-DA2 \|
522 | | ...
523 | | [Arguments] | ${iface_model}
524 | | ...
525 | | Set variables in 3-node circular topology with DUT interface model
526 | | ... | ${iface_model}
527 | | Iface update numa node | ${tg}
528 # Make sure TRex is stopped
529 | | ${running}= | Is TRex running | ${tg}
530 | | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
531 | | ${curr_driver}= | Get PCI dev driver | ${tg}
532 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
533 | | Run keyword if | '${curr_driver}'!='${None}'
534 | | ... | PCI Driver Unbind | ${tg} |
535 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
536 # Bind tg_if1 to driver specified in the topology
537 | | ${driver}= | Get Variable Value | ${tg['interfaces']['${tg_if1}']['driver']}
538 | | PCI Driver Bind | ${tg}
539 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']} | ${driver}
540 # Set IP on tg_if1
541 | | ${intf_name}= | Get Linux interface name | ${tg}
542 | | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
543 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.10.1 | 24
544 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.20.1 | 24
545 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.30.1 | 24
546 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.40.1 | 24
547 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.50.1 | 24
548 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.60.1 | 24
549 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.70.1 | 24
550 | | Set Linux interface IP | ${tg} | ${intf_name} | 192.168.80.1 | 24
551 | | Set Linux interface up | ${tg} | ${intf_name}
552 | | Install wrk | ${tg}
553
554 # Tests setups
555
556 | Set up performance test
557 | | [Documentation] | Common test setup for performance tests.
558 | | ...
559 | | Reset PAPI History On All DUTs | ${nodes}
560 | | Create base startup configuration of VPP on all DUTs
561
562 | Set up tcp performance test
563 | | [Documentation] | Common test setup for TCP performance tests.
564 | | ...
565 | | Reset PAPI History On All DUTs | ${nodes}
566 | | Create base startup configuration of VPP for TCP tests on all DUTs
567
568 | Set up performance test with Ligato Kubernetes
569 | | [Documentation] | Common test setup for performance tests with Ligato \
570 | | ... | Kubernetes.
571 | | ...
572 | | Apply Kubernetes resource on all duts | ${nodes} | namespaces/csit.yaml
573 | | Apply Kubernetes resource on all duts | ${nodes} | pods/kafka.yaml
574 | | Apply Kubernetes resource on all duts | ${nodes} | pods/etcdv3.yaml
575 | | Apply Kubernetes resource on all duts | ${nodes}
576 | | ... | configmaps/vswitch-agent-cfg.yaml
577 | | Apply Kubernetes resource on all duts | ${nodes}
578 | | ... | configmaps/vnf-agent-cfg.yaml
579 | | Apply Kubernetes resource on all duts | ${nodes}
580 | | ... | pods/contiv-sfc-controller.yaml
581 | | Apply Kubernetes resource on all duts | ${nodes}
582 | | ... | pods/contiv-vswitch.yaml
583
584 | Set up performance test with containers
585 | | [Documentation]
586 | | ... | Common test setup for performance tests with containers
587 | | ...
588 | | ... | *Arguments:*
589 | | ... | - chains: Total number of chains. Type: integer
590 | | ... | - nodeness: Total number of nodes per chain. Type: integer
591 | | ... | - auto_scale - If True, use same amount of Dataplane threads for
592 | | ... |   network function as DUT, otherwise use single physical core for
593 | | ... |   every network function. Type: boolean
594 | | ...
595 | | ... | *Example:*
596 | | ...
597 | | ... | \| Set up performance test with containers \| 1 \| 1 \|
598 | | ...
599 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
600 | | ...
601 | | Set Test Variable | @{container_groups} | @{EMPTY}
602 | | Set Test Variable | ${container_group} | CNF
603 | | Set Test Variable | ${nf_nodes}
604 | | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
605 | | ... | engine=${container_engine} | WITH NAME | ${container_group}
606 | | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
607 | | ... | auto_scale=${auto_scale}
608 | | Acquire all '${container_group}' containers
609 | | Create all '${container_group}' containers
610 | | Configure VPP in all '${container_group}' containers
611 | | Stop VPP service on all DUTs | ${nodes}
612 | | Start VPP in all '${container_group}' containers
613 | | Restart VPP service on all DUTs | ${nodes}
614 | | Verify VPP on all DUTs | ${nodes}
615 | | Save VPP PIDs
616 | | Append To List | ${container_groups} | ${container_group}