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