CSIT-169 IPv4 Scale - performance
[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]
32 | | ... | Setup performance linerates as Suite Variables. Variables are used
33 | | ... | as search boundaries in RFC2544 throughput search.
34 | | ...
35 | | ... | _NOTE:_ This KW sets following suite variables:
36 | | ... | - 10Ge_linerate_pps_64B - Maximum number of packet per second
37 | | ... |                           for 10GE with 64B L2 Frame.
38 | | ... | - 10Ge_linerate_pps_68B - Maximum number of packet per second
39 | | ... |                           for 10GE with 68B L2 Frame.
40 | | ... | - 10Ge_linerate_pps_72B - Maximum number of packet per second
41 | | ... |                           for 10GE with 72B L2 Frame.
42 | | ... | - 10Ge_linerate_pps_78B - Maximum number of packet per second
43 | | ... |                           for 10GE with 78B L2 Frame.
44 | | ... | - 10Ge_linerate_pps_1518B - Maximum number of packet per second
45 | | ... |                             for 10GE with 1518B L2 Frame.
46 | | ... | - 10Ge_linerate_pps_1522B - Maximum number of packet per second
47 | | ... |                             for 10GE with 1522B L2 Frame.
48 | | ... | - 10Ge_linerate_pps_1526B - Maximum number of packet per second
49 | | ... |                             for 10GE with 1526B L2 Frame.
50 | | ... | - 10Ge_linerate_pps_9000B - Maximum number of packet per second
51 | | ... |                             for 10GE with 9000B L2 Frame.
52 | | ... | - 10Ge_linerate_pps_9004B - Maximum number of packet per second
53 | | ... |                             for 10GE with 9004B L2 Frame.
54 | | ... | - 10Ge_linerate_pps_9008B - Maximum number of packet per second
55 | | ... |                             for 10GE with 9008B L2 Frame.
56 | | ... | - 10Ge_linerate_pps_IMIX_v4_1 - Maximum number of packet per second
57 | | ... |                                 for 10GE with IMIX_v4_1 profile.
58 | | ... | - 40Ge_linerate_pps_64B - Maximum number of packet per second
59 | | ... |                           for 40GE with 64B L2 Frame.
60 | | ... | - 40Ge_linerate_pps_68B - Maximum number of packet per second
61 | | ... |                           for 40GE with 68B L2 Frame.
62 | | ... | - 40Ge_linerate_pps_72B - Maximum number of packet per second
63 | | ... |                           for 40GE with 72B L2 Frame.
64 | | ... | - 40Ge_linerate_pps_78B - Maximum number of packet per second
65 | | ... |                           for 40GE with 78B L2 Frame.
66 | | ... | - 40Ge_linerate_pps_1518B - Maximum number of packet per second
67 | | ... |                             for 40GE with 1518B L2 Frame.
68 | | ... | - 40Ge_linerate_pps_1522B - Maximum number of packet per second
69 | | ... |                             for 40GE with 1522B L2 Frame.
70 | | ... | - 40Ge_linerate_pps_1526B - Maximum number of packet per second
71 | | ... |                             for 40GE with 1526B L2 Frame.
72 | | ... | - 40Ge_linerate_pps_9000B - Maximum number of packet per second
73 | | ... |                             for 40GE with 9000B L2 Frame.
74 | | ... | - 40Ge_linerate_pps_9004B - Maximum number of packet per second
75 | | ... |                             for 40GE with 9004B L2 Frame.
76 | | ... | - 40Ge_linerate_pps_9008B - Maximum number of packet per second
77 | | ... |                             for 40GE with 9008B L2 Frame.
78 | | ...
79 | | Set Suite Variable | ${10Ge_linerate_pps_64B} | 14880952
80 | | Set Suite Variable | ${10Ge_linerate_pps_68B} | 14204545
81 | | Set Suite Variable | ${10Ge_linerate_pps_72B} | 13586956
82 | | Set Suite Variable | ${10Ge_linerate_pps_78B} | 12755102
83 | | Set Suite Variable | ${10Ge_linerate_pps_1518B} | 812743
84 | | Set Suite Variable | ${10Ge_linerate_pps_1522B} | 810635
85 | | Set Suite Variable | ${10Ge_linerate_pps_9000B} | 138580
86 | | Set Suite Variable | ${10Ge_linerate_pps_9004B} | 138519
87 | | Set Suite Variable | ${10Ge_linerate_pps_9008B} | 138458
88 | | Set Suite Variable | ${10Ge_linerate_pps_IMIX_v4_1} | 3343736
89 | | Set Suite Variable | ${40Ge_linerate_pps_64B} | 59523809
90 | | Set Suite Variable | ${40Ge_linerate_pps_68B} | 56818181
91 | | Set Suite Variable | ${40Ge_linerate_pps_72B} | 54347826
92 | | Set Suite Variable | ${40Ge_linerate_pps_78B} | 51020408
93 | | Set Suite Variable | ${40Ge_linerate_pps_1518B} | 3250975
94 | | Set Suite Variable | ${40Ge_linerate_pps_1522B} | 3242542
95 | | Set Suite Variable | ${40Ge_linerate_pps_9000B} | 554323
96 | | Set Suite Variable | ${40Ge_linerate_pps_9004B} | 554078
97 | | Set Suite Variable | ${40Ge_linerate_pps_9008B} | 553832
98
99 | Get Frame Size
100 | | [Documentation]
101 | | ... | Framesize can be either integer in case of a single packet
102 | | ... | in stream, or set of packets in case of IMIX type or simmilar.
103 | | ... | This keyword returns average framesize.
104 | | ...
105 | | ... | *Arguments:*
106 | | ... | - framesize - Framesize. Type: integer or string
107 | | ...
108 | | ... | *Example:*
109 | | ...
110 | | ... | \| Get Frame Size \| IMIX_v4_1
111 | | [Arguments] | ${framesize}
112 | | Run Keyword If | '${framesize}' == 'IMIX_v4_1'
113 | | ...            | Return From Keyword | 353.83333
114 | | Return From Keyword | ${framesize}
115
116 | Setup performance global Variables
117 | | [Documentation]
118 | | ... | Setup suite Variables. Variables are used across performance testing.
119 | | ...
120 | | ... | _NOTE:_ This KW sets following suite variables:
121 | | ... | - glob_loss_acceptance - Loss acceptance treshold
122 | | ... | - glob_loss_acceptance_type - Loss acceptance treshold type
123 | | ...
124 | | Set Suite Variable | ${glob_loss_acceptance} | 0.5
125 | | Set Suite Variable | ${glob_loss_acceptance_type} | percentage
126
127 | 2-node circular Topology Variables Setup
128 | | [Documentation]
129 | | ... | Compute path for testing on two given nodes in circular
130 | | ... | topology and set corresponding suite variables.
131 | | ...
132 | | ... | _NOTE:_ This KW sets following suite variables:
133 | | ... | - tg - TG node
134 | | ... | - tg_if1 - 1st TG interface towards DUT.
135 | | ... | - tg_if2 - 2nd TG interface towards DUT.
136 | | ... | - dut1 - DUT1 node
137 | | ... | - dut1_if1 - 1st DUT interface towards TG.
138 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
139 | | ...
140 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
141 | | Compute Path
142 | | ${tg_if1} | ${tg}= | Next Interface
143 | | ${dut1_if1} | ${dut1}= | Next Interface
144 | | ${dut1_if2} | ${dut1}= | Next Interface
145 | | ${tg_if2} | ${tg}= | Next Interface
146 | | Set Suite Variable | ${tg}
147 | | Set Suite Variable | ${tg_if1}
148 | | Set Suite Variable | ${tg_if2}
149 | | Set Suite Variable | ${dut1}
150 | | Set Suite Variable | ${dut1_if1}
151 | | Set Suite Variable | ${dut1_if2}
152
153 | 3-node circular Topology Variables Setup
154 | | [Documentation]
155 | | ... | Compute path for testing on three given nodes in circular
156 | | ... | topology and set corresponding suite variables.
157 | | ...
158 | | ... | _NOTE:_ This KW sets following suite variables:
159 | | ... | - tg - TG node
160 | | ... | - tg_if1 - TG interface towards DUT1.
161 | | ... | - tg_if2 - TG interface towards DUT2.
162 | | ... | - dut1 - DUT1 node
163 | | ... | - dut1_if1 - DUT1 interface towards TG.
164 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
165 | | ... | - dut2 - DUT2 node
166 | | ... | - dut2_if1 - DUT2 interface towards TG.
167 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
168 | | ...
169 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
170 | | ...          | ${nodes['TG']}
171 | | Compute Path
172 | | ${tg_if1} | ${tg}= | Next Interface
173 | | ${dut1_if1} | ${dut1}= | Next Interface
174 | | ${dut1_if2} | ${dut1}= | Next Interface
175 | | ${dut2_if1} | ${dut2}= | Next Interface
176 | | ${dut2_if2} | ${dut2}= | Next Interface
177 | | ${tg_if2} | ${tg}= | Next Interface
178 | | Set Suite Variable | ${tg}
179 | | Set Suite Variable | ${tg_if1}
180 | | Set Suite Variable | ${tg_if2}
181 | | Set Suite Variable | ${dut1}
182 | | Set Suite Variable | ${dut1_if1}
183 | | Set Suite Variable | ${dut1_if2}
184 | | Set Suite Variable | ${dut2}
185 | | Set Suite Variable | ${dut2_if1}
186 | | Set Suite Variable | ${dut2_if2}
187
188 | 2-node circular Topology Variables Setup with DUT interface model
189 | | [Documentation]
190 | | ... | Compute path for testing on two given nodes in circular topology
191 | | ... | based on interface model provided as an argument and set
192 | | ... | corresponding suite variables.
193 | | ...
194 | | ... | *Arguments:*
195 | | ... | - iface_model - Interface model. Type: string
196 | | ...
197 | | ... | _NOTE:_ This KW sets following suite variables:
198 | | ... | - tg - TG node
199 | | ... | - tg_if1 - 1st TG interface towards DUT.
200 | | ... | - tg_if2 - 2nd TG interface towards DUT.
201 | | ... | - dut1 - DUT1 node
202 | | ... | - dut1_if1 - 1st DUT interface towards TG.
203 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
204 | | ...
205 | | ... | *Example:*
206 | | ...
207 | | ... | \| 2-node circular Topology Variables Setup with DUT interface model \
208 | | ... | \| Intel-X520-DA2 \|
209 | | [Arguments] | ${iface_model}
210 | | ${iface_model_list}= | Create list | ${iface_model}
211 | | Append Node | ${nodes['TG']}
212 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
213 | | Append Node | ${nodes['TG']}
214 | | Compute Path
215 | | ${tg_if1} | ${tg}= | Next Interface
216 | | ${dut1_if1} | ${dut1}= | Next Interface
217 | | ${dut1_if2} | ${dut1}= | Next Interface
218 | | ${tg_if2} | ${tg}= | Next Interface
219 | | Set Suite Variable | ${tg}
220 | | Set Suite Variable | ${tg_if1}
221 | | Set Suite Variable | ${tg_if2}
222 | | Set Suite Variable | ${dut1}
223 | | Set Suite Variable | ${dut1_if1}
224 | | Set Suite Variable | ${dut1_if2}
225
226 | 3-node circular Topology Variables Setup with DUT interface model
227 | | [Documentation]
228 | | ... | Compute path for testing on three given nodes in circular topology
229 | | ... | based on interface model provided as an argument and set
230 | | ... | corresponding suite variables.
231 | | ...
232 | | ... | *Arguments:*
233 | | ... | - iface_model - Interface model. Type: string
234 | | ...
235 | | ... | _NOTE:_ This KW sets following suite variables:
236 | | ... | - tg - TG node
237 | | ... | - tg_if1 - TG interface towards DUT1.
238 | | ... | - tg_if2 - TG interface towards DUT2.
239 | | ... | - dut1 - DUT1 node
240 | | ... | - dut1_if1 - DUT1 interface towards TG.
241 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
242 | | ... | - dut2 - DUT2 node
243 | | ... | - dut2_if1 - DUT2 interface towards TG.
244 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
245 | | ...
246 | | ... | *Example:*
247 | | ...
248 | | ... | \| 3-node circular Topology Variables Setup with DUT interface model \
249 | | ... | \| Intel-X520-DA2 \|
250 | | [Arguments] | ${iface_model}
251 | | ${iface_model_list}= | Create list | ${iface_model}
252 | | Append Node | ${nodes['TG']}
253 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
254 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
255 | | Append Node | ${nodes['TG']}
256 | | Compute Path
257 | | ${tg_if1} | ${tg}= | Next Interface
258 | | ${dut1_if1} | ${dut1}= | Next Interface
259 | | ${dut1_if2} | ${dut1}= | Next Interface
260 | | ${dut2_if1} | ${dut2}= | Next Interface
261 | | ${dut2_if2} | ${dut2}= | Next Interface
262 | | ${tg_if2} | ${tg}= | Next Interface
263 | | Set Suite Variable | ${tg}
264 | | Set Suite Variable | ${tg_if1}
265 | | Set Suite Variable | ${tg_if2}
266 | | Set Suite Variable | ${dut1}
267 | | Set Suite Variable | ${dut1_if1}
268 | | Set Suite Variable | ${dut1_if2}
269 | | Set Suite Variable | ${dut2}
270 | | Set Suite Variable | ${dut2_if1}
271 | | Set Suite Variable | ${dut2_if2}
272
273 | VPP interfaces in path are up in a 2-node circular topology
274 | | [Documentation]
275 | | ... | *Set UP state on VPP interfaces in path on nodes in 2-node circular
276 | | ... | topology.*
277 | | ...
278 | | Set Interface State | ${dut1} | ${dut1_if1} | up
279 | | Set Interface State | ${dut1} | ${dut1_if2} | up
280 | | Vpp Node Interfaces Ready Wait | ${dut1}
281
282 | VPP interfaces in path are up in a 3-node circular topology
283 | | [Documentation]
284 | | ... | *Set UP state on VPP interfaces in path on nodes in 3-node circular
285 | | ... | topology.*
286 | | ...
287 | | Set Interface State | ${dut1} | ${dut1_if1} | up
288 | | Set Interface State | ${dut1} | ${dut1_if2} | up
289 | | Set Interface State | ${dut2} | ${dut2_if1} | up
290 | | Set Interface State | ${dut2} | ${dut2_if2} | up
291 | | Vpp Node Interfaces Ready Wait | ${dut1}
292 | | Vpp Node Interfaces Ready Wait | ${dut2}
293
294 | IPv4 forwarding initialized in a 3-node circular topology
295 | | [Documentation]
296 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
297 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
298 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
299 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
300 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
301 | | ...
302 | | Set Interface State | ${dut1} | ${dut1_if1} | up
303 | | Set Interface State | ${dut1} | ${dut1_if2} | up
304 | | Set Interface State | ${dut2} | ${dut2_if1} | up
305 | | Set Interface State | ${dut2} | ${dut2_if2} | up
306 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
307 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
308 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
309 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
310 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
311 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
312 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
313 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
314 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
315 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
316 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
317 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
318 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
319 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
320 | | All Vpp Interfaces Ready Wait | ${nodes}
321
322 | Scale IPv4 forwarding initialized in a 3-node circular topology
323 | | [Documentation]
324 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
325 | | ... | DUT nodes in 3-node circular topology
326 | | ...
327 | | ... | *Arguments:*
328 | | ... | - ${count} - IP route count. Type: integer
329 | | ...
330 | | ... | *Return:*
331 | | ... | - No value returned
332 | | ...
333 | | ... | *Example:*
334 | | ...
335 | | ... | \| Scale IPv4 forwarding initialized in a 3-node circular topology \
336 | | ... | \| 100000 \|
337 | | [Arguments] | ${count}
338 | | Set Interface State | ${dut1} | ${dut1_if1} | up
339 | | Set Interface State | ${dut1} | ${dut1_if2} | up
340 | | Set Interface State | ${dut2} | ${dut2_if1} | up
341 | | Set Interface State | ${dut2} | ${dut2_if2} | up
342 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
343 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
344 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
345 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
346 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
347 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
348 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
349 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
350 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
351 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
352 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
353 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
354 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
355 | | ...           | count=${count}
356 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
357 | | ...           | count=${count}
358 | | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
359 | | ...           | count=${count}
360 | | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
361 | | ...           | count=${count}
362 | | All Vpp Interfaces Ready Wait | ${nodes}
363
364 | IPv6 forwarding initialized in a 3-node circular topology
365 | | [Documentation]
366 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
367 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
368 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
369 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
370 | | ... | next hop of neighbour DUT interface IPv6 address.
371 | | ...
372 | | ${prefix}= | Set Variable | 64
373 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
374 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
375 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
376 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
377 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
378 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
379 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
380 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
381 | | Vpp nodes ra suppress link layer | ${nodes}
382 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
383 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
384 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
385 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
386 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
387 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
388
389 | L2 xconnect initialized in a 3-node circular topology
390 | | [Documentation]
391 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
392 | | ... | each DUT. Interfaces are brought up.
393 | | ... |
394 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
395 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
396 | | All Vpp Interfaces Ready Wait | ${nodes}
397
398 | L2 bridge domain initialized in a 3-node circular topology
399 | | [Documentation]
400 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
401 | | ... | that is created automatically with index 1. Learning is enabled.
402 | | ... | Interfaces are brought up.
403 | | ... |
404 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
405 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
406 | | All Vpp Interfaces Ready Wait | ${nodes}
407
408 | 2-node Performance Suite Setup
409 | | [Documentation]
410 | | ... | Suite preparation phase that setup default startup configuration of
411 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
412 | | ... | variables used in test cases. Initializes traffic generator.
413 | | ...
414 | | ... | *Arguments:*
415 | | ... | - topology_type - Topology type. Type: string
416 | | ...
417 | | ... | *Example:*
418 | | ...
419 | | ... | \| 2-node Performance Suite Setup \| L2 \|
420 | | [Arguments] | ${topology_type}
421 | | Setup default startup configuration of VPP on all DUTs
422 | | Show vpp version on all DUTs
423 | | Setup performance rate Variables
424 | | Setup performance global Variables
425 | | 2-node circular Topology Variables Setup
426 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
427 | | ...                          | ${dut1} | ${dut1_if1}
428 | | ...                          | ${dut1} | ${dut1_if2}
429 | | ...                          | ${topology_type}
430
431 | 3-node Performance Suite Setup
432 | | [Documentation]
433 | | ... | Suite preparation phase that setup default startup configuration of
434 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
435 | | ... | variables used in test cases. Initializes traffic generator.
436 | | ...
437 | | ... | *Arguments:*
438 | | ... | - topology_type - Topology type. Type: string
439 | | ...
440 | | ... | *Example:*
441 | | ...
442 | | ... | \| 3-node Performance Suite Setup \| L2 \|
443 | | [Arguments] | ${topology_type}
444 | | Setup default startup configuration of VPP on all DUTs
445 | | Show vpp version on all DUTs
446 | | Setup performance rate Variables
447 | | Setup performance global Variables
448 | | 3-node circular Topology Variables Setup
449 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
450 | | ...                          | ${dut1} | ${dut1_if1}
451 | | ...                          | ${dut2} | ${dut2_if2}
452 | | ...                          | ${topology_type}
453
454 2-node Performance Suite Setup with DUT's NIC model
455 | | [Documentation]
456 | | ... | Suite preparation phase that setup default startup configuration of
457 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
458 | | ... | variables used in test cases based on interface model provided as an
459 | | ... | argument. Initializes traffic generator.
460 | | ...
461 | | ... | *Arguments:*
462 | | ... | - topology_type - Topology type. Type: string
463 | | ... | - nic_model - Interface model. Type: string
464 | | ...
465 | | ... | *Example:*
466 | | ...
467 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
468 | | [Arguments] | ${topology_type} | ${nic_model}
469 | | Setup default startup configuration of VPP on all DUTs
470 | | Show vpp version on all DUTs
471 | | Setup performance rate Variables
472 | | Setup performance global Variables
473 | | 2-node circular Topology Variables Setup with DUT interface model
474 | | ... | ${nic_model}
475 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
476 | | ...                          | ${dut1} | ${dut1_if1}
477 | | ...                          | ${dut1} | ${dut1_if2}
478 | | ...                          | ${topology_type}
479
480 3-node Performance Suite Setup with DUT's NIC model
481 | | [Documentation]
482 | | ... | Suite preparation phase that setup default startup configuration of
483 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
484 | | ... | variables used in test cases based on interface model provided as an
485 | | ... | argument. Initializes traffic generator.
486 | | ...
487 | | ... | *Arguments:*
488 | | ... | - topology_type - Topology type. Type: string
489 | | ... | - nic_model - Interface model. Type: string
490 | | ...
491 | | ... | *Example:*
492 | | ...
493 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
494 | | [Arguments] | ${topology_type} | ${nic_model}
495 | | Setup default startup configuration of VPP on all DUTs
496 | | Show vpp version on all DUTs
497 | | Setup performance rate Variables
498 | | Setup performance global Variables
499 | | 3-node circular Topology Variables Setup with DUT interface model
500 | | ... | ${nic_model}
501 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
502 | | ...                          | ${dut1} | ${dut1_if1}
503 | | ...                          | ${dut2} | ${dut2_if2}
504 | | ...                          | ${topology_type}
505
506 | 3-node Performance Suite Teardown
507 | | [Documentation]
508 | | ... | Suite teardown phase with traffic generator teardown.
509 | | ...
510 | | Teardown traffic generator | ${tg}
511
512 | Find NDR using linear search and pps
513 | | [Documentation]
514 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
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 | | ...
524 | | ... | *Return:*
525 | | ... | - No value returned
526 | | ...
527 | | ... | *Example:*
528 | | ...
529 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
530 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
531 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
532 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
533 | | ${duration}= | Set Variable | 10
534 | | Set Duration | ${duration}
535 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
536 | | Set Search Linear Step | ${step_rate}
537 | | Set Search Frame Size | ${framesize}
538 | | Set Search Rate Type pps
539 | | Linear Search | ${start_rate} | ${topology_type}
540 | | ${rate_per_stream} | ${latency}= | Verify Search Result
541 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
542 | | ...                          | ${latency}
543 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
544 | | ...                              | ${framesize} | ${topology_type}
545 | | ...                              | fail_on_loss=${False}
546
547 | Find PDR using linear search and pps
548 | | [Documentation]
549 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
550 | | ... | with PDR threshold and type specified by parameter.
551 | | ...
552 | | ... | *Arguments:*
553 | | ... | - framesize - L2 Frame Size [B]. Type: integer
554 | | ... | - start_rate - Initial start rate [pps]. Type: float
555 | | ... | - step_rate - Step of linear search [pps]. Type: float
556 | | ... | - topology_type - Topology type. Type: string
557 | | ... | - min_rate - Lower limit of search [pps]. Type: float
558 | | ... | - max_rate - Upper limit of search [pps]. Type: float
559 | | ... | - loss_acceptance - Accepted loss during search. Type: float
560 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
561 | | ...
562 | | ... | *Example:*
563 | | ...
564 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
565 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
566 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
567 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
568 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
569 | | ${duration}= | Set Variable | 10
570 | | Set Duration | ${duration}
571 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
572 | | Set Search Linear Step | ${step_rate}
573 | | Set Search Frame Size | ${framesize}
574 | | Set Search Rate Type pps
575 | | Set Loss Acceptance | ${loss_acceptance}
576 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
577 | | ...            | Set Loss Acceptance Type Percentage
578 | | Linear Search | ${start_rate} | ${topology_type}
579 | | ${rate_per_stream} | ${latency}= | Verify Search Result
580 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
581 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
582 | | ...                          | ${latency}
583 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
584 | | ...                                   | ${framesize} | ${topology_type}
585 | | ...                                   | ${loss_acceptance}
586 | | ...                                   | ${loss_acceptance_type}
587 | | ...                                   | fail_on_loss=${False}
588
589 | Find NDR using binary search and pps
590 | | [Documentation]
591 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
592 | | ...
593 | | ... | *Arguments:*
594 | | ... | - framesize - L2 Frame Size [B]. Type: integer
595 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
596 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
597 | | ... | - topology_type - Topology type. Type: string
598 | | ... | - min_rate - Lower limit of search [pps]. Type: float
599 | | ... | - max_rate - Upper limit of search [pps]. Type: float
600 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
601 | | ...
602 | | ... | *Example:*
603 | | ...
604 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
605 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
606 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
607 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
608 | | ${duration}= | Set Variable | 10
609 | | Set Duration | ${duration}
610 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
611 | | Set Search Frame Size | ${framesize}
612 | | Set Search Rate Type pps
613 | | Set Binary Convergence Threshold | ${threshold}
614 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
615 | | ${rate_per_stream} | ${latency}= | Verify Search Result
616 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
617 | | ...                          | ${latency}
618 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
619 | | ...                              | ${framesize} | ${topology_type}
620 | | ...                              | fail_on_loss=${False}
621
622 | Find PDR using binary search and pps
623 | | [Documentation]
624 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
625 | | ... | with PDR threshold and type specified by parameter.
626 | | ...
627 | | ... | *Arguments:*
628 | | ... | - framesize - L2 Frame Size [B]. Type: integer
629 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
630 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
631 | | ... | - topology_type - Topology type. Type: string
632 | | ... | - min_rate - Lower limit of search [pps]. Type: float
633 | | ... | - max_rate - Upper limit of search [pps]. Type: float
634 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
635 | | ... | - loss_acceptance - Accepted loss during search. Type: float
636 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
637 | | ...
638 | | ... | *Example:*
639 | | ...
640 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
641 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
642 | | ... | \| percentage
643 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
644 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
645 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
646 | | ${duration}= | Set Variable | 10
647 | | Set Duration | ${duration}
648 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
649 | | Set Search Frame Size | ${framesize}
650 | | Set Search Rate Type pps
651 | | Set Loss Acceptance | ${loss_acceptance}
652 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
653 | | ...            | Set Loss Acceptance Type Percentage
654 | | Set Binary Convergence Threshold | ${threshold}
655 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
656 | | ${rate_per_stream} | ${latency}= | Verify Search Result
657 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
658 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
659 | | ...                          | ${latency}
660 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
661 | | ...                                   | ${framesize} | ${topology_type}
662 | | ...                                   | ${loss_acceptance}
663 | | ...                                   | ${loss_acceptance_type}
664 | | ...                                   | fail_on_loss=${False}
665
666 | Find NDR using combined search and pps
667 | | [Documentation]
668 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
669 | | ... | non drop rate.
670 | | ...
671 | | ... | *Arguments:*
672 | | ... | - framesize - L2 Frame Size [B]. Type: integer
673 | | ... | - start_rate - Initial start rate [pps]. Type: float
674 | | ... | - step_rate - Step of linear search [pps]. Type: float
675 | | ... | - topology_type - Topology type. Type: string
676 | | ... | - min_rate - Lower limit of search [pps]. Type: float
677 | | ... | - max_rate - Upper limit of search [pps]. Type: float
678 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
679 | | ...
680 | | ... | *Example:*
681 | | ...
682 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
683 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
684 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
685 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
686 | | ${duration}= | Set Variable | 10
687 | | Set Duration | ${duration}
688 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
689 | | Set Search Linear Step | ${step_rate}
690 | | Set Search Frame Size | ${framesize}
691 | | Set Search Rate Type pps
692 | | Set Binary Convergence Threshold | ${threshold}
693 | | Combined Search | ${start_rate} | ${topology_type}
694 | | ${rate_per_stream} | ${latency}= | Verify Search Result
695 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
696 | | ...                          | ${latency}
697 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
698 | | ...                              | ${framesize} | ${topology_type}
699 | | ...                              | fail_on_loss=${False}
700
701 | Find PDR using combined search and pps
702 | | [Documentation]
703 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
704 | | ... | partial drop rate with PDR threshold and type specified by parameter.
705 | | ...
706 | | ... | *Arguments:*
707 | | ... | - framesize - L2 Frame Size [B]. Type: integer
708 | | ... | - start_rate - Initial start rate [pps]. Type: float
709 | | ... | - step_rate - Step of linear search [pps]. Type: float
710 | | ... | - topology_type - Topology type. Type: string
711 | | ... | - min_rate - Lower limit of search [pps]. Type: float
712 | | ... | - max_rate - Upper limit of search [pps]. Type: float
713 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
714 | | ... | - loss_acceptance - Accepted loss during search. Type: float
715 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
716 | | ...
717 | | ... | *Example:*
718 | | ...
719 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
720 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
721 | | ... | \| percentage
722 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
723 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
724 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
725 | | ${duration}= | Set Variable | 10
726 | | Set Duration | ${duration}
727 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
728 | | Set Search Linear Step | ${step_rate}
729 | | Set Search Frame Size | ${framesize}
730 | | Set Search Rate Type pps
731 | | Set Loss Acceptance | ${loss_acceptance}
732 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
733 | | ...            | Set Loss Acceptance Type Percentage
734 | | Set Binary Convergence Threshold | ${threshold}
735 | | Combined Search | ${start_rate} | ${topology_type}
736 | | ${rate_per_stream} | ${latency}= | Verify Search Result
737 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
738 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
739 | | ...                          | ${latency}
740 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
741 | | ...                                   | ${framesize} | ${topology_type}
742 | | ...                                   | ${loss_acceptance}
743 | | ...                                   | ${loss_acceptance_type}
744 | | ...                                   | fail_on_loss=${False}
745
746 | Display result of NDR search
747 | | [Documentation]
748 | | ... | Display result of NDR search in packet per seconds (total and per
749 | | ... | stream) and Gbps total bandwidth with untagged packet.
750 | | ... | Througput is calculated as:
751 | | ... | Measured rate per stream * Total number of streams
752 | | ... | Bandwidth is calculated as:
753 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
754 | | ...
755 | | ... | *Arguments:*
756 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
757 | | ... | - framesize - L2 Frame Size [B]. Type: integer
758 | | ... | - nr_streams - Total number of streams. Type: integer
759 | | ... | - latency - Latency stats. Type: dictionary
760 | | ...
761 | | ... | *Example:*
762 | | ...
763 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
764 | | ... | \| (0, 10/10/10) \|
765 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
766 | | ...         | ${latency}
767 | | ${framesize}= | Get Frame Size | ${framesize}
768 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
769 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
770 | | Set Test Message | FINAL_RATE: ${rate_total} pps
771 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
772 | | ...              | append=yes
773 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
774 | | ...              | append=yes
775 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
776 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
777 | | ...                | append=yes
778
779 | Display result of PDR search
780 | | [Documentation]
781 | | ... | Display result of PDR search in packet per seconds (total and per
782 | | ... | stream) and Gbps total bandwidth with untagged packet.
783 | | ... | Througput is calculated as:
784 | | ... | Measured rate per stream * Total number of streams
785 | | ... | Bandwidth is calculated as:
786 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
787 | | ...
788 | | ... | *Arguments:*
789 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
790 | | ... | - framesize - L2 Frame Size [B]. Type: integer
791 | | ... | - nr_streams - Total number of streams. Type: integer
792 | | ... | - loss_acceptance - Accepted loss during search. Type: float
793 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
794 | | ... | - latency - Latency stats. Type: dictionary
795 | | ...
796 | | ... | *Example:*
797 | | ...
798 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
799 | | ... | \| percentage \| (0, 10/10/10) \|
800 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
801 | | ...         | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
802 | | ${framesize}= | Get Frame Size | ${framesize}
803 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
804 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
805 | | Set Test Message | FINAL_RATE: ${rate_total} pps
806 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
807 | | ...              | append=yes
808 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
809 | | ...              | append=yes
810 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
811 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
812 | | ...                | append=yes
813 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
814 | | ...              | append=yes
815
816 | Traffic should pass with no loss
817 | | [Documentation]
818 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
819 | | ... | evaluation.
820 | | ...
821 | | ... | *Arguments:*
822 | | ... | - duration - Duration of traffic run [s]. Type: integer
823 | | ... | - rate - Rate for sending packets. Type: string
824 | | ... | - framesize - L2 Frame Size [B]. Type: integer
825 | | ... | - topology_type - Topology type. Type: string
826 | | ...
827 | | ... | *Example:*
828 | | ...
829 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
830 | | ... | \| 3-node-IPv4
831 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
832 | | ...         | ${fail_on_loss}=${True}
833 | | Clear and show runtime counters with running traffic | ${duration}
834 | | ...  | ${rate} | ${framesize} | ${topology_type}
835 | | Clear all counters on all DUTs
836 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
837 | | ...                | ${topology_type} | warmup_time=0
838 | | Show statistics on all DUTs
839 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
840
841 | Traffic should pass with partial loss
842 | | [Documentation]
843 | | ... | Send traffic at specified rate. Partial packet loss is accepted
844 | | ... | within loss acceptance value specified as argument.
845 | | ...
846 | | ... | *Arguments:*
847 | | ... | - duration - Duration of traffic run [s]. Type: integer
848 | | ... | - rate - Rate for sending packets. Type: string
849 | | ... | - framesize - L2 Frame Size [B]. Type: integer
850 | | ... | - topology_type - Topology type. Type: string
851 | | ... | - loss_acceptance - Accepted loss during search. Type: float
852 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
853 | | ...
854 | | ... | *Example:*
855 | | ...
856 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
857 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
858 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
859 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
860 | | ...         | ${fail_on_loss}=${True}
861 | | Clear and show runtime counters with running traffic | ${duration}
862 | | ...  | ${rate} | ${framesize} | ${topology_type}
863 | | Clear all counters on all DUTs
864 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
865 | | ...                | ${topology_type} | warmup_time=0
866 | | Show statistics on all DUTs
867 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
868 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
869
870 | Clear and show runtime counters with running traffic
871 | | [Documentation]
872 | | ... | Start traffic at specified rate then clear runtime counters on all
873 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
874 | | ... | on all DUTs. Finally stop traffic
875 | | ...
876 | | ... | *Arguments:*
877 | | ... | - duration - Duration of traffic run [s]. Type: integer
878 | | ... | - rate - Rate for sending packets. Type: string
879 | | ... | - framesize - L2 Frame Size [B]. Type: integer
880 | | ... | - topology_type - Topology type. Type: string
881 | | ...
882 | | ... | *Example:*
883 | | ...
884 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
885 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
886 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
887 | | Send traffic on tg | -1 | ${rate} | ${framesize}
888 | | ...                | ${topology_type} | warmup_time=0 | async_call=${True}
889 | | ...                | latency=${False}
890 | | Clear runtime counters on all DUTs
891 | | Sleep | ${duration}
892 | | Show runtime counters on all DUTs
893 | | Stop traffic on tg
894
895 | Add PCI devices to DUTs from 3-node single link topology
896 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
897 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
898 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
899 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
900 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
901 | | Add PCI device | ${dut2} | ${dut2_if1_pci} | ${dut2_if2_pci}