63295b715962a22d72dc3f71b21ff703b2dd543e
[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] | Setup performance rates as Suite Variables
32 | | ...
33 | | ... | _NOTE:_ This KW sets following suite variables:
34 | | ... | - 10Ge_linerate_pps_64B - Maximum number of packet per second
35 | | ... |                           for 10GE with 64B L2 Frame.
36 | | ... | - 10Ge_linerate_pps_68B - Maximum number of packet per second
37 | | ... |                           for 10GE with 68B L2 Frame.
38 | | ... | - 10Ge_linerate_pps_72B - Maximum number of packet per second
39 | | ... |                           for 10GE with 72B L2 Frame.
40 | | ... | - 10Ge_linerate_pps_78B - Maximum number of packet per second
41 | | ... |                           for 10GE with 78B L2 Frame.
42 | | ... | - 10Ge_linerate_pps_1518B - Maximum number of packet per second
43 | | ... |                             for 10GE with 1518B L2 Frame.
44 | | ... | - 10Ge_linerate_pps_1522B - Maximum number of packet per second
45 | | ... |                             for 10GE with 1522B L2 Frame.
46 | | ... | - 10Ge_linerate_pps_1526B - Maximum number of packet per second
47 | | ... |                             for 10GE with 1526B L2 Frame.
48 | | ... | - 10Ge_linerate_pps_9000B - Maximum number of packet per second
49 | | ... |                             for 10GE with 9000B L2 Frame.
50 | | ... | - 10Ge_linerate_pps_9004B - Maximum number of packet per second
51 | | ... |                             for 10GE with 9004B L2 Frame.
52 | | ... | - 10Ge_linerate_pps_9008B - Maximum number of packet per second
53 | | ... |                             for 10GE with 9008B L2 Frame.
54 | | ... | - 40Ge_linerate_pps_64B - Maximum number of packet per second
55 | | ... |                           for 40GE with 64B L2 Frame.
56 | | ... | - 40Ge_linerate_pps_68B - Maximum number of packet per second
57 | | ... |                           for 40GE with 68B L2 Frame.
58 | | ... | - 40Ge_linerate_pps_72B - Maximum number of packet per second
59 | | ... |                           for 40GE with 72B L2 Frame.
60 | | ... | - 40Ge_linerate_pps_78B - Maximum number of packet per second
61 | | ... |                           for 40GE with 78B L2 Frame.
62 | | ... | - 40Ge_linerate_pps_1518B - Maximum number of packet per second
63 | | ... |                             for 40GE with 1518B L2 Frame.
64 | | ... | - 40Ge_linerate_pps_1522B - Maximum number of packet per second
65 | | ... |                             for 40GE with 1522B L2 Frame.
66 | | ... | - 40Ge_linerate_pps_1526B - Maximum number of packet per second
67 | | ... |                             for 40GE with 1526B L2 Frame.
68 | | ... | - 40Ge_linerate_pps_9000B - Maximum number of packet per second
69 | | ... |                             for 40GE with 9000B L2 Frame.
70 | | ... | - 40Ge_linerate_pps_9004B - Maximum number of packet per second
71 | | ... |                             for 40GE with 9004B L2 Frame.
72 | | ... | - 40Ge_linerate_pps_9008B - Maximum number of packet per second
73 | | ... |                             for 40GE with 9008B L2 Frame.
74 | | ...
75 | | Set Suite Variable | ${10Ge_linerate_pps_64B} | 14880952
76 | | Set Suite Variable | ${10Ge_linerate_pps_68B} | 14204545
77 | | Set Suite Variable | ${10Ge_linerate_pps_72B} | 13586956
78 | | Set Suite Variable | ${10Ge_linerate_pps_78B} | 12755102
79 | | Set Suite Variable | ${10Ge_linerate_pps_1518B} | 812743
80 | | Set Suite Variable | ${10Ge_linerate_pps_1522B} | 810635
81 | | Set Suite Variable | ${10Ge_linerate_pps_9000B} | 138580
82 | | Set Suite Variable | ${10Ge_linerate_pps_9004B} | 138519
83 | | Set Suite Variable | ${10Ge_linerate_pps_9008B} | 138458
84 | | Set Suite Variable | ${40Ge_linerate_pps_64B} | 59523809
85 | | Set Suite Variable | ${40Ge_linerate_pps_68B} | 56818181
86 | | Set Suite Variable | ${40Ge_linerate_pps_72B} | 54347826
87 | | Set Suite Variable | ${40Ge_linerate_pps_78B} | 51020408
88 | | Set Suite Variable | ${40Ge_linerate_pps_1518B} | 3250975
89 | | Set Suite Variable | ${40Ge_linerate_pps_1522B} | 3242542
90 | | Set Suite Variable | ${40Ge_linerate_pps_9000B} | 554323
91 | | Set Suite Variable | ${40Ge_linerate_pps_9004B} | 554078
92 | | Set Suite Variable | ${40Ge_linerate_pps_9008B} | 553832
93
94 | Setup performance global Variables
95 | | [Documentation] | Setup performance global Variables
96 | | ...
97 | | ... | _NOTE:_ This KW sets following suite variables:
98 | | ... | - ${glob_loss_acceptance} - Loss acceptance treshold
99 | | ... | - ${glob_loss_acceptance_type} - Loss acceptance treshold type
100 | | ...
101 | | Set Suite Variable | ${glob_loss_acceptance} | 0.5
102 | | Set Suite Variable | ${glob_loss_acceptance_type} | percentage
103
104 | 2-node circular Topology Variables Setup
105 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
106 | | Compute Path
107 | | ${tg_if1} | ${tg}= | Next Interface
108 | | ${dut1_if1} | ${dut1}= | Next Interface
109 | | ${dut1_if2} | ${dut1}= | Next Interface
110 | | ${tg_if2} | ${tg}= | Next Interface
111 | | Set Suite Variable | ${tg}
112 | | Set Suite Variable | ${tg_if1}
113 | | Set Suite Variable | ${tg_if2}
114 | | Set Suite Variable | ${dut1}
115 | | Set Suite Variable | ${dut1_if1}
116 | | Set Suite Variable | ${dut1_if2}
117
118 | 3-node circular Topology Variables Setup
119 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
120 | | ...          | ${nodes['TG']}
121 | | Compute Path
122 | | ${tg_if1} | ${tg}= | Next Interface
123 | | ${dut1_if1} | ${dut1}= | Next Interface
124 | | ${dut1_if2} | ${dut1}= | Next Interface
125 | | ${dut2_if1} | ${dut2}= | Next Interface
126 | | ${dut2_if2} | ${dut2}= | Next Interface
127 | | ${tg_if2} | ${tg}= | Next Interface
128 | | Set Suite Variable | ${tg}
129 | | Set Suite Variable | ${tg_if1}
130 | | Set Suite Variable | ${tg_if2}
131 | | Set Suite Variable | ${dut1}
132 | | Set Suite Variable | ${dut1_if1}
133 | | Set Suite Variable | ${dut1_if2}
134 | | Set Suite Variable | ${dut2}
135 | | Set Suite Variable | ${dut2_if1}
136 | | Set Suite Variable | ${dut2_if2}
137
138 | 2-node circular Topology Variables Setup with DUT interface model
139 | | [Documentation] | Find a path between TG-DUT1-TG based on interface
140 | | ...             | model provided as an argument. Set suite variables
141 | | ...             | tg, tg_if1, tg_if2, dut1, dut1_if1, dut1_if2,
142 | | [Arguments] | ${iface_model}
143 | | ${iface_model_list}= | Create list | ${iface_model}
144 | | Append Node | ${nodes['TG']}
145 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
146 | | Append Node | ${nodes['TG']}
147 | | Compute Path
148 | | ${tg_if1} | ${tg}= | Next Interface
149 | | ${dut1_if1} | ${dut1}= | Next Interface
150 | | ${dut1_if2} | ${dut1}= | Next Interface
151 | | ${tg_if2} | ${tg}= | Next Interface
152 | | Set Suite Variable | ${tg}
153 | | Set Suite Variable | ${tg_if1}
154 | | Set Suite Variable | ${tg_if2}
155 | | Set Suite Variable | ${dut1}
156 | | Set Suite Variable | ${dut1_if1}
157 | | Set Suite Variable | ${dut1_if2}
158
159 | 3-node circular Topology Variables Setup with DUT interface model
160 | | [Documentation] | Find a path between TG-DUT1-DUT2-TG based on interface
161 | | ...             | model provided as an argument. Set suite variables
162 | | ...             | tg, tg_if1, tg_if2, dut1, dut1_if1, dut1_if2,
163 | | ...             | dut2, dut2_if1, dut2_if2
164 | | [Arguments] | ${iface_model}
165 | | ${iface_model_list}= | Create list | ${iface_model}
166 | | Append Node | ${nodes['TG']}
167 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
168 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
169 | | Append Node | ${nodes['TG']}
170 | | Compute Path
171 | | ${tg_if1} | ${tg}= | Next Interface
172 | | ${dut1_if1} | ${dut1}= | Next Interface
173 | | ${dut1_if2} | ${dut1}= | Next Interface
174 | | ${dut2_if1} | ${dut2}= | Next Interface
175 | | ${dut2_if2} | ${dut2}= | Next Interface
176 | | ${tg_if2} | ${tg}= | Next Interface
177 | | Set Suite Variable | ${tg}
178 | | Set Suite Variable | ${tg_if1}
179 | | Set Suite Variable | ${tg_if2}
180 | | Set Suite Variable | ${dut1}
181 | | Set Suite Variable | ${dut1_if1}
182 | | Set Suite Variable | ${dut1_if2}
183 | | Set Suite Variable | ${dut2}
184 | | Set Suite Variable | ${dut2_if1}
185 | | Set Suite Variable | ${dut2_if2}
186
187 | VPP interfaces in path are up in a 2-node circular topology
188 | | [Documentation] | *Set UP state on VPP interfaces in path on nodes.*
189 | | ...
190 | | Set Interface State | ${dut1} | ${dut1_if1} | up
191 | | Set Interface State | ${dut1} | ${dut1_if2} | up
192 | | Vpp Node Interfaces Ready Wait | ${dut1}
193
194 | VPP interfaces in path are up in a 3-node circular topology
195 | | [Documentation] | *Set UP state on VPP interfaces in path on nodes.*
196 | | ...
197 | | Set Interface State | ${dut1} | ${dut1_if1} | up
198 | | Set Interface State | ${dut1} | ${dut1_if2} | up
199 | | Set Interface State | ${dut2} | ${dut2_if1} | up
200 | | Set Interface State | ${dut2} | ${dut2_if2} | up
201 | | Vpp Node Interfaces Ready Wait | ${dut1}
202 | | Vpp Node Interfaces Ready Wait | ${dut2}
203
204 | IPv4 forwarding initialized in a 3-node circular topology
205 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG
206 | | Set Interface State | ${dut1} | ${dut1_if1} | up
207 | | Set Interface State | ${dut1} | ${dut1_if2} | up
208 | | Set Interface State | ${dut2} | ${dut2_if1} | up
209 | | Set Interface State | ${dut2} | ${dut2_if2} | up
210 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
211 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
212 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
213 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
214 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
215 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
216 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
217 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
218 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
219 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
220 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
221 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
222 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
223 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
224 | | All Vpp Interfaces Ready Wait | ${nodes}
225
226 | IPv6 forwarding initialized in a 3-node circular topology
227 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes
228 | | ${prefix}= | Set Variable | 64
229 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
230 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
231 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
232 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
233 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
234 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
235 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
236 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
237 | | Vpp nodes ra suppress link layer | ${nodes}
238 | | Vpp set IPv6 neighbor | ${dut1} | ${dut1_if1} | 2001:1::2
239 | | ...                    | ${tg1_if1_mac}
240 | | Vpp set IPv6 neighbor | ${dut2} | ${dut2_if2} | 2001:2::2
241 | | ...                    | ${tg1_if2_mac}
242 | | Vpp set IPv6 neighbor | ${dut1} | ${dut1_if2} | 2001:3::2
243 | | ...                    | ${dut2_if1_mac}
244 | | Vpp set IPv6 neighbor | ${dut2} | ${dut2_if1} | 2001:3::1
245 | | ...                    | ${dut1_if2_mac}
246 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
247 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
248
249 | L2 xconnect initialized in a 3-node circular topology
250 | | [Documentation] | Custom setup of L2 xconnect topology
251 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
252 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
253 | | All Vpp Interfaces Ready Wait | ${nodes}
254
255 | L2 bridge domain initialized in a 3-node circular topology
256 | | [Documentation] | Custom setup of L2 bridge topology
257 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
258 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
259 | | All Vpp Interfaces Ready Wait | ${nodes}
260
261 | 2-node Performance Suite Setup
262 | | [Arguments] | ${topology_type}
263 | | Setup default startup configuration of VPP on all DUTs
264 | | Update All Interface Data On All Nodes | ${nodes}
265 | | Show vpp version on all DUTs
266 | | Setup performance rate Variables
267 | | Setup performance global Variables
268 | | 2-node circular Topology Variables Setup
269 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
270 | | ...                          | ${dut1} | ${dut1_if1}
271 | | ...                          | ${dut1} | ${dut1_if2}
272 | | ...                          | ${topology_type}
273
274 | 3-node Performance Suite Setup
275 | | [Arguments] | ${topology_type}
276 | | Setup default startup configuration of VPP on all DUTs
277 | | Update All Interface Data On All Nodes | ${nodes}
278 | | Show vpp version on all DUTs
279 | | Setup performance rate Variables
280 | | Setup performance global Variables
281 | | 3-node circular Topology Variables Setup
282 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
283 | | ...                          | ${dut1} | ${dut1_if1}
284 | | ...                          | ${dut2} | ${dut2_if2}
285 | | ...                          | ${topology_type}
286
287 2-node Performance Suite Setup with DUT's NIC model
288 | | [Arguments] | ${topology_type} | ${nic_model}
289 | | Setup default startup configuration of VPP on all DUTs
290 | | Update All Interface Data On All Nodes | ${nodes}
291 | | Show vpp version on all DUTs
292 | | Setup performance rate Variables
293 | | Setup performance global Variables
294 | | 2-node circular Topology Variables Setup with DUT interface model
295 | | ... | ${nic_model}
296 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
297 | | ...                          | ${dut1} | ${dut1_if1}
298 | | ...                          | ${dut1} | ${dut1_if2}
299 | | ...                          | ${topology_type}
300
301 3-node Performance Suite Setup with DUT's NIC model
302 | | [Arguments] | ${topology_type} | ${nic_model}
303 | | Setup default startup configuration of VPP on all DUTs
304 | | Update All Interface Data On All Nodes | ${nodes}
305 | | Show vpp version on all DUTs
306 | | Setup performance rate Variables
307 | | Setup performance global Variables
308 | | 3-node circular Topology Variables Setup with DUT interface model
309 | | ... | ${nic_model}
310 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
311 | | ...                          | ${dut1} | ${dut1_if1}
312 | | ...                          | ${dut2} | ${dut2_if2}
313 | | ...                          | ${topology_type}
314
315 | 3-node Performance Suite Teardown
316 | | Teardown traffic generator | ${tg}
317
318 | Find NDR using linear search and pps
319 | | [Documentation] | Find throughput by using RFC2544 linear search with
320 | | ...             | non drop rate
321 | | ...
322 | | ... | *Arguments:*
323 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
324 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
325 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
326 | | ... | - ${topology_type} - Topology type. Type: string
327 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
328 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
329 | | ...
330 | | ... | *Return:*
331 | | ... | - No value returned
332 | | ...
333 | | ... | *Example:*
334 | | ...
335 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
336 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
337 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
338 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
339 | | ${duration}= | Set Variable | 10
340 | | Set Duration | ${duration}
341 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
342 | | Set Search Linear Step | ${step_rate}
343 | | Set Search Frame Size | ${framesize}
344 | | Set Search Rate Type pps
345 | | Linear Search | ${start_rate} | ${topology_type}
346 | | ${rate_per_stream} | ${latency}= | Verify Search Result
347 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
348 | | ...                          | ${latency}
349 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
350 | | ...                              | ${framesize} | ${topology_type}
351 | | ...                              | fail_on_loss=${False}
352
353 | Find PDR using linear search and pps
354 | | [Documentation] | Find throughput by using RFC2544 linear search with
355 | | ...             | partial drop rate, with PDR threshold 0.5%.
356 | | ...
357 | | ... | *Arguments:*
358 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
359 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
360 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
361 | | ... | - ${topology_type} - Topology type. Type: string
362 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
363 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
364 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
365 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
366 | | ...
367 | | ... | *Return:*
368 | | ... | - No value returned
369 | | ...
370 | | ... | *Example:*
371 | | ...
372 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
373 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
374 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
375 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
376 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
377 | | ${duration}= | Set Variable | 10
378 | | Set Duration | ${duration}
379 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
380 | | Set Search Linear Step | ${step_rate}
381 | | Set Search Frame Size | ${framesize}
382 | | Set Search Rate Type pps
383 | | Set Loss Acceptance | ${loss_acceptance}
384 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
385 | | ...            | Set Loss Acceptance Type Percentage
386 | | Linear Search | ${start_rate} | ${topology_type}
387 | | ${rate_per_stream} | ${latency}= | Verify Search Result
388 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
389 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
390 | | ...                          | ${latency}
391 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
392 | | ...                                   | ${framesize} | ${topology_type}
393 | | ...                                   | ${loss_acceptance}
394 | | ...                                   | ${loss_acceptance_type}
395 | | ...                                   | fail_on_loss=${False}
396
397 | Find NDR using binary search and pps
398 | | [Documentation] | Find throughput by using RFC2544 binary search with
399 | | ...             | non drop rate
400 | | ...
401 | | ... | *Arguments:*
402 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
403 | | ... | - ${binary_min} - Lower boundary of search [pps]. Type: float
404 | | ... | - ${binary_max} - Upper boundary of search [pps]. Type: float
405 | | ... | - ${topology_type} - Topology type. Type: string
406 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
407 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
408 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
409 | | ...
410 | | ... | *Return:*
411 | | ... | - No value returned
412 | | ...
413 | | ... | *Example:*
414 | | ...
415 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
416 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
417 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
418 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
419 | | ${duration}= | Set Variable | 10
420 | | Set Duration | ${duration}
421 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
422 | | Set Search Frame Size | ${framesize}
423 | | Set Search Rate Type pps
424 | | Set Binary Convergence Threshold | ${threshold}
425 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
426 | | ${rate_per_stream} | ${latency}= | Verify Search Result
427 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
428 | | ...                          | ${latency}
429 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
430 | | ...                              | ${framesize} | ${topology_type}
431 | | ...                              | fail_on_loss=${False}
432
433 | Find PDR using binary search and pps
434 | | [Documentation] | Find throughput by using RFC2544 binary search with
435 | | ...             | partial drop rate, with PDR threshold 0.5%.
436 | | ...
437 | | ... | *Arguments:*
438 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
439 | | ... | - ${binary_min} - Lower boundary of search [pps]. Type: float
440 | | ... | - ${binary_max} - Upper boundary of search [pps]. Type: float
441 | | ... | - ${topology_type} - Topology type. Type: string
442 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
443 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
444 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
445 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
446 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
447 | | ...
448 | | ... | *Return:*
449 | | ... | - No value returned
450 | | ...
451 | | ... | *Example:*
452 | | ...
453 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
454 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
455 | | ... | \| percentage
456 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
457 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
458 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
459 | | ${duration}= | Set Variable | 10
460 | | Set Duration | ${duration}
461 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
462 | | Set Search Frame Size | ${framesize}
463 | | Set Search Rate Type pps
464 | | Set Loss Acceptance | ${loss_acceptance}
465 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
466 | | ...            | Set Loss Acceptance Type Percentage
467 | | Set Binary Convergence Threshold | ${threshold}
468 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
469 | | ${rate_per_stream} | ${latency}= | Verify Search Result
470 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
471 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
472 | | ...                          | ${latency}
473 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
474 | | ...                                   | ${framesize} | ${topology_type}
475 | | ...                                   | ${loss_acceptance}
476 | | ...                                   | ${loss_acceptance_type}
477 | | ...                                   | fail_on_loss=${False}
478
479 | Find NDR using combined search and pps
480 | | [Documentation] | Find throughput by using RFC2544 combined search
481 | | ...             | (linear + binary) with non drop rate
482 | | ...
483 | | ... | *Arguments:*
484 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
485 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
486 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
487 | | ... | - ${topology_type} - Topology type. Type: string
488 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
489 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
490 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
491 | | ...
492 | | ... | *Return:*
493 | | ... | - No value returned
494 | | ...
495 | | ... | *Example:*
496 | | ...
497 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
498 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
499 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
500 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
501 | | ${duration}= | Set Variable | 10
502 | | Set Duration | ${duration}
503 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
504 | | Set Search Linear Step | ${step_rate}
505 | | Set Search Frame Size | ${framesize}
506 | | Set Search Rate Type pps
507 | | Set Binary Convergence Threshold | ${threshold}
508 | | Combined Search | ${start_rate} | ${topology_type}
509 | | ${rate_per_stream} | ${latency}= | Verify Search Result
510 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
511 | | ...                          | ${latency}
512 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
513 | | ...                              | ${framesize} | ${topology_type}
514 | | ...                              | fail_on_loss=${False}
515
516 | Find PDR using combined search and pps
517 | | [Documentation] | Find throughput by using RFC2544 combined search
518 | | ...             | (linear + binary) with partial drop rate, with PDR
519 | | ...             | threshold 0.5%.
520 | | ...
521 | | ... | *Arguments:*
522 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
523 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
524 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
525 | | ... | - ${topology_type} - Topology type. Type: string
526 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
527 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
528 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
529 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
530 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
531 | | ...
532 | | ... | *Return:*
533 | | ... | - No value returned
534 | | ...
535 | | ... | *Example:*
536 | | ...
537 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
538 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
539 | | ... | \| percentage
540 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
541 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
542 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
543 | | ${duration}= | Set Variable | 10
544 | | Set Duration | ${duration}
545 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
546 | | Set Search Linear Step | ${step_rate}
547 | | Set Search Frame Size | ${framesize}
548 | | Set Search Rate Type pps
549 | | Set Loss Acceptance | ${loss_acceptance}
550 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
551 | | ...            | Set Loss Acceptance Type Percentage
552 | | Set Binary Convergence Threshold | ${threshold}
553 | | Combined Search | ${start_rate} | ${topology_type}
554 | | ${rate_per_stream} | ${latency}= | Verify Search Result
555 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
556 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
557 | | ...                          | ${latency}
558 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
559 | | ...                                   | ${framesize} | ${topology_type}
560 | | ...                                   | ${loss_acceptance}
561 | | ...                                   | ${loss_acceptance_type}
562 | | ...                                   | fail_on_loss=${False}
563
564 | Display result of NDR search
565 | | [Documentation] | Display result of NDR search in packet per seconds (total
566 | | ...             | and per stream) and Gbps.
567 | | ...
568 | | ... | *Arguments:*
569 | | ... | - ${rate_per_stream} - Measured rate per stream [pps]. Type: string
570 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
571 | | ... | - ${nr_streams} - Total number of streams. Type: integer
572 | | ... | - ${latency} - Latency stats. Type: dictionary
573 | | ...
574 | | ... | *Return:*
575 | | ... | - No value returned
576 | | ...
577 | | ... | *Example:*
578 | | ...
579 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
580 | | ... | \| (0, 10/10/10) \|
581 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
582 | | ...         | ${latency}
583 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
584 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
585 | | Set Test Message | FINAL_RATE: ${rate_total} pps
586 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
587 | | ...              | append=yes
588 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
589 | | ...              | append=yes
590 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
591 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
592 | | ...                | append=yes
593
594 | Display result of PDR search
595 | | [Documentation] | Display result of PDR search in packet per seconds (total
596 | | ...             | and per stream) and Gbps.
597 | | ...
598 | | ... | *Arguments:*
599 | | ... | - ${rate_per_stream} - Measured rate per stream [pps]. Type: string
600 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
601 | | ... | - ${nr_streams} - Total number of streams. Type: integer
602 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
603 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
604 | | ... | - ${latency} - Latency stats. Type: dictionary
605 | | ...
606 | | ... | *Return:*
607 | | ... | - No value returned
608 | | ...
609 | | ... | *Example:*
610 | | ...
611 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
612 | | ... | \| percentage \| (0, 10/10/10) \|
613 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
614 | | ...         | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
615 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
616 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
617 | | Set Test Message | FINAL_RATE: ${rate_total} pps
618 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
619 | | ...              | append=yes
620 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
621 | | ...              | append=yes
622 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
623 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
624 | | ...                | append=yes
625 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
626 | | ...              | append=yes
627
628 | Traffic should pass with no loss
629 | | [Documentation] | Send traffic at specified rate. No packet loss is
630 | | ...             | accepted at loss evaluation.
631 | | ...
632 | | ... | *Arguments:*
633 | | ... | - ${duration} - Duration of traffic run [s]. Type: integer
634 | | ... | - ${rate} - Rate for sending packets. Type: string
635 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
636 | | ... | - ${topology_type} - Topology type. Type: string
637 | | ...
638 | | ... | *Return:*
639 | | ... | - No value returned
640 | | ...
641 | | ... | *Example:*
642 | | ...
643 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
644 | | ... | \| 3-node-IPv4
645 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
646 | | ...         | ${fail_on_loss}=${True}
647 | | Clear and show runtime counters with running traffic | ${duration}
648 | | ...  | ${rate} | ${framesize} | ${topology_type}
649 | | Clear all counters on all DUTs
650 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
651 | | ...                | ${topology_type} | warmup_time=0
652 | | Show statistics on all DUTs
653 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
654
655 | Traffic should pass with partial loss
656 | | [Documentation] | Send traffic at specified rate. Partial packet loss is
657 | | ...             | accepted within loss acceptance value.
658 | | ...
659 | | ... | *Arguments:*
660 | | ... | - ${duration} - Duration of traffic run [s]. Type: integer
661 | | ... | - ${rate} - Rate for sending packets. Type: string
662 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
663 | | ... | - ${topology_type} - Topology type. Type: string
664 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
665 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
666 | | ...
667 | | ... | *Return:*
668 | | ... | - No value returned
669 | | ...
670 | | ... | *Example:*
671 | | ...
672 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
673 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
674 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
675 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
676 | | ...         | ${fail_on_loss}=${True}
677 | | Clear and show runtime counters with running traffic | ${duration}
678 | | ...  | ${rate} | ${framesize} | ${topology_type}
679 | | Clear all counters on all DUTs
680 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
681 | | ...                | ${topology_type} | warmup_time=0
682 | | Show statistics on all DUTs
683 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
684 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
685
686 | Clear and show runtime counters with running traffic
687 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
688 | | Send traffic on tg | -1 | ${rate} | ${framesize}
689 | | ...                | ${topology_type} | warmup_time=0 | async_call=${True}
690 | | ...                | latency=${False}
691 | | Clear runtime counters on all DUTs
692 | | Sleep | ${duration}
693 | | Show runtime counters on all DUTs
694 | | Stop traffic on tg