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