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