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