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