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