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