CSIT-163: Add show vpp version verbose
[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 | | Show vpp version on all DUTs
198 | | Setup performance rate Variables
199 | | Setup performance global Variables
200 | | 3-node circular Topology Variables Setup
201 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
202 | | ...                          | ${dut1} | ${dut1_if1} | ${dut1_if2}
203 | | ...                          | ${dut2} | ${dut2_if1} | ${dut2_if2}
204 | | ...                          | ${topology_type}
205
206 3-node Performance Suite Setup with DUT's NIC model
207 | | [Arguments] | ${topology_type} | ${nic_model}
208 | | Setup default startup configuration of VPP on all DUTs
209 | | Update All Interface Data On All Nodes | ${nodes}
210 | | Show vpp version on all DUTs
211 | | Setup performance rate Variables
212 | | Setup performance global Variables
213 | | 3-node circular Topology Variables Setup with DUT interface model
214 | | ... | ${nic_model}
215 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
216 | | ...                          | ${dut1} | ${dut1_if1} | ${dut1_if2}
217 | | ...                          | ${dut2} | ${dut2_if1} | ${dut2_if2}
218 | | ...                          | ${topology_type}
219
220 | 3-node Performance Suite Teardown
221 | | Teardown traffic generator | ${tg}
222
223 | Find NDR using linear search and pps
224 | | [Documentation] | Find throughput by using RFC2544 linear search with
225 | | ...             | non drop rate
226 | | ...
227 | | ... | *Arguments:*
228 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
229 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
230 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
231 | | ... | - ${topology_type} - Topology type. Type: string
232 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
233 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
234 | | ...
235 | | ... | *Return:*
236 | | ... | - No value returned
237 | | ...
238 | | ... | *Example:*
239 | | ...
240 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
241 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
242 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
243 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
244 | | ${duration}= | Set Variable | 10
245 | | Set Duration | ${duration}
246 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
247 | | Set Search Linear Step | ${step_rate}
248 | | Set Search Frame Size | ${framesize}
249 | | Set Search Rate Type pps
250 | | Linear Search | ${start_rate} | ${topology_type}
251 | | ${rate_per_stream}= | Verify Search Result
252 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
253 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
254 | | ...                              | ${framesize} | ${topology_type}
255 | | ...                              | fail_on_loss=${False}
256
257 | Find PDR using linear search and pps
258 | | [Documentation] | Find throughput by using RFC2544 linear search with
259 | | ...             | partial drop rate, with PDR threshold 0.5%.
260 | | ...
261 | | ... | *Arguments:*
262 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
263 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
264 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
265 | | ... | - ${topology_type} - Topology type. Type: string
266 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
267 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
268 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
269 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
270 | | ...
271 | | ... | *Return:*
272 | | ... | - No value returned
273 | | ...
274 | | ... | *Example:*
275 | | ...
276 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
277 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
278 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
279 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
280 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
281 | | ${duration}= | Set Variable | 10
282 | | Set Duration | ${duration}
283 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
284 | | Set Search Linear Step | ${step_rate}
285 | | Set Search Frame Size | ${framesize}
286 | | Set Search Rate Type pps
287 | | Set Loss Acceptance | ${loss_acceptance}
288 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
289 | | ...            | Set Loss Acceptance Type Percentage
290 | | Linear Search | ${start_rate} | ${topology_type}
291 | | ${rate_per_stream}= | Verify Search Result
292 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
293 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
294 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
295 | | ...                                   | ${framesize} | ${topology_type}
296 | | ...                                   | ${loss_acceptance}
297 | | ...                                   | ${loss_acceptance_type}
298 | | ...                                   | fail_on_loss=${False}
299
300 | Find NDR using binary search and pps
301 | | [Documentation] | Find throughput by using RFC2544 binary search with
302 | | ...             | non drop rate
303 | | ...
304 | | ... | *Arguments:*
305 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
306 | | ... | - ${binary_min} - Lower boundary of search [pps]. Type: float
307 | | ... | - ${binary_max} - Upper boundary of search [pps]. Type: float
308 | | ... | - ${topology_type} - Topology type. Type: string
309 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
310 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
311 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
312 | | ...
313 | | ... | *Return:*
314 | | ... | - No value returned
315 | | ...
316 | | ... | *Example:*
317 | | ...
318 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
319 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
320 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
321 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
322 | | ${duration}= | Set Variable | 10
323 | | Set Duration | ${duration}
324 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
325 | | Set Search Frame Size | ${framesize}
326 | | Set Search Rate Type pps
327 | | Set Binary Convergence Threshold | ${threshold}
328 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
329 | | ${rate_per_stream}= | Verify Search Result
330 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
331 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
332 | | ...                              | ${framesize} | ${topology_type}
333 | | ...                              | fail_on_loss=${False}
334
335 | Find PDR using binary search and pps
336 | | [Documentation] | Find throughput by using RFC2544 binary search with
337 | | ...             | partial drop rate, with PDR threshold 0.5%.
338 | | ...
339 | | ... | *Arguments:*
340 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
341 | | ... | - ${binary_min} - Lower boundary of search [pps]. Type: float
342 | | ... | - ${binary_max} - Upper boundary of search [pps]. Type: float
343 | | ... | - ${topology_type} - Topology type. Type: string
344 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
345 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
346 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
347 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
348 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
349 | | ...
350 | | ... | *Return:*
351 | | ... | - No value returned
352 | | ...
353 | | ... | *Example:*
354 | | ...
355 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
356 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
357 | | ... | \| percentage
358 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
359 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
360 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
361 | | ${duration}= | Set Variable | 10
362 | | Set Duration | ${duration}
363 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
364 | | Set Search Frame Size | ${framesize}
365 | | Set Search Rate Type pps
366 | | Set Loss Acceptance | ${loss_acceptance}
367 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
368 | | ...            | Set Loss Acceptance Type Percentage
369 | | Set Binary Convergence Threshold | ${threshold}
370 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
371 | | ${rate_per_stream}= | Verify Search Result
372 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
373 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
374 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
375 | | ...                                   | ${framesize} | ${topology_type}
376 | | ...                                   | ${loss_acceptance}
377 | | ...                                   | ${loss_acceptance_type}
378 | | ...                                   | fail_on_loss=${False}
379
380 | Find NDR using combined search and pps
381 | | [Documentation] | Find throughput by using RFC2544 combined search
382 | | ...             | (linear + binary) with non drop rate
383 | | ...
384 | | ... | *Arguments:*
385 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
386 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
387 | | ... | - ${step_rate} - Step of linear search [pps]. Type: float
388 | | ... | - ${topology_type} - Topology type. Type: string
389 | | ... | - ${min_rate} - Lower limit of search [pps]. Type: float
390 | | ... | - ${max_rate} - Upper limit of search [pps]. Type: float
391 | | ... | - ${threshold} - Threshold to stop search [pps]. Type: integer
392 | | ...
393 | | ... | *Return:*
394 | | ... | - No value returned
395 | | ...
396 | | ... | *Example:*
397 | | ...
398 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
399 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
400 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
401 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
402 | | ${duration}= | Set Variable | 10
403 | | Set Duration | ${duration}
404 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
405 | | Set Search Linear Step | ${step_rate}
406 | | Set Search Frame Size | ${framesize}
407 | | Set Search Rate Type pps
408 | | Set Binary Convergence Threshold | ${threshold}
409 | | Combined Search | ${start_rate} | ${topology_type}
410 | | ${rate_per_stream}= | Verify Search Result
411 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
412 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
413 | | ...                              | ${framesize} | ${topology_type}
414 | | ...                              | fail_on_loss=${False}
415
416 | Find PDR using combined search and pps
417 | | [Documentation] | Find throughput by using RFC2544 combined search
418 | | ...             | (linear + binary) with partial drop rate, with PDR
419 | | ...             | threshold 0.5%.
420 | | ...
421 | | ... | *Arguments:*
422 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
423 | | ... | - ${start_rate} - Initial start rate [pps]. Type: float
424 | | ... | - ${step_rate} - Step of linear 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 combined search and pps \| 64 \| 5000000 \
438 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
439 | | ... | \| percentage
440 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
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 Linear Step | ${step_rate}
447 | | Set Search Frame Size | ${framesize}
448 | | Set Search Rate Type pps
449 | | Set Loss Acceptance | ${loss_acceptance}
450 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
451 | | ...            | Set Loss Acceptance Type Percentage
452 | | Set Binary Convergence Threshold | ${threshold}
453 | | Combined Search | ${start_rate} | ${topology_type}
454 | | ${rate_per_stream}= | Verify Search Result
455 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
456 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
457 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
458 | | ...                                   | ${framesize} | ${topology_type}
459 | | ...                                   | ${loss_acceptance}
460 | | ...                                   | ${loss_acceptance_type}
461 | | ...                                   | fail_on_loss=${False}
462
463 | Display result of NDR search
464 | | [Documentation] | Display result of NDR search in packet per seconds (total
465 | | ...             | and per stream) and Gbps.
466 | | ...
467 | | ... | *Arguments:*
468 | | ... | - ${rate_per_stream} - Measured rate per stream [pps]. Type: string
469 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
470 | | ... | - ${nr_streams} - Total number of streams. Type: integer
471 | | ...
472 | | ... | *Return:*
473 | | ... | - No value returned
474 | | ...
475 | | ... | *Example:*
476 | | ...
477 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2
478 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
479 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
480 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
481 | | Set Test Message | FINAL_RATE: ${rate_total} pps
482 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
483 | | Set Test Message | FINAL_BANDWIDTH: ${bandwidth_total} Gbps | append=yes
484
485 | Display result of PDR search
486 | | [Documentation] | Display result of PDR search in packet per seconds (total
487 | | ...             | and per stream) and Gbps.
488 | | ...
489 | | ... | *Arguments:*
490 | | ... | - ${rate_per_stream} - Measured rate per stream [pps]. Type: string
491 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
492 | | ... | - ${nr_streams} - Total number of streams. Type: integer
493 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
494 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
495 | | ...
496 | | ... | *Return:*
497 | | ... | - No value returned
498 | | ...
499 | | ... | *Example:*
500 | | ...
501 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
502 | | ... | \| percentage
503 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
504 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
505 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
506 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
507 | | Set Test Message | FINAL_RATE: ${rate_total} pps
508 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
509 | | Set Test Message | FINAL_BANDWIDTH: ${bandwidth_total} Gbps | append=yes
510 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
511 | | ...              | append=yes
512
513 | Traffic should pass with no loss
514 | | [Documentation] | Send traffic at specified rate. No packet loss is
515 | | ...             | accepted at loss evaluation.
516 | | ...
517 | | ... | *Arguments:*
518 | | ... | - ${duration} - Duration of traffic run [s]. Type: integer
519 | | ... | - ${rate} - Rate for sending packets. Type: string
520 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
521 | | ... | - ${topology_type} - Topology type. Type: string
522 | | ...
523 | | ... | *Return:*
524 | | ... | - No value returned
525 | | ...
526 | | ... | *Example:*
527 | | ...
528 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
529 | | ... | \| 3-node-IPv4
530 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
531 | | ...         | ${fail_on_loss}=${True}
532 | | Clear and show runtime counters with running traffic | ${duration}
533 | | ...  | ${rate} | ${framesize} | ${topology_type}
534 | | Clear all counters on all DUTs
535 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
536 | | ...                | ${topology_type} | warmup_time=0
537 | | Show statistics on all DUTs
538 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
539
540 | Traffic should pass with partial loss
541 | | [Documentation] | Send traffic at specified rate. Partial packet loss is
542 | | ...             | accepted within loss acceptance value.
543 | | ...
544 | | ... | *Arguments:*
545 | | ... | - ${duration} - Duration of traffic run [s]. Type: integer
546 | | ... | - ${rate} - Rate for sending packets. Type: string
547 | | ... | - ${framesize} - L2 Frame Size [B]. Type: integer
548 | | ... | - ${topology_type} - Topology type. Type: string
549 | | ... | - ${loss_acceptance} - Accepted loss during search. Type: float
550 | | ... | - ${loss_acceptance_type} - Percentage or frames. Type: string
551 | | ...
552 | | ... | *Return:*
553 | | ... | - No value returned
554 | | ...
555 | | ... | *Example:*
556 | | ...
557 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
558 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
559 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
560 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
561 | | ...         | ${fail_on_loss}=${True}
562 | | Clear and show runtime counters with running traffic | ${duration}
563 | | ...  | ${rate} | ${framesize} | ${topology_type}
564 | | Clear all counters on all DUTs
565 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
566 | | ...                | ${topology_type} | warmup_time=0
567 | | Show statistics on all DUTs
568 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
569 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
570
571 | Clear and show runtime counters with running traffic
572 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
573 | | Send traffic on tg | -1 | ${rate} | ${framesize}
574 | | ...                | ${topology_type} | warmup_time=0 | async_call=True
575 | | Clear runtime counters on all DUTs
576 | | Sleep | ${duration}
577 | | Show runtime counters on all DUTs
578 | | Stop traffic on tg