2099deef77839061c5bc9f3efc211f7269c284bf
[csit.git] / resources / libraries / robot / performance.robot
1 # Copyright (c) 2016 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.topology.Topology
16 | Library | resources.libraries.python.NodePath
17 | Library | resources.libraries.python.InterfaceUtil
18 | Library | resources.libraries.python.TrafficGenerator
19 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
20 | Resource | resources/libraries/robot/default.robot
21 | Resource | resources/libraries/robot/interfaces.robot
22 | Resource | resources/libraries/robot/counters.robot
23 | Resource | resources/libraries/robot/bridge_domain.robot
24 | Resource | resources/libraries/robot/l2_xconnect.robot
25 | Resource | resources/libraries/robot/ipv4.robot
26 | Resource | resources/libraries/robot/ipv6.robot
27 | Documentation | Performance suite keywords
28
29 *** Keywords ***
30 | Setup performance rate Variables
31 | | [Documentation]
32 | | ... | Setup performance linerates as Suite Variables. Variables are used
33 | | ... | as search boundaries in RFC2544 throughput search.
34 | | ...
35 | | ... | _NOTE:_ This KW sets following suite variables:
36 | | ... | - 10Ge_linerate_pps_64B - Maximum number of packet per second
37 | | ... |                           for 10GE with 64B L2 Frame.
38 | | ... | - 10Ge_linerate_pps_68B - Maximum number of packet per second
39 | | ... |                           for 10GE with 68B L2 Frame.
40 | | ... | - 10Ge_linerate_pps_72B - Maximum number of packet per second
41 | | ... |                           for 10GE with 72B L2 Frame.
42 | | ... | - 10Ge_linerate_pps_78B - Maximum number of packet per second
43 | | ... |                           for 10GE with 78B L2 Frame.
44 | | ... | - 10Ge_linerate_pps_1518B - Maximum number of packet per second
45 | | ... |                             for 10GE with 1518B L2 Frame.
46 | | ... | - 10Ge_linerate_pps_1522B - Maximum number of packet per second
47 | | ... |                             for 10GE with 1522B L2 Frame.
48 | | ... | - 10Ge_linerate_pps_1526B - Maximum number of packet per second
49 | | ... |                             for 10GE with 1526B L2 Frame.
50 | | ... | - 10Ge_linerate_pps_9000B - Maximum number of packet per second
51 | | ... |                             for 10GE with 9000B L2 Frame.
52 | | ... | - 10Ge_linerate_pps_9004B - Maximum number of packet per second
53 | | ... |                             for 10GE with 9004B L2 Frame.
54 | | ... | - 10Ge_linerate_pps_9008B - Maximum number of packet per second
55 | | ... |                             for 10GE with 9008B L2 Frame.
56 | | ... | - 40Ge_linerate_pps_64B - Maximum number of packet per second
57 | | ... |                           for 40GE with 64B L2 Frame.
58 | | ... | - 40Ge_linerate_pps_68B - Maximum number of packet per second
59 | | ... |                           for 40GE with 68B L2 Frame.
60 | | ... | - 40Ge_linerate_pps_72B - Maximum number of packet per second
61 | | ... |                           for 40GE with 72B L2 Frame.
62 | | ... | - 40Ge_linerate_pps_78B - Maximum number of packet per second
63 | | ... |                           for 40GE with 78B L2 Frame.
64 | | ... | - 40Ge_linerate_pps_1518B - Maximum number of packet per second
65 | | ... |                             for 40GE with 1518B L2 Frame.
66 | | ... | - 40Ge_linerate_pps_1522B - Maximum number of packet per second
67 | | ... |                             for 40GE with 1522B L2 Frame.
68 | | ... | - 40Ge_linerate_pps_1526B - Maximum number of packet per second
69 | | ... |                             for 40GE with 1526B L2 Frame.
70 | | ... | - 40Ge_linerate_pps_9000B - Maximum number of packet per second
71 | | ... |                             for 40GE with 9000B L2 Frame.
72 | | ... | - 40Ge_linerate_pps_9004B - Maximum number of packet per second
73 | | ... |                             for 40GE with 9004B L2 Frame.
74 | | ... | - 40Ge_linerate_pps_9008B - Maximum number of packet per second
75 | | ... |                             for 40GE with 9008B L2 Frame.
76 | | ...
77 | | Set Suite Variable | ${10Ge_linerate_pps_64B} | 14880952
78 | | Set Suite Variable | ${10Ge_linerate_pps_68B} | 14204545
79 | | Set Suite Variable | ${10Ge_linerate_pps_72B} | 13586956
80 | | Set Suite Variable | ${10Ge_linerate_pps_78B} | 12755102
81 | | Set Suite Variable | ${10Ge_linerate_pps_1518B} | 812743
82 | | Set Suite Variable | ${10Ge_linerate_pps_1522B} | 810635
83 | | Set Suite Variable | ${10Ge_linerate_pps_9000B} | 138580
84 | | Set Suite Variable | ${10Ge_linerate_pps_9004B} | 138519
85 | | Set Suite Variable | ${10Ge_linerate_pps_9008B} | 138458
86 | | Set Suite Variable | ${40Ge_linerate_pps_64B} | 59523809
87 | | Set Suite Variable | ${40Ge_linerate_pps_68B} | 56818181
88 | | Set Suite Variable | ${40Ge_linerate_pps_72B} | 54347826
89 | | Set Suite Variable | ${40Ge_linerate_pps_78B} | 51020408
90 | | Set Suite Variable | ${40Ge_linerate_pps_1518B} | 3250975
91 | | Set Suite Variable | ${40Ge_linerate_pps_1522B} | 3242542
92 | | Set Suite Variable | ${40Ge_linerate_pps_9000B} | 554323
93 | | Set Suite Variable | ${40Ge_linerate_pps_9004B} | 554078
94 | | Set Suite Variable | ${40Ge_linerate_pps_9008B} | 553832
95
96 | Setup performance global Variables
97 | | [Documentation]
98 | | ... | Setup suite Variables. Variables are used across performance testing.
99 | | ...
100 | | ... | _NOTE:_ This KW sets following suite variables:
101 | | ... | - glob_loss_acceptance - Loss acceptance treshold
102 | | ... | - glob_loss_acceptance_type - Loss acceptance treshold type
103 | | ...
104 | | Set Suite Variable | ${glob_loss_acceptance} | 0.5
105 | | Set Suite Variable | ${glob_loss_acceptance_type} | percentage
106
107 | 2-node circular Topology Variables Setup
108 | | [Documentation]
109 | | ... | Compute path for testing on two given nodes in circular
110 | | ... | topology and set corresponding suite variables.
111 | | ...
112 | | ... | _NOTE:_ This KW sets following suite variables:
113 | | ... | - tg - TG node
114 | | ... | - tg_if1 - 1st TG interface towards DUT.
115 | | ... | - tg_if2 - 2nd TG interface towards DUT.
116 | | ... | - dut1 - DUT1 node
117 | | ... | - dut1_if1 - 1st DUT interface towards TG.
118 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
119 | | ...
120 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
121 | | Compute Path
122 | | ${tg_if1} | ${tg}= | Next Interface
123 | | ${dut1_if1} | ${dut1}= | Next Interface
124 | | ${dut1_if2} | ${dut1}= | Next Interface
125 | | ${tg_if2} | ${tg}= | Next Interface
126 | | Set Suite Variable | ${tg}
127 | | Set Suite Variable | ${tg_if1}
128 | | Set Suite Variable | ${tg_if2}
129 | | Set Suite Variable | ${dut1}
130 | | Set Suite Variable | ${dut1_if1}
131 | | Set Suite Variable | ${dut1_if2}
132
133 | 3-node circular Topology Variables Setup
134 | | [Documentation]
135 | | ... | Compute path for testing on three given nodes in circular
136 | | ... | topology and set corresponding suite variables.
137 | | ...
138 | | ... | _NOTE:_ This KW sets following suite variables:
139 | | ... | - tg - TG node
140 | | ... | - tg_if1 - TG interface towards DUT1.
141 | | ... | - tg_if2 - TG interface towards DUT2.
142 | | ... | - dut1 - DUT1 node
143 | | ... | - dut1_if1 - DUT1 interface towards TG.
144 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
145 | | ... | - dut2 - DUT2 node
146 | | ... | - dut2_if1 - DUT2 interface towards TG.
147 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
148 | | ...
149 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
150 | | ...          | ${nodes['TG']}
151 | | Compute Path
152 | | ${tg_if1} | ${tg}= | Next Interface
153 | | ${dut1_if1} | ${dut1}= | Next Interface
154 | | ${dut1_if2} | ${dut1}= | Next Interface
155 | | ${dut2_if1} | ${dut2}= | Next Interface
156 | | ${dut2_if2} | ${dut2}= | Next Interface
157 | | ${tg_if2} | ${tg}= | Next Interface
158 | | Set Suite Variable | ${tg}
159 | | Set Suite Variable | ${tg_if1}
160 | | Set Suite Variable | ${tg_if2}
161 | | Set Suite Variable | ${dut1}
162 | | Set Suite Variable | ${dut1_if1}
163 | | Set Suite Variable | ${dut1_if2}
164 | | Set Suite Variable | ${dut2}
165 | | Set Suite Variable | ${dut2_if1}
166 | | Set Suite Variable | ${dut2_if2}
167
168 | 2-node circular Topology Variables Setup with DUT interface model
169 | | [Documentation]
170 | | ... | Compute path for testing on two given nodes in circular topology
171 | | ... | based on interface model provided as an argument and set
172 | | ... | corresponding suite variables.
173 | | ...
174 | | ... | *Arguments:*
175 | | ... | - iface_model - Interface model. Type: string
176 | | ...
177 | | ... | _NOTE:_ This KW sets following suite variables:
178 | | ... | - tg - TG node
179 | | ... | - tg_if1 - 1st TG interface towards DUT.
180 | | ... | - tg_if2 - 2nd TG interface towards DUT.
181 | | ... | - dut1 - DUT1 node
182 | | ... | - dut1_if1 - 1st DUT interface towards TG.
183 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
184 | | ...
185 | | ... | *Example:*
186 | | ...
187 | | ... | \| 2-node circular Topology Variables Setup with DUT interface model \
188 | | ... | \| Intel-X520-DA2 \|
189 | | [Arguments] | ${iface_model}
190 | | ${iface_model_list}= | Create list | ${iface_model}
191 | | Append Node | ${nodes['TG']}
192 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
193 | | Append Node | ${nodes['TG']}
194 | | Compute Path
195 | | ${tg_if1} | ${tg}= | Next Interface
196 | | ${dut1_if1} | ${dut1}= | Next Interface
197 | | ${dut1_if2} | ${dut1}= | Next Interface
198 | | ${tg_if2} | ${tg}= | Next Interface
199 | | Set Suite Variable | ${tg}
200 | | Set Suite Variable | ${tg_if1}
201 | | Set Suite Variable | ${tg_if2}
202 | | Set Suite Variable | ${dut1}
203 | | Set Suite Variable | ${dut1_if1}
204 | | Set Suite Variable | ${dut1_if2}
205
206 | 3-node circular Topology Variables Setup with DUT interface model
207 | | [Documentation]
208 | | ... | Compute path for testing on three given nodes in circular topology
209 | | ... | based on interface model provided as an argument and set
210 | | ... | corresponding suite variables.
211 | | ...
212 | | ... | *Arguments:*
213 | | ... | - iface_model - Interface model. Type: string
214 | | ...
215 | | ... | _NOTE:_ This KW sets following suite variables:
216 | | ... | - tg - TG node
217 | | ... | - tg_if1 - TG interface towards DUT1.
218 | | ... | - tg_if2 - TG interface towards DUT2.
219 | | ... | - dut1 - DUT1 node
220 | | ... | - dut1_if1 - DUT1 interface towards TG.
221 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
222 | | ... | - dut2 - DUT2 node
223 | | ... | - dut2_if1 - DUT2 interface towards TG.
224 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
225 | | ...
226 | | ... | *Example:*
227 | | ...
228 | | ... | \| 3-node circular Topology Variables Setup with DUT interface model \
229 | | ... | \| Intel-X520-DA2 \|
230 | | [Arguments] | ${iface_model}
231 | | ${iface_model_list}= | Create list | ${iface_model}
232 | | Append Node | ${nodes['TG']}
233 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
234 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
235 | | Append Node | ${nodes['TG']}
236 | | Compute Path
237 | | ${tg_if1} | ${tg}= | Next Interface
238 | | ${dut1_if1} | ${dut1}= | Next Interface
239 | | ${dut1_if2} | ${dut1}= | Next Interface
240 | | ${dut2_if1} | ${dut2}= | Next Interface
241 | | ${dut2_if2} | ${dut2}= | Next Interface
242 | | ${tg_if2} | ${tg}= | Next Interface
243 | | Set Suite Variable | ${tg}
244 | | Set Suite Variable | ${tg_if1}
245 | | Set Suite Variable | ${tg_if2}
246 | | Set Suite Variable | ${dut1}
247 | | Set Suite Variable | ${dut1_if1}
248 | | Set Suite Variable | ${dut1_if2}
249 | | Set Suite Variable | ${dut2}
250 | | Set Suite Variable | ${dut2_if1}
251 | | Set Suite Variable | ${dut2_if2}
252
253 | VPP interfaces in path are up in a 2-node circular topology
254 | | [Documentation]
255 | | ... | *Set UP state on VPP interfaces in path on nodes in 2-node circular
256 | | ... | topology.*
257 | | ...
258 | | Set Interface State | ${dut1} | ${dut1_if1} | up
259 | | Set Interface State | ${dut1} | ${dut1_if2} | up
260 | | Vpp Node Interfaces Ready Wait | ${dut1}
261
262 | VPP interfaces in path are up in a 3-node circular topology
263 | | [Documentation]
264 | | ... | *Set UP state on VPP interfaces in path on nodes in 3-node circular
265 | | ... | topology.*
266 | | ...
267 | | Set Interface State | ${dut1} | ${dut1_if1} | up
268 | | Set Interface State | ${dut1} | ${dut1_if2} | up
269 | | Set Interface State | ${dut2} | ${dut2_if1} | up
270 | | Set Interface State | ${dut2} | ${dut2_if2} | up
271 | | Vpp Node Interfaces Ready Wait | ${dut1}
272 | | Vpp Node Interfaces Ready Wait | ${dut2}
273
274 | IPv4 forwarding initialized in a 3-node circular topology
275 | | [Documentation]
276 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
277 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
278 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
279 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
280 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
281 | | ...
282 | | Set Interface State | ${dut1} | ${dut1_if1} | up
283 | | Set Interface State | ${dut1} | ${dut1_if2} | up
284 | | Set Interface State | ${dut2} | ${dut2_if1} | up
285 | | Set Interface State | ${dut2} | ${dut2_if2} | up
286 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
287 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
288 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
289 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
290 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
291 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
292 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
293 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
294 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
295 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
296 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
297 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
298 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
299 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
300 | | All Vpp Interfaces Ready Wait | ${nodes}
301
302 | IPv6 forwarding initialized in a 3-node circular topology
303 | | [Documentation]
304 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
305 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
306 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
307 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
308 | | ... | next hop of neighbour DUT interface IPv6 address.
309 | | ...
310 | | ${prefix}= | Set Variable | 64
311 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
312 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
313 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
314 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
315 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
316 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
317 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
318 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
319 | | Vpp nodes ra suppress link layer | ${nodes}
320 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
321 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
322 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
323 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
324 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
325 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
326
327 | L2 xconnect initialized in a 3-node circular topology
328 | | [Documentation]
329 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
330 | | ... | each DUT. Interfaces are brought up.
331 | | ... |
332 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
333 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
334 | | All Vpp Interfaces Ready Wait | ${nodes}
335
336 | L2 bridge domain initialized in a 3-node circular topology
337 | | [Documentation]
338 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
339 | | ... | that is created automatically with index 1. Learning is enabled.
340 | | ... | Interfaces are brought up.
341 | | ... |
342 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
343 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
344 | | All Vpp Interfaces Ready Wait | ${nodes}
345
346 | 2-node Performance Suite Setup
347 | | [Documentation]
348 | | ... | Suite preparation phase that setup default startup configuration of
349 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
350 | | ... | variables used in test cases. Initializes traffic generator.
351 | | ...
352 | | ... | *Arguments:*
353 | | ... | - topology_type - Topology type. Type: string
354 | | ...
355 | | ... | *Example:*
356 | | ...
357 | | ... | \| 2-node Performance Suite Setup \| L2 \|
358 | | [Arguments] | ${topology_type}
359 | | Setup default startup configuration of VPP on all DUTs
360 | | Show vpp version on all DUTs
361 | | Setup performance rate Variables
362 | | Setup performance global Variables
363 | | 2-node circular Topology Variables Setup
364 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
365 | | ...                          | ${dut1} | ${dut1_if1}
366 | | ...                          | ${dut1} | ${dut1_if2}
367 | | ...                          | ${topology_type}
368
369 | 3-node Performance Suite Setup
370 | | [Documentation]
371 | | ... | Suite preparation phase that setup default startup configuration of
372 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
373 | | ... | variables used in test cases. Initializes traffic generator.
374 | | ...
375 | | ... | *Arguments:*
376 | | ... | - topology_type - Topology type. Type: string
377 | | ...
378 | | ... | *Example:*
379 | | ...
380 | | ... | \| 3-node Performance Suite Setup \| L2 \|
381 | | [Arguments] | ${topology_type}
382 | | Setup default startup configuration of VPP on all DUTs
383 | | Show vpp version on all DUTs
384 | | Setup performance rate Variables
385 | | Setup performance global Variables
386 | | 3-node circular Topology Variables Setup
387 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
388 | | ...                          | ${dut1} | ${dut1_if1}
389 | | ...                          | ${dut2} | ${dut2_if2}
390 | | ...                          | ${topology_type}
391
392 2-node Performance Suite Setup with DUT's NIC model
393 | | [Documentation]
394 | | ... | Suite preparation phase that setup default startup configuration of
395 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
396 | | ... | variables used in test cases based on interface model provided as an
397 | | ... | argument. Initializes traffic generator.
398 | | ...
399 | | ... | *Arguments:*
400 | | ... | - topology_type - Topology type. Type: string
401 | | ... | - nic_model - Interface model. Type: string
402 | | ...
403 | | ... | *Example:*
404 | | ...
405 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
406 | | [Arguments] | ${topology_type} | ${nic_model}
407 | | Setup default startup configuration of VPP on all DUTs
408 | | Show vpp version on all DUTs
409 | | Setup performance rate Variables
410 | | Setup performance global Variables
411 | | 2-node circular Topology Variables Setup with DUT interface model
412 | | ... | ${nic_model}
413 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
414 | | ...                          | ${dut1} | ${dut1_if1}
415 | | ...                          | ${dut1} | ${dut1_if2}
416 | | ...                          | ${topology_type}
417
418 3-node Performance Suite Setup with DUT's NIC model
419 | | [Documentation]
420 | | ... | Suite preparation phase that setup default startup configuration of
421 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
422 | | ... | variables used in test cases based on interface model provided as an
423 | | ... | argument. Initializes traffic generator.
424 | | ...
425 | | ... | *Arguments:*
426 | | ... | - topology_type - Topology type. Type: string
427 | | ... | - nic_model - Interface model. Type: string
428 | | ...
429 | | ... | *Example:*
430 | | ...
431 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
432 | | [Arguments] | ${topology_type} | ${nic_model}
433 | | Setup default startup configuration of VPP on all DUTs
434 | | Show vpp version on all DUTs
435 | | Setup performance rate Variables
436 | | Setup performance global Variables
437 | | 3-node circular Topology Variables Setup with DUT interface model
438 | | ... | ${nic_model}
439 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
440 | | ...                          | ${dut1} | ${dut1_if1}
441 | | ...                          | ${dut2} | ${dut2_if2}
442 | | ...                          | ${topology_type}
443
444 | 3-node Performance Suite Teardown
445 | | [Documentation]
446 | | ... | Suite teardown phase with traffic generator teardown.
447 | | ...
448 | | Teardown traffic generator | ${tg}
449
450 | Find NDR using linear search and pps
451 | | [Documentation]
452 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
453 | | ...
454 | | ... | *Arguments:*
455 | | ... | - framesize - L2 Frame Size [B]. Type: integer
456 | | ... | - start_rate - Initial start rate [pps]. Type: float
457 | | ... | - step_rate - Step of linear search [pps]. Type: float
458 | | ... | - topology_type - Topology type. Type: string
459 | | ... | - min_rate - Lower limit of search [pps]. Type: float
460 | | ... | - max_rate - Upper limit of search [pps]. Type: float
461 | | ...
462 | | ... | *Return:*
463 | | ... | - No value returned
464 | | ...
465 | | ... | *Example:*
466 | | ...
467 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
468 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
469 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
470 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
471 | | ${duration}= | Set Variable | 10
472 | | Set Duration | ${duration}
473 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
474 | | Set Search Linear Step | ${step_rate}
475 | | Set Search Frame Size | ${framesize}
476 | | Set Search Rate Type pps
477 | | Linear Search | ${start_rate} | ${topology_type}
478 | | ${rate_per_stream} | ${latency}= | Verify Search Result
479 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
480 | | ...                          | ${latency}
481 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
482 | | ...                              | ${framesize} | ${topology_type}
483 | | ...                              | fail_on_loss=${False}
484
485 | Find PDR using linear search and pps
486 | | [Documentation]
487 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
488 | | ... | with PDR threshold and type specified by parameter.
489 | | ...
490 | | ... | *Arguments:*
491 | | ... | - framesize - L2 Frame Size [B]. Type: integer
492 | | ... | - start_rate - Initial start rate [pps]. Type: float
493 | | ... | - step_rate - Step of linear search [pps]. Type: float
494 | | ... | - topology_type - Topology type. Type: string
495 | | ... | - min_rate - Lower limit of search [pps]. Type: float
496 | | ... | - max_rate - Upper limit of search [pps]. Type: float
497 | | ... | - loss_acceptance - Accepted loss during search. Type: float
498 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
499 | | ...
500 | | ... | *Example:*
501 | | ...
502 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
503 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
504 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
505 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
506 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
507 | | ${duration}= | Set Variable | 10
508 | | Set Duration | ${duration}
509 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
510 | | Set Search Linear Step | ${step_rate}
511 | | Set Search Frame Size | ${framesize}
512 | | Set Search Rate Type pps
513 | | Set Loss Acceptance | ${loss_acceptance}
514 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
515 | | ...            | Set Loss Acceptance Type Percentage
516 | | Linear Search | ${start_rate} | ${topology_type}
517 | | ${rate_per_stream} | ${latency}= | Verify Search Result
518 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
519 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
520 | | ...                          | ${latency}
521 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
522 | | ...                                   | ${framesize} | ${topology_type}
523 | | ...                                   | ${loss_acceptance}
524 | | ...                                   | ${loss_acceptance_type}
525 | | ...                                   | fail_on_loss=${False}
526
527 | Find NDR using binary search and pps
528 | | [Documentation]
529 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
530 | | ...
531 | | ... | *Arguments:*
532 | | ... | - framesize - L2 Frame Size [B]. Type: integer
533 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
534 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
535 | | ... | - topology_type - Topology type. Type: string
536 | | ... | - min_rate - Lower limit of search [pps]. Type: float
537 | | ... | - max_rate - Upper limit of search [pps]. Type: float
538 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
539 | | ...
540 | | ... | *Example:*
541 | | ...
542 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
543 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
544 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
545 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
546 | | ${duration}= | Set Variable | 10
547 | | Set Duration | ${duration}
548 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
549 | | Set Search Frame Size | ${framesize}
550 | | Set Search Rate Type pps
551 | | Set Binary Convergence Threshold | ${threshold}
552 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
553 | | ${rate_per_stream} | ${latency}= | Verify Search Result
554 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
555 | | ...                          | ${latency}
556 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
557 | | ...                              | ${framesize} | ${topology_type}
558 | | ...                              | fail_on_loss=${False}
559
560 | Find PDR using binary search and pps
561 | | [Documentation]
562 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
563 | | ... | with PDR threshold and type specified by parameter.
564 | | ...
565 | | ... | *Arguments:*
566 | | ... | - framesize - L2 Frame Size [B]. Type: integer
567 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
568 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
569 | | ... | - topology_type - Topology type. Type: string
570 | | ... | - min_rate - Lower limit of search [pps]. Type: float
571 | | ... | - max_rate - Upper limit of search [pps]. Type: float
572 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
573 | | ... | - loss_acceptance - Accepted loss during search. Type: float
574 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
575 | | ...
576 | | ... | *Example:*
577 | | ...
578 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
579 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
580 | | ... | \| percentage
581 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
582 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
583 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
584 | | ${duration}= | Set Variable | 10
585 | | Set Duration | ${duration}
586 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
587 | | Set Search Frame Size | ${framesize}
588 | | Set Search Rate Type pps
589 | | Set Loss Acceptance | ${loss_acceptance}
590 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
591 | | ...            | Set Loss Acceptance Type Percentage
592 | | Set Binary Convergence Threshold | ${threshold}
593 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
594 | | ${rate_per_stream} | ${latency}= | Verify Search Result
595 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
596 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
597 | | ...                          | ${latency}
598 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
599 | | ...                                   | ${framesize} | ${topology_type}
600 | | ...                                   | ${loss_acceptance}
601 | | ...                                   | ${loss_acceptance_type}
602 | | ...                                   | fail_on_loss=${False}
603
604 | Find NDR using combined search and pps
605 | | [Documentation]
606 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
607 | | ... | non drop rate.
608 | | ...
609 | | ... | *Arguments:*
610 | | ... | - framesize - L2 Frame Size [B]. Type: integer
611 | | ... | - start_rate - Initial start rate [pps]. Type: float
612 | | ... | - step_rate - Step of linear search [pps]. Type: float
613 | | ... | - topology_type - Topology type. Type: string
614 | | ... | - min_rate - Lower limit of search [pps]. Type: float
615 | | ... | - max_rate - Upper limit of search [pps]. Type: float
616 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
617 | | ...
618 | | ... | *Example:*
619 | | ...
620 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
621 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
622 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
623 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
624 | | ${duration}= | Set Variable | 10
625 | | Set Duration | ${duration}
626 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
627 | | Set Search Linear Step | ${step_rate}
628 | | Set Search Frame Size | ${framesize}
629 | | Set Search Rate Type pps
630 | | Set Binary Convergence Threshold | ${threshold}
631 | | Combined Search | ${start_rate} | ${topology_type}
632 | | ${rate_per_stream} | ${latency}= | Verify Search Result
633 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
634 | | ...                          | ${latency}
635 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
636 | | ...                              | ${framesize} | ${topology_type}
637 | | ...                              | fail_on_loss=${False}
638
639 | Find PDR using combined search and pps
640 | | [Documentation]
641 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
642 | | ... | partial drop rate with PDR threshold and type specified by parameter.
643 | | ...
644 | | ... | *Arguments:*
645 | | ... | - framesize - L2 Frame Size [B]. Type: integer
646 | | ... | - start_rate - Initial start rate [pps]. Type: float
647 | | ... | - step_rate - Step of linear search [pps]. Type: float
648 | | ... | - topology_type - Topology type. Type: string
649 | | ... | - min_rate - Lower limit of search [pps]. Type: float
650 | | ... | - max_rate - Upper limit of search [pps]. Type: float
651 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
652 | | ... | - loss_acceptance - Accepted loss during search. Type: float
653 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
654 | | ...
655 | | ... | *Example:*
656 | | ...
657 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
658 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
659 | | ... | \| percentage
660 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
661 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
662 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
663 | | ${duration}= | Set Variable | 10
664 | | Set Duration | ${duration}
665 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
666 | | Set Search Linear Step | ${step_rate}
667 | | Set Search Frame Size | ${framesize}
668 | | Set Search Rate Type pps
669 | | Set Loss Acceptance | ${loss_acceptance}
670 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
671 | | ...            | Set Loss Acceptance Type Percentage
672 | | Set Binary Convergence Threshold | ${threshold}
673 | | Combined Search | ${start_rate} | ${topology_type}
674 | | ${rate_per_stream} | ${latency}= | Verify Search Result
675 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
676 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
677 | | ...                          | ${latency}
678 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
679 | | ...                                   | ${framesize} | ${topology_type}
680 | | ...                                   | ${loss_acceptance}
681 | | ...                                   | ${loss_acceptance_type}
682 | | ...                                   | fail_on_loss=${False}
683
684 | Display result of NDR search
685 | | [Documentation]
686 | | ... | Display result of NDR search in packet per seconds (total and per
687 | | ... | stream) and Gbps total bandwidth with untagged packet.
688 | | ... | Througput is calculated as:
689 | | ... | Measured rate per stream * Total number of streams
690 | | ... | Bandwidth is calculated as:
691 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
692 | | ...
693 | | ... | *Arguments:*
694 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
695 | | ... | - framesize - L2 Frame Size [B]. Type: integer
696 | | ... | - nr_streams - Total number of streams. Type: integer
697 | | ... | - latency - Latency stats. Type: dictionary
698 | | ...
699 | | ... | *Example:*
700 | | ...
701 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
702 | | ... | \| (0, 10/10/10) \|
703 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
704 | | ...         | ${latency}
705 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
706 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
707 | | Set Test Message | FINAL_RATE: ${rate_total} pps
708 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
709 | | ...              | append=yes
710 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
711 | | ...              | append=yes
712 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
713 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
714 | | ...                | append=yes
715
716 | Display result of PDR search
717 | | [Documentation]
718 | | ... | Display result of PDR search in packet per seconds (total and per
719 | | ... | stream) and Gbps total bandwidth with untagged packet.
720 | | ... | Througput is calculated as:
721 | | ... | Measured rate per stream * Total number of streams
722 | | ... | Bandwidth is calculated as:
723 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
724 | | ...
725 | | ... | *Arguments:*
726 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
727 | | ... | - framesize - L2 Frame Size [B]. Type: integer
728 | | ... | - nr_streams - Total number of streams. Type: integer
729 | | ... | - loss_acceptance - Accepted loss during search. Type: float
730 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
731 | | ... | - latency - Latency stats. Type: dictionary
732 | | ...
733 | | ... | *Example:*
734 | | ...
735 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
736 | | ... | \| percentage \| (0, 10/10/10) \|
737 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
738 | | ...         | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
739 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
740 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
741 | | Set Test Message | FINAL_RATE: ${rate_total} pps
742 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
743 | | ...              | append=yes
744 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
745 | | ...              | append=yes
746 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
747 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
748 | | ...                | append=yes
749 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
750 | | ...              | append=yes
751
752 | Traffic should pass with no loss
753 | | [Documentation]
754 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
755 | | ... | evaluation.
756 | | ...
757 | | ... | *Arguments:*
758 | | ... | - duration - Duration of traffic run [s]. Type: integer
759 | | ... | - rate - Rate for sending packets. Type: string
760 | | ... | - framesize - L2 Frame Size [B]. Type: integer
761 | | ... | - topology_type - Topology type. Type: string
762 | | ...
763 | | ... | *Example:*
764 | | ...
765 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
766 | | ... | \| 3-node-IPv4
767 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
768 | | ...         | ${fail_on_loss}=${True}
769 | | Clear and show runtime counters with running traffic | ${duration}
770 | | ...  | ${rate} | ${framesize} | ${topology_type}
771 | | Clear all counters on all DUTs
772 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
773 | | ...                | ${topology_type} | warmup_time=0
774 | | Show statistics on all DUTs
775 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
776
777 | Traffic should pass with partial loss
778 | | [Documentation]
779 | | ... | Send traffic at specified rate. Partial packet loss is accepted
780 | | ... | within loss acceptance value specified as argument.
781 | | ...
782 | | ... | *Arguments:*
783 | | ... | - duration - Duration of traffic run [s]. Type: integer
784 | | ... | - rate - Rate for sending packets. Type: string
785 | | ... | - framesize - L2 Frame Size [B]. Type: integer
786 | | ... | - topology_type - Topology type. Type: string
787 | | ... | - loss_acceptance - Accepted loss during search. Type: float
788 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
789 | | ...
790 | | ... | *Example:*
791 | | ...
792 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
793 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
794 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
795 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
796 | | ...         | ${fail_on_loss}=${True}
797 | | Clear and show runtime counters with running traffic | ${duration}
798 | | ...  | ${rate} | ${framesize} | ${topology_type}
799 | | Clear all counters on all DUTs
800 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
801 | | ...                | ${topology_type} | warmup_time=0
802 | | Show statistics on all DUTs
803 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
804 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
805
806 | Clear and show runtime counters with running traffic
807 | | [Documentation]
808 | | ... | Start traffic at specified rate then clear runtime counters on all
809 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
810 | | ... | on all DUTs. Finally stop traffic
811 | | ...
812 | | ... | *Arguments:*
813 | | ... | - duration - Duration of traffic run [s]. Type: integer
814 | | ... | - rate - Rate for sending packets. Type: string
815 | | ... | - framesize - L2 Frame Size [B]. Type: integer
816 | | ... | - topology_type - Topology type. Type: string
817 | | ...
818 | | ... | *Example:*
819 | | ...
820 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
821 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
822 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
823 | | Send traffic on tg | -1 | ${rate} | ${framesize}
824 | | ...                | ${topology_type} | warmup_time=0 | async_call=${True}
825 | | ...                | latency=${False}
826 | | Clear runtime counters on all DUTs
827 | | Sleep | ${duration}
828 | | Show runtime counters on all DUTs
829 | | Stop traffic on tg
830
831 | Add PCI devices to DUTs from 3-node single link topology
832 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
833 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
834 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
835 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
836 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
837 | | Add PCI device | ${dut2} | ${dut2_if1_pci} | ${dut2_if2_pci}