CSIT-215 Improve documentation - performance
[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 | Custom setup of IPv4 addresses on all DUT nodes and TG
283 | | Set Interface State | ${dut1} | ${dut1_if1} | up
284 | | Set Interface State | ${dut1} | ${dut1_if2} | up
285 | | Set Interface State | ${dut2} | ${dut2_if1} | up
286 | | Set Interface State | ${dut2} | ${dut2_if2} | up
287 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
288 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
289 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
290 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
291 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
292 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
293 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
294 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
295 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
296 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
297 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
298 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
299 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
300 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
301 | | All Vpp Interfaces Ready Wait | ${nodes}
302
303 | IPv6 forwarding initialized in a 3-node circular topology
304 | | [Documentation]
305 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
306 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
307 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
308 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
309 | | ... | next hop of neighbour DUT interface IPv6 address.
310 | | ...
311 | | ${prefix}= | Set Variable | 64
312 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
313 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
314 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
315 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
316 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
317 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
318 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
319 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
320 | | Vpp nodes ra suppress link layer | ${nodes}
321 | | Vpp set IPv6 neighbor | ${dut1} | ${dut1_if1} | 2001:1::2
322 | | ...                    | ${tg1_if1_mac}
323 | | Vpp set IPv6 neighbor | ${dut2} | ${dut2_if2} | 2001:2::2
324 | | ...                    | ${tg1_if2_mac}
325 | | Vpp set IPv6 neighbor | ${dut1} | ${dut1_if2} | 2001:3::2
326 | | ...                    | ${dut2_if1_mac}
327 | | Vpp set IPv6 neighbor | ${dut2} | ${dut2_if1} | 2001:3::1
328 | | ...                    | ${dut1_if2_mac}
329 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
330 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
331
332 | L2 xconnect initialized in a 3-node circular topology
333 | | [Documentation]
334 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
335 | | ... | each DUT. Interfaces are brought up.
336 | | ... |
337 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
338 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
339 | | All Vpp Interfaces Ready Wait | ${nodes}
340
341 | L2 bridge domain initialized in a 3-node circular topology
342 | | [Documentation]
343 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
344 | | ... | that is created automatically with index 1. Learning is enabled.
345 | | ... | Interfaces are brought up.
346 | | ... |
347 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
348 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
349 | | All Vpp Interfaces Ready Wait | ${nodes}
350
351 | 2-node Performance Suite Setup
352 | | [Documentation]
353 | | ... | Suite preparation phase that setup default startup configuration of
354 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
355 | | ... | variables used in test cases. Initializes traffic generator.
356 | | ...
357 | | ... | *Arguments:*
358 | | ... | - topology_type - Topology type. Type: string
359 | | ...
360 | | ... | *Example:*
361 | | ...
362 | | ... | \| 2-node Performance Suite Setup \| L2 \|
363 | | [Arguments] | ${topology_type}
364 | | Setup default startup configuration of VPP on all DUTs
365 | | Update All Interface Data On All Nodes | ${nodes}
366 | | Show vpp version on all DUTs
367 | | Setup performance rate Variables
368 | | Setup performance global Variables
369 | | 2-node circular Topology Variables Setup
370 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
371 | | ...                          | ${dut1} | ${dut1_if1}
372 | | ...                          | ${dut1} | ${dut1_if2}
373 | | ...                          | ${topology_type}
374
375 | 3-node Performance Suite Setup
376 | | [Documentation]
377 | | ... | Suite preparation phase that setup default startup configuration of
378 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
379 | | ... | variables used in test cases. Initializes traffic generator.
380 | | ...
381 | | ... | *Arguments:*
382 | | ... | - topology_type - Topology type. Type: string
383 | | ...
384 | | ... | *Example:*
385 | | ...
386 | | ... | \| 3-node Performance Suite Setup \| L2 \|
387 | | [Arguments] | ${topology_type}
388 | | Setup default startup configuration of VPP on all DUTs
389 | | Update All Interface Data On All Nodes | ${nodes}
390 | | Show vpp version on all DUTs
391 | | Setup performance rate Variables
392 | | Setup performance global Variables
393 | | 3-node circular Topology Variables Setup
394 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
395 | | ...                          | ${dut1} | ${dut1_if1}
396 | | ...                          | ${dut2} | ${dut2_if2}
397 | | ...                          | ${topology_type}
398
399 2-node Performance Suite Setup with DUT's NIC model
400 | | [Documentation]
401 | | ... | Suite preparation phase that setup default startup configuration of
402 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
403 | | ... | variables used in test cases based on interface model provided as an
404 | | ... | argument. Initializes traffic generator.
405 | | ...
406 | | ... | *Arguments:*
407 | | ... | - topology_type - Topology type. Type: string
408 | | ... | - nic_model - Interface model. Type: string
409 | | ...
410 | | ... | *Example:*
411 | | ...
412 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
413 | | [Arguments] | ${topology_type} | ${nic_model}
414 | | Setup default startup configuration of VPP on all DUTs
415 | | Update All Interface Data On All Nodes | ${nodes}
416 | | Show vpp version on all DUTs
417 | | Setup performance rate Variables
418 | | Setup performance global Variables
419 | | 2-node circular Topology Variables Setup with DUT interface model
420 | | ... | ${nic_model}
421 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
422 | | ...                          | ${dut1} | ${dut1_if1}
423 | | ...                          | ${dut1} | ${dut1_if2}
424 | | ...                          | ${topology_type}
425
426 3-node Performance Suite Setup with DUT's NIC model
427 | | [Documentation]
428 | | ... | Suite preparation phase that setup default startup configuration of
429 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
430 | | ... | variables used in test cases based on interface model provided as an
431 | | ... | argument. Initializes traffic generator.
432 | | ...
433 | | ... | *Arguments:*
434 | | ... | - topology_type - Topology type. Type: string
435 | | ... | - nic_model - Interface model. Type: string
436 | | ...
437 | | ... | *Example:*
438 | | ...
439 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
440 | | [Arguments] | ${topology_type} | ${nic_model}
441 | | Setup default startup configuration of VPP on all DUTs
442 | | Update All Interface Data On All Nodes | ${nodes}
443 | | Show vpp version on all DUTs
444 | | Setup performance rate Variables
445 | | Setup performance global Variables
446 | | 3-node circular Topology Variables Setup with DUT interface model
447 | | ... | ${nic_model}
448 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
449 | | ...                          | ${dut1} | ${dut1_if1}
450 | | ...                          | ${dut2} | ${dut2_if2}
451 | | ...                          | ${topology_type}
452
453 | 3-node Performance Suite Teardown
454 | | [Documentation]
455 | | ... | Suite teardown phase with traffic generator teardown.
456 | | ...
457 | | Teardown traffic generator | ${tg}
458
459 | Find NDR using linear search and pps
460 | | [Documentation]
461 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
462 | | ...
463 | | ... | *Arguments:*
464 | | ... | - framesize - L2 Frame Size [B]. Type: integer
465 | | ... | - start_rate - Initial start rate [pps]. Type: float
466 | | ... | - step_rate - Step of linear search [pps]. Type: float
467 | | ... | - topology_type - Topology type. Type: string
468 | | ... | - min_rate - Lower limit of search [pps]. Type: float
469 | | ... | - max_rate - Upper limit of search [pps]. Type: float
470 | | ...
471 | | ... | *Return:*
472 | | ... | - No value returned
473 | | ...
474 | | ... | *Example:*
475 | | ...
476 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
477 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
478 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
479 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
480 | | ${duration}= | Set Variable | 10
481 | | Set Duration | ${duration}
482 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
483 | | Set Search Linear Step | ${step_rate}
484 | | Set Search Frame Size | ${framesize}
485 | | Set Search Rate Type pps
486 | | Linear Search | ${start_rate} | ${topology_type}
487 | | ${rate_per_stream} | ${latency}= | Verify Search Result
488 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
489 | | ...                          | ${latency}
490 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
491 | | ...                              | ${framesize} | ${topology_type}
492 | | ...                              | fail_on_loss=${False}
493
494 | Find PDR using linear search and pps
495 | | [Documentation]
496 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
497 | | ... | with PDR threshold and type specified by parameter.
498 | | ...
499 | | ... | *Arguments:*
500 | | ... | - framesize - L2 Frame Size [B]. Type: integer
501 | | ... | - start_rate - Initial start rate [pps]. Type: float
502 | | ... | - step_rate - Step of linear search [pps]. Type: float
503 | | ... | - topology_type - Topology type. Type: string
504 | | ... | - min_rate - Lower limit of search [pps]. Type: float
505 | | ... | - max_rate - Upper limit of search [pps]. Type: float
506 | | ... | - loss_acceptance - Accepted loss during search. Type: float
507 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
508 | | ...
509 | | ... | *Example:*
510 | | ...
511 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
512 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
513 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
514 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
515 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
516 | | ${duration}= | Set Variable | 10
517 | | Set Duration | ${duration}
518 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
519 | | Set Search Linear Step | ${step_rate}
520 | | Set Search Frame Size | ${framesize}
521 | | Set Search Rate Type pps
522 | | Set Loss Acceptance | ${loss_acceptance}
523 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
524 | | ...            | Set Loss Acceptance Type Percentage
525 | | Linear Search | ${start_rate} | ${topology_type}
526 | | ${rate_per_stream} | ${latency}= | Verify Search Result
527 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
528 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
529 | | ...                          | ${latency}
530 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
531 | | ...                                   | ${framesize} | ${topology_type}
532 | | ...                                   | ${loss_acceptance}
533 | | ...                                   | ${loss_acceptance_type}
534 | | ...                                   | fail_on_loss=${False}
535
536 | Find NDR using binary search and pps
537 | | [Documentation]
538 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
539 | | ...
540 | | ... | *Arguments:*
541 | | ... | - framesize - L2 Frame Size [B]. Type: integer
542 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
543 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
544 | | ... | - topology_type - Topology type. Type: string
545 | | ... | - min_rate - Lower limit of search [pps]. Type: float
546 | | ... | - max_rate - Upper limit of search [pps]. Type: float
547 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
548 | | ...
549 | | ... | *Example:*
550 | | ...
551 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
552 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
553 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
554 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
555 | | ${duration}= | Set Variable | 10
556 | | Set Duration | ${duration}
557 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
558 | | Set Search Frame Size | ${framesize}
559 | | Set Search Rate Type pps
560 | | Set Binary Convergence Threshold | ${threshold}
561 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
562 | | ${rate_per_stream} | ${latency}= | Verify Search Result
563 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
564 | | ...                          | ${latency}
565 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
566 | | ...                              | ${framesize} | ${topology_type}
567 | | ...                              | fail_on_loss=${False}
568
569 | Find PDR using binary search and pps
570 | | [Documentation]
571 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
572 | | ... | with PDR threshold and type specified by parameter.
573 | | ...
574 | | ... | *Arguments:*
575 | | ... | - framesize - L2 Frame Size [B]. Type: integer
576 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
577 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
578 | | ... | - topology_type - Topology type. Type: string
579 | | ... | - min_rate - Lower limit of search [pps]. Type: float
580 | | ... | - max_rate - Upper limit of search [pps]. Type: float
581 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
582 | | ... | - loss_acceptance - Accepted loss during search. Type: float
583 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
584 | | ...
585 | | ... | *Example:*
586 | | ...
587 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
588 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
589 | | ... | \| percentage
590 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
591 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
592 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
593 | | ${duration}= | Set Variable | 10
594 | | Set Duration | ${duration}
595 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
596 | | Set Search Frame Size | ${framesize}
597 | | Set Search Rate Type pps
598 | | Set Loss Acceptance | ${loss_acceptance}
599 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
600 | | ...            | Set Loss Acceptance Type Percentage
601 | | Set Binary Convergence Threshold | ${threshold}
602 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
603 | | ${rate_per_stream} | ${latency}= | Verify Search Result
604 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
605 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
606 | | ...                          | ${latency}
607 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
608 | | ...                                   | ${framesize} | ${topology_type}
609 | | ...                                   | ${loss_acceptance}
610 | | ...                                   | ${loss_acceptance_type}
611 | | ...                                   | fail_on_loss=${False}
612
613 | Find NDR using combined search and pps
614 | | [Documentation]
615 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
616 | | ... | non drop rate.
617 | | ...
618 | | ... | *Arguments:*
619 | | ... | - framesize - L2 Frame Size [B]. Type: integer
620 | | ... | - start_rate - Initial start rate [pps]. Type: float
621 | | ... | - step_rate - Step of linear search [pps]. Type: float
622 | | ... | - topology_type - Topology type. Type: string
623 | | ... | - min_rate - Lower limit of search [pps]. Type: float
624 | | ... | - max_rate - Upper limit of search [pps]. Type: float
625 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
626 | | ...
627 | | ... | *Example:*
628 | | ...
629 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
630 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
631 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
632 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
633 | | ${duration}= | Set Variable | 10
634 | | Set Duration | ${duration}
635 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
636 | | Set Search Linear Step | ${step_rate}
637 | | Set Search Frame Size | ${framesize}
638 | | Set Search Rate Type pps
639 | | Set Binary Convergence Threshold | ${threshold}
640 | | Combined Search | ${start_rate} | ${topology_type}
641 | | ${rate_per_stream} | ${latency}= | Verify Search Result
642 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
643 | | ...                          | ${latency}
644 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
645 | | ...                              | ${framesize} | ${topology_type}
646 | | ...                              | fail_on_loss=${False}
647
648 | Find PDR using combined search and pps
649 | | [Documentation]
650 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
651 | | ... | partial drop rate with PDR threshold and type specified by parameter.
652 | | ...
653 | | ... | *Arguments:*
654 | | ... | - framesize - L2 Frame Size [B]. Type: integer
655 | | ... | - start_rate - Initial start rate [pps]. Type: float
656 | | ... | - step_rate - Step of linear search [pps]. Type: float
657 | | ... | - topology_type - Topology type. Type: string
658 | | ... | - min_rate - Lower limit of search [pps]. Type: float
659 | | ... | - max_rate - Upper limit of search [pps]. Type: float
660 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
661 | | ... | - loss_acceptance - Accepted loss during search. Type: float
662 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
663 | | ...
664 | | ... | *Example:*
665 | | ...
666 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
667 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
668 | | ... | \| percentage
669 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
670 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
671 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
672 | | ${duration}= | Set Variable | 10
673 | | Set Duration | ${duration}
674 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
675 | | Set Search Linear Step | ${step_rate}
676 | | Set Search Frame Size | ${framesize}
677 | | Set Search Rate Type pps
678 | | Set Loss Acceptance | ${loss_acceptance}
679 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
680 | | ...            | Set Loss Acceptance Type Percentage
681 | | Set Binary Convergence Threshold | ${threshold}
682 | | Combined Search | ${start_rate} | ${topology_type}
683 | | ${rate_per_stream} | ${latency}= | Verify Search Result
684 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
685 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
686 | | ...                          | ${latency}
687 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
688 | | ...                                   | ${framesize} | ${topology_type}
689 | | ...                                   | ${loss_acceptance}
690 | | ...                                   | ${loss_acceptance_type}
691 | | ...                                   | fail_on_loss=${False}
692
693 | Display result of NDR search
694 | | [Documentation]
695 | | ... | Display result of NDR search in packet per seconds (total and per
696 | | ... | stream) and Gbps total bandwidth with untagged packet.
697 | | ... | Througput is calculated as:
698 | | ... | Measured rate per stream * Total number of streams
699 | | ... | Bandwidth is calculated as:
700 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
701 | | ...
702 | | ... | *Arguments:*
703 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
704 | | ... | - framesize - L2 Frame Size [B]. Type: integer
705 | | ... | - nr_streams - Total number of streams. Type: integer
706 | | ... | - latency - Latency stats. Type: dictionary
707 | | ...
708 | | ... | *Example:*
709 | | ...
710 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
711 | | ... | \| (0, 10/10/10) \|
712 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
713 | | ...         | ${latency}
714 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
715 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
716 | | Set Test Message | FINAL_RATE: ${rate_total} pps
717 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
718 | | ...              | append=yes
719 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
720 | | ...              | append=yes
721 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
722 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
723 | | ...                | append=yes
724
725 | Display result of PDR search
726 | | [Documentation]
727 | | ... | Display result of PDR search in packet per seconds (total and per
728 | | ... | stream) and Gbps total bandwidth with untagged packet.
729 | | ... | Througput is calculated as:
730 | | ... | Measured rate per stream * Total number of streams
731 | | ... | Bandwidth is calculated as:
732 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
733 | | ...
734 | | ... | *Arguments:*
735 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
736 | | ... | - framesize - L2 Frame Size [B]. Type: integer
737 | | ... | - nr_streams - Total number of streams. Type: integer
738 | | ... | - loss_acceptance - Accepted loss during search. Type: float
739 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
740 | | ... | - latency - Latency stats. Type: dictionary
741 | | ...
742 | | ... | *Example:*
743 | | ...
744 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
745 | | ... | \| percentage \| (0, 10/10/10) \|
746 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
747 | | ...         | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
748 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
749 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
750 | | Set Test Message | FINAL_RATE: ${rate_total} pps
751 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
752 | | ...              | append=yes
753 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
754 | | ...              | append=yes
755 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
756 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
757 | | ...                | append=yes
758 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
759 | | ...              | append=yes
760
761 | Traffic should pass with no loss
762 | | [Documentation]
763 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
764 | | ... | evaluation.
765 | | ...
766 | | ... | *Arguments:*
767 | | ... | - duration - Duration of traffic run [s]. Type: integer
768 | | ... | - rate - Rate for sending packets. Type: string
769 | | ... | - framesize - L2 Frame Size [B]. Type: integer
770 | | ... | - topology_type - Topology type. Type: string
771 | | ...
772 | | ... | *Example:*
773 | | ...
774 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
775 | | ... | \| 3-node-IPv4
776 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
777 | | ...         | ${fail_on_loss}=${True}
778 | | Clear and show runtime counters with running traffic | ${duration}
779 | | ...  | ${rate} | ${framesize} | ${topology_type}
780 | | Clear all counters on all DUTs
781 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
782 | | ...                | ${topology_type} | warmup_time=0
783 | | Show statistics on all DUTs
784 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
785
786 | Traffic should pass with partial loss
787 | | [Documentation]
788 | | ... | Send traffic at specified rate. Partial packet loss is accepted
789 | | ... | within loss acceptance value specified as argument.
790 | | ...
791 | | ... | *Arguments:*
792 | | ... | - duration - Duration of traffic run [s]. Type: integer
793 | | ... | - rate - Rate for sending packets. Type: string
794 | | ... | - framesize - L2 Frame Size [B]. Type: integer
795 | | ... | - topology_type - Topology type. Type: string
796 | | ... | - loss_acceptance - Accepted loss during search. Type: float
797 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
798 | | ...
799 | | ... | *Example:*
800 | | ...
801 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
802 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
803 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
804 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
805 | | ...         | ${fail_on_loss}=${True}
806 | | Clear and show runtime counters with running traffic | ${duration}
807 | | ...  | ${rate} | ${framesize} | ${topology_type}
808 | | Clear all counters on all DUTs
809 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
810 | | ...                | ${topology_type} | warmup_time=0
811 | | Show statistics on all DUTs
812 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
813 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
814
815 | Clear and show runtime counters with running traffic
816 | | [Documentation]
817 | | ... | Start traffic at specified rate then clear runtime counters on all
818 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
819 | | ... | on all DUTs. Finally stop traffic
820 | | ...
821 | | ... | *Arguments:*
822 | | ... | - duration - Duration of traffic run [s]. Type: integer
823 | | ... | - rate - Rate for sending packets. Type: string
824 | | ... | - framesize - L2 Frame Size [B]. Type: integer
825 | | ... | - topology_type - Topology type. Type: string
826 | | ...
827 | | ... | *Example:*
828 | | ...
829 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
830 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
831 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
832 | | Send traffic on tg | -1 | ${rate} | ${framesize}
833 | | ...                | ${topology_type} | warmup_time=0 | async_call=${True}
834 | | ...                | latency=${False}
835 | | Clear runtime counters on all DUTs
836 | | Sleep | ${duration}
837 | | Show runtime counters on all DUTs
838 | | Stop traffic on tg