6849e9820a2c9808e91d23676fb85191e3f99f59
[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.DpdkUtil
18 | Library | resources.libraries.python.InterfaceUtil
19 | Library | resources.libraries.python.VhostUser
20 | Library | resources.libraries.python.TrafficGenerator
21 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
22 | Resource | resources/libraries/robot/default.robot
23 | Resource | resources/libraries/robot/interfaces.robot
24 | Resource | resources/libraries/robot/counters.robot
25 | Resource | resources/libraries/robot/bridge_domain.robot
26 | Resource | resources/libraries/robot/l2_xconnect.robot
27 | Resource | resources/libraries/robot/ipv4.robot
28 | Resource | resources/libraries/robot/ipv6.robot
29 | Resource | resources/libraries/robot/qemu.robot
30 | Documentation | Performance suite keywords
31
32 *** Keywords ***
33 | Setup performance rate Variables
34 | | [Documentation]
35 | | ... | Setup performance linerates as Suite Variables. Variables are used
36 | | ... | as search boundaries in RFC2544 throughput search.
37 | | ...
38 | | ... | _NOTE:_ This KW sets following suite variables:
39 | | ... | - 10Ge_linerate_pps_64B - Maximum number of packet per second
40 | | ... |                           for 10GE with 64B L2 Frame.
41 | | ... | - 10Ge_linerate_pps_68B - Maximum number of packet per second
42 | | ... |                           for 10GE with 68B L2 Frame.
43 | | ... | - 10Ge_linerate_pps_72B - Maximum number of packet per second
44 | | ... |                           for 10GE with 72B L2 Frame.
45 | | ... | - 10Ge_linerate_pps_78B - Maximum number of packet per second
46 | | ... |                           for 10GE with 78B L2 Frame.
47 | | ... | - 10Ge_linerate_pps_1518B - Maximum number of packet per second
48 | | ... |                             for 10GE with 1518B L2 Frame.
49 | | ... | - 10Ge_linerate_pps_1522B - Maximum number of packet per second
50 | | ... |                             for 10GE with 1522B L2 Frame.
51 | | ... | - 10Ge_linerate_pps_1526B - Maximum number of packet per second
52 | | ... |                             for 10GE with 1526B L2 Frame.
53 | | ... | - 10Ge_linerate_pps_9000B - Maximum number of packet per second
54 | | ... |                             for 10GE with 9000B L2 Frame.
55 | | ... | - 10Ge_linerate_pps_9004B - Maximum number of packet per second
56 | | ... |                             for 10GE with 9004B L2 Frame.
57 | | ... | - 10Ge_linerate_pps_9008B - Maximum number of packet per second
58 | | ... |                             for 10GE with 9008B L2 Frame.
59 | | ... | - 10Ge_linerate_pps_IMIX_v4_1 - Maximum number of packet per second
60 | | ... |                                 for 10GE with IMIX_v4_1 profile.
61 | | ... | - 10Ge_lisp_linerate_pps_72B - Maximum number of packets per second
62 | | ... |                                for 10GE with 72B L2 Frame, Lisp and
63 | | ... |                                IPv4 header.
64 | | ... | - 10Ge_lisp_linerate_pps_86B - Maximum number of packets per second
65 | | ... |                                for 10GE with 86B L2 Frame, Lisp and
66 | | ... |                                IPv4 header.
67 | | ... | - 10Ge_lisp_linerate_pps_1488B - Maximum number of packets per
68 | | ... |                                  second for 10GE with 1488B L2
69 | | ... |                                  Frame, Lisp and IPv6 header.
70 | | ... | - 10Ge_lisp_linerate_pps_9008B - Maximum number of packets per
71 | | ... |                                  second for 10GE with 9008B L2
72 | | ... |                                  Frame, Lisp, IPv4 or IPv6 header.
73 | | ... | - 10Ge_lisp_iph_linerate_pps_112B - Maximum number of packets per
74 | | ... |                                     second for 10GE with 112B L2
75 | | ... |                                     Frame, Lisp, IPv4 and IPv6
76 | | ... |                                     header.
77 | | ... | - 10Ge_lisp_iph_linerate_pps_126B - Maximum number of packets per
78 | | ... |                                     second for 10GE with 126B L2
79 | | ... |                                     Frame, Lisp, IPv4 and IPv6
80 | | ... |                                     header.
81 | | ... | - 10Ge_lisp_iph_linerate_pps_1508B - Maximum number of packets per
82 | | ... |                                      second for 10GE with 1508B L2
83 | | ... |                                      Frame, Lisp, IPv4 and IPv6
84 | | ... |                                      header.
85 | | ... | - 10Ge_lisp_iph_linerate_pps_9048B - Maximum number of packets per
86 | | ... |                                      second for 10GE with 9048B L2
87 | | ... |                                      Frame, Lisp, IPv4 and IPv6
88 | | ... |                                      header.
89 | | ... | - 40Ge_linerate_pps_64B - Maximum number of packet per second
90 | | ... |                           for 40GE with 64B L2 Frame.
91 | | ... | - 40Ge_linerate_pps_68B - Maximum number of packet per second
92 | | ... |                           for 40GE with 68B L2 Frame.
93 | | ... | - 40Ge_linerate_pps_72B - Maximum number of packet per second
94 | | ... |                           for 40GE with 72B L2 Frame.
95 | | ... | - 40Ge_linerate_pps_78B - Maximum number of packet per second
96 | | ... |                           for 40GE with 78B L2 Frame.
97 | | ... | - 40Ge_linerate_pps_1518B - Maximum number of packet per second
98 | | ... |                             for 40GE with 1518B L2 Frame.
99 | | ... | - 40Ge_linerate_pps_1522B - Maximum number of packet per second
100 | | ... |                             for 40GE with 1522B L2 Frame.
101 | | ... | - 40Ge_linerate_pps_1526B - Maximum number of packet per second
102 | | ... |                             for 40GE with 1526B L2 Frame.
103 | | ... | - 40Ge_linerate_pps_9000B - Maximum number of packet per second
104 | | ... |                             for 40GE with 9000B L2 Frame.
105 | | ... | - 40Ge_linerate_pps_9004B - Maximum number of packet per second
106 | | ... |                             for 40GE with 9004B L2 Frame.
107 | | ... | - 40Ge_linerate_pps_9008B - Maximum number of packet per second
108 | | ... |                             for 40GE with 9008B L2 Frame.
109 | | ... | - 40Ge_linerate_pps_IMIX_v4_1 - Maximum number of packet per second
110 | | ... |                                 for 40GE with IMIX_v4_1 profile.
111 | | ... | - 40Ge_lisp_linerate_pps_72B - Maximum number of packets per second
112 | | ... |                                for 40GE with 72B L2 Frame, Lisp and
113 | | ... |                                IPv4 header.
114 | | ... | - 40Ge_lisp_linerate_pps_86B - Maximum number of packets per second
115 | | ... |                                for 40GE with 86B L2 Frame, Lisp and
116 | | ... |                                IPv4 header.
117 | | ... | - 40Ge_lisp_linerate_pps_1488B - Maximum number of packets per
118 | | ... |                                  second for 40GE with 1488B L2
119 | | ... |                                  Frame, Lisp and IPv6 header.
120 | | ... | - 40Ge_lisp_linerate_pps_9008B - Maximum number of packets per
121 | | ... |                                  second for 40GE with 9008B L2
122 | | ... |                                  Frame, Lisp, IPv4 or IPv6 header.
123 | | ... | - 40Ge_lisp_iph_linerate_pps_112B - Maximum number of packets per
124 | | ... |                                     second for 40GE with 112B L2
125 | | ... |                                     Frame, Lisp, IPv4 and IPv6
126 | | ... |                                     header.
127 | | ... | - 40Ge_lisp_iph_linerate_pps_126B - Maximum number of packets per
128 | | ... |                                     second for 40GE with 126B L2
129 | | ... |                                     Frame, Lisp, IPv4 and IPv6
130 | | ... |                                     header.
131 | | ... | - 40Ge_lisp_iph_linerate_pps_1508B - Maximum number of packets per
132 | | ... |                                      second for 40GE with 1508B L2
133 | | ... |                                      Frame, Lisp, IPv4 and IPv6
134 | | ... |                                      header.
135 | | ... | - 40Ge_lisp_iph_linerate_pps_9048B - Maximum number of packets per
136 | | ... |                                      second for 40GE with 9048B L2
137 | | ... |                                      Frame, Lisp, IPv4 and IPv6
138 | | ... |                                      header.
139 | | ...
140 | | Set Suite Variable | ${10Ge_linerate_pps_64B} | 14880952
141 | | Set Suite Variable | ${10Ge_linerate_pps_68B} | 14204545
142 | | Set Suite Variable | ${10Ge_linerate_pps_72B} | 13586956
143 | | Set Suite Variable | ${10Ge_linerate_pps_78B} | 12755102
144 | | Set Suite Variable | ${10Ge_linerate_pps_1518B} | 812743
145 | | Set Suite Variable | ${10Ge_linerate_pps_1522B} | 810635
146 | | Set Suite Variable | ${10Ge_linerate_pps_9000B} | 138580
147 | | Set Suite Variable | ${10Ge_linerate_pps_9004B} | 138519
148 | | Set Suite Variable | ${10Ge_linerate_pps_9008B} | 138458
149 | | Set Suite Variable | ${10Ge_linerate_pps_IMIX_v4_1} | 3343736
150 | | Set Suite Variable | ${10Ge_lisp_linerate_pps_72B} | 13586956
151 | | Set Suite Variable | ${10Ge_lisp_linerate_pps_86B} | 11792452
152 | | Set Suite Variable | ${10Ge_lisp_linerate_pps_1488B} | 828912
153 | | Set Suite Variable | ${10Ge_lisp_linerate_pps_9008B} | 138458
154 | | Set Suite Variable | ${10Ge_lisp_iph_linerate_pps_112B} | 9469696
155 | | Set Suite Variable | ${10Ge_lisp_iph_linerate_pps_126B} | 8561643
156 | | Set Suite Variable | ${10Ge_lisp_iph_linerate_pps_1508B} | 818062
157 | | Set Suite Variable | ${10Ge_lisp_iph_linerate_pps_9048B} | 137847
158 | | Set Suite Variable | ${40Ge_linerate_pps_64B} | 59523809
159 | | Set Suite Variable | ${40Ge_linerate_pps_68B} | 56818181
160 | | Set Suite Variable | ${40Ge_linerate_pps_72B} | 54347826
161 | | Set Suite Variable | ${40Ge_linerate_pps_78B} | 51020408
162 | | Set Suite Variable | ${40Ge_linerate_pps_1518B} | 3250975
163 | | Set Suite Variable | ${40Ge_linerate_pps_1522B} | 3242542
164 | | Set Suite Variable | ${40Ge_linerate_pps_9000B} | 554323
165 | | Set Suite Variable | ${40Ge_linerate_pps_9004B} | 554078
166 | | Set Suite Variable | ${40Ge_linerate_pps_9008B} | 553832
167 | | Set Suite Variable | ${40Ge_linerate_pps_IMIX_v4_1} | 13374944
168 | | Set Suite Variable | ${40Ge_lisp_linerate_pps_72B} | 54347826
169 | | Set Suite Variable | ${40Ge_lisp_linerate_pps_86B} | 47169811
170 | | Set Suite Variable | ${40Ge_lisp_linerate_pps_1488B} | 3315649
171 | | Set Suite Variable | ${40Ge_lisp_linerate_pps_9008B} | 553832
172 | | Set Suite Variable | ${40Ge_lisp_iph_linerate_pps_112B} | 37878787
173 | | Set Suite Variable | ${40Ge_lisp_iph_linerate_pps_126B} | 34246575
174 | | Set Suite Variable | ${40Ge_lisp_iph_linerate_pps_1508B} | 3272251
175 | | Set Suite Variable | ${40Ge_lisp_iph_linerate_pps_9048B} | 551389
176
177 | Calculate pps
178 | | [Documentation]
179 | | ... | Calculate pps for given rate and L2 frame size,
180 | | ... | additional 20B are added to L2 frame size as padding.
181 | | ...
182 | | ... | *Arguments*
183 | | ... | - bps - Rate in bps. Type: integer
184 | | ... | - framesize - L2 frame size in Bytes. Type: integer
185 | | ...
186 | | ... | *Return*
187 | | ... | - Calculated pps. Type: integer
188 | | ...
189 | | ... | *Example:*
190 | | ...
191 | | ... | \| Calculate pps \| 10000000000 | 64
192 | | [Arguments] | ${bps} | ${framesize}
193 | | ${ret}= | Evaluate | (${bps}/((${framesize}+20)*8)).__trunc__()
194 | | Return From Keyword | ${ret}
195
196 | Get Frame Size
197 | | [Documentation]
198 | | ... | Framesize can be either integer in case of a single packet
199 | | ... | in stream, or set of packets in case of IMIX type or simmilar.
200 | | ... | This keyword returns average framesize.
201 | | ...
202 | | ... | *Arguments:*
203 | | ... | - framesize - Framesize. Type: integer or string
204 | | ...
205 | | ... | *Example:*
206 | | ...
207 | | ... | \| Get Frame Size \| IMIX_v4_1
208 | | [Arguments] | ${framesize}
209 | | Run Keyword If | '${framesize}' == 'IMIX_v4_1'
210 | | ...            | Return From Keyword | 353.83333
211 | | Return From Keyword | ${framesize}
212
213 | Setup performance global Variables
214 | | [Documentation]
215 | | ... | Setup suite Variables. Variables are used across performance testing.
216 | | ...
217 | | ... | _NOTE:_ This KW sets following suite variables:
218 | | ... | - glob_loss_acceptance - Loss acceptance treshold
219 | | ... | - glob_loss_acceptance_type - Loss acceptance treshold type
220 | | ... | - glob_vm_image - Guest VM disk image
221 | | ...
222 | | Set Suite Variable | ${glob_loss_acceptance} | 0.5
223 | | Set Suite Variable | ${glob_loss_acceptance_type} | percentage
224 | | Set Suite Variable | ${glob_vm_image} | /var/lib/vm/csit-nested-1.3.img
225
226 | 2-node circular Topology Variables Setup
227 | | [Documentation]
228 | | ... | Compute path for testing on two given nodes in circular
229 | | ... | topology and set corresponding suite variables.
230 | | ...
231 | | ... | _NOTE:_ This KW sets following suite variables:
232 | | ... | - tg - TG node
233 | | ... | - tg_if1 - 1st TG interface towards DUT.
234 | | ... | - tg_if2 - 2nd TG interface towards DUT.
235 | | ... | - dut1 - DUT1 node
236 | | ... | - dut1_if1 - 1st DUT interface towards TG.
237 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
238 | | ...
239 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
240 | | Compute Path
241 | | ${tg_if1} | ${tg}= | Next Interface
242 | | ${dut1_if1} | ${dut1}= | Next Interface
243 | | ${dut1_if2} | ${dut1}= | Next Interface
244 | | ${tg_if2} | ${tg}= | Next Interface
245 | | Set Suite Variable | ${tg}
246 | | Set Suite Variable | ${tg_if1}
247 | | Set Suite Variable | ${tg_if2}
248 | | Set Suite Variable | ${dut1}
249 | | Set Suite Variable | ${dut1_if1}
250 | | Set Suite Variable | ${dut1_if2}
251
252 | 3-node circular Topology Variables Setup
253 | | [Documentation]
254 | | ... | Compute path for testing on three given nodes in circular
255 | | ... | topology and set corresponding suite variables.
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 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
269 | | ...          | ${nodes['TG']}
270 | | Compute Path
271 | | ${tg_if1} | ${tg}= | Next Interface
272 | | ${dut1_if1} | ${dut1}= | Next Interface
273 | | ${dut1_if2} | ${dut1}= | Next Interface
274 | | ${dut2_if1} | ${dut2}= | Next Interface
275 | | ${dut2_if2} | ${dut2}= | Next Interface
276 | | ${tg_if2} | ${tg}= | Next Interface
277 | | Set Suite Variable | ${tg}
278 | | Set Suite Variable | ${tg_if1}
279 | | Set Suite Variable | ${tg_if2}
280 | | Set Suite Variable | ${dut1}
281 | | Set Suite Variable | ${dut1_if1}
282 | | Set Suite Variable | ${dut1_if2}
283 | | Set Suite Variable | ${dut2}
284 | | Set Suite Variable | ${dut2_if1}
285 | | Set Suite Variable | ${dut2_if2}
286
287 | 2-node circular Topology Variables Setup with DUT interface model
288 | | [Documentation]
289 | | ... | Compute path for testing on two given nodes in circular topology
290 | | ... | based on interface model provided as an argument and set
291 | | ... | corresponding suite variables.
292 | | ...
293 | | ... | *Arguments:*
294 | | ... | - iface_model - Interface model. Type: string
295 | | ...
296 | | ... | _NOTE:_ This KW sets following suite variables:
297 | | ... | - tg - TG node
298 | | ... | - tg_if1 - 1st TG interface towards DUT.
299 | | ... | - tg_if2 - 2nd TG interface towards DUT.
300 | | ... | - dut1 - DUT1 node
301 | | ... | - dut1_if1 - 1st DUT interface towards TG.
302 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
303 | | ...
304 | | ... | *Example:*
305 | | ...
306 | | ... | \| 2-node circular Topology Variables Setup with DUT interface model \
307 | | ... | \| Intel-X520-DA2 \|
308 | | [Arguments] | ${iface_model}
309 | | ${iface_model_list}= | Create list | ${iface_model}
310 | | Append Node | ${nodes['TG']}
311 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
312 | | Append Node | ${nodes['TG']}
313 | | Compute Path
314 | | ${tg_if1} | ${tg}= | Next Interface
315 | | ${dut1_if1} | ${dut1}= | Next Interface
316 | | ${dut1_if2} | ${dut1}= | Next Interface
317 | | ${tg_if2} | ${tg}= | Next Interface
318 | | Set Suite Variable | ${tg}
319 | | Set Suite Variable | ${tg_if1}
320 | | Set Suite Variable | ${tg_if2}
321 | | Set Suite Variable | ${dut1}
322 | | Set Suite Variable | ${dut1_if1}
323 | | Set Suite Variable | ${dut1_if2}
324
325 | 3-node circular Topology Variables Setup with DUT interface model
326 | | [Documentation]
327 | | ... | Compute path for testing on three given nodes in circular topology
328 | | ... | based on interface model provided as an argument and set
329 | | ... | corresponding suite variables.
330 | | ...
331 | | ... | *Arguments:*
332 | | ... | - iface_model - Interface model. Type: string
333 | | ...
334 | | ... | _NOTE:_ This KW sets following suite variables:
335 | | ... | - tg - TG node
336 | | ... | - tg_if1 - TG interface towards DUT1.
337 | | ... | - tg_if2 - TG interface towards DUT2.
338 | | ... | - dut1 - DUT1 node
339 | | ... | - dut1_if1 - DUT1 interface towards TG.
340 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
341 | | ... | - dut2 - DUT2 node
342 | | ... | - dut2_if1 - DUT2 interface towards TG.
343 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
344 | | ...
345 | | ... | *Example:*
346 | | ...
347 | | ... | \| 3-node circular Topology Variables Setup with DUT interface model \
348 | | ... | \| Intel-X520-DA2 \|
349 | | [Arguments] | ${iface_model}
350 | | ${iface_model_list}= | Create list | ${iface_model}
351 | | Append Node | ${nodes['TG']}
352 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
353 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
354 | | Append Node | ${nodes['TG']}
355 | | Compute Path
356 | | ${tg_if1} | ${tg}= | Next Interface
357 | | ${dut1_if1} | ${dut1}= | Next Interface
358 | | ${dut1_if2} | ${dut1}= | Next Interface
359 | | ${dut2_if1} | ${dut2}= | Next Interface
360 | | ${dut2_if2} | ${dut2}= | Next Interface
361 | | ${tg_if2} | ${tg}= | Next Interface
362 | | Set Suite Variable | ${tg}
363 | | Set Suite Variable | ${tg_if1}
364 | | Set Suite Variable | ${tg_if2}
365 | | Set Suite Variable | ${dut1}
366 | | Set Suite Variable | ${dut1_if1}
367 | | Set Suite Variable | ${dut1_if2}
368 | | Set Suite Variable | ${dut2}
369 | | Set Suite Variable | ${dut2_if1}
370 | | Set Suite Variable | ${dut2_if2}
371
372 | VPP interfaces in path are up in a 2-node circular topology
373 | | [Documentation]
374 | | ... | *Set UP state on VPP interfaces in path on nodes in 2-node circular
375 | | ... | topology.*
376 | | ...
377 | | Set Interface State | ${dut1} | ${dut1_if1} | up
378 | | Set Interface State | ${dut1} | ${dut1_if2} | up
379 | | Vpp Node Interfaces Ready Wait | ${dut1}
380
381 | VPP interfaces in path are up in a 3-node circular topology
382 | | [Documentation]
383 | | ... | *Set UP state on VPP interfaces in path on nodes in 3-node circular
384 | | ... | topology.*
385 | | ...
386 | | Set Interface State | ${dut1} | ${dut1_if1} | up
387 | | Set Interface State | ${dut1} | ${dut1_if2} | up
388 | | Set Interface State | ${dut2} | ${dut2_if1} | up
389 | | Set Interface State | ${dut2} | ${dut2_if2} | up
390 | | Vpp Node Interfaces Ready Wait | ${dut1}
391 | | Vpp Node Interfaces Ready Wait | ${dut2}
392
393 | IPv4 forwarding initialized in a 3-node circular topology
394 | | [Documentation]
395 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
396 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
397 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
398 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
399 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
400 | | ...
401 | | Set Interface State | ${dut1} | ${dut1_if1} | up
402 | | Set Interface State | ${dut1} | ${dut1_if2} | up
403 | | Set Interface State | ${dut2} | ${dut2_if1} | up
404 | | Set Interface State | ${dut2} | ${dut2_if2} | up
405 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
406 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
407 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
408 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
409 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
410 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
411 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
412 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
413 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
414 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
415 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
416 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
417 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
418 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
419 | | All Vpp Interfaces Ready Wait | ${nodes}
420
421 | Scale IPv4 forwarding initialized in a 3-node circular topology
422 | | [Documentation]
423 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
424 | | ... | DUT nodes in 3-node circular topology
425 | | ...
426 | | ... | *Arguments:*
427 | | ... | - ${count} - IP route count. Type: integer
428 | | ...
429 | | ... | *Return:*
430 | | ... | - No value returned
431 | | ...
432 | | ... | *Example:*
433 | | ...
434 | | ... | \| Scale IPv4 forwarding initialized in a 3-node circular topology \
435 | | ... | \| 100000 \|
436 | | [Arguments] | ${count}
437 | | Set Interface State | ${dut1} | ${dut1_if1} | up
438 | | Set Interface State | ${dut1} | ${dut1_if2} | up
439 | | Set Interface State | ${dut2} | ${dut2_if1} | up
440 | | Set Interface State | ${dut2} | ${dut2_if2} | up
441 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
442 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
443 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
444 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
445 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
446 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
447 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
448 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
449 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
450 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
451 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
452 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
453 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
454 | | ...           | count=${count}
455 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
456 | | ...           | count=${count}
457 | | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
458 | | ...           | count=${count}
459 | | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
460 | | ...           | count=${count}
461 | | All Vpp Interfaces Ready Wait | ${nodes}
462
463 | IPv4 forwarding with vhost initialized in a 3-node circular topology
464 | | [Documentation]
465 | | ... | Create vhost-user interfaces in VPP. Set UP state of all VPP
466 | | ... | interfaces in path on nodes in 3-node circular topology. Create 2
467 | | ... | FIB tables on each DUT with multipath routing. Assign pair of
468 | | ... | Physical and Virtual interfaces on both nodes to each FIB table.
469 | | ... | Setup IPv4 addresses with /30 prefix on DUT-TG links and /30 prefix
470 | | ... | on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB tables
471 | | ... | with prefix /24 and next hop of neighbour IPv4 address. Setup
472 | | ... | ARP on all VPP interfaces.
473 | | ...
474 | | ... | *Arguments:*
475 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
476 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
477 | | ...
478 | | ... | *Return:*
479 | | ... | - No value returned
480 | | ...
481 | | ... | *Example:*
482 | | ...
483 | | ... | \| IPv4 forwarding with vhost initialized in a 3-node circular \
484 | | ... | topology \| /tmp/sock1 \| /tmp/sock2 \|
485 | | [Arguments] | ${sock1} | ${sock2}
486 | | VPP interfaces in path are up in a 3-node circular topology
487 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
488 | | ...                                                | ${sock1}
489 | | ...                                                | ${sock2}
490 | | ${dut1_vif1}= | Set Variable | ${vhost_if1}
491 | | ${dut1_vif2}= | Set Variable | ${vhost_if2}
492 | | Set Interface State | ${dut1} | ${dut1_vif1} | up
493 | | Set Interface State | ${dut1} | ${dut1_vif2} | up
494 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
495 | | ...                                                | ${sock1}
496 | | ...                                                | ${sock2}
497 | | ${dut2_vif1}= | Set Variable | ${vhost_if1}
498 | | ${dut2_vif2}= | Set Variable | ${vhost_if2}
499 | | Set Interface State | ${dut2} | ${dut2_vif1} | up
500 | | Set Interface State | ${dut2} | ${dut2_vif2} | up
501 | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif1}
502 | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif2}
503 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
504 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
505 | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif1}
506 | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif2}
507 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
508 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
509 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
510 | | ... | via 4.4.4.2 sw_if_index ${dut1_vif1_idx} multipath
511 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
512 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
513 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
514 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
515 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
516 | | ... | via 5.5.5.2 sw_if_index ${dut1_vif2_idx} multipath
517 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
518 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
519 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
520 | | ... | via 4.4.4.1 sw_if_index ${dut2_vif1_idx} multipath
521 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
522 | | ... | via 5.5.5.2 sw_if_index ${dut2_vif2_idx} multipath
523 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
524 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
525 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
526 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif1} | ${fib_table_1}
527 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
528 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif2} | ${fib_table_2}
529 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
530 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif1} | ${fib_table_1}
531 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
532 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif2} | ${fib_table_2}
533 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
534 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
535 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif1} | 4.4.4.1 | 30
536 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif2} | 5.5.5.1 | 30
537 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
538 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
539 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif1} | 4.4.4.1 | 30
540 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif2} | 5.5.5.1 | 30
541 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
542 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
543 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
544 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
545 | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
546 | | ... | ${dut1_vif1_idx}
547 | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
548 | | ... | ${dut1_vif2_idx}
549 | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
550 | | ... | ${dut2_vif1_idx}
551 | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
552 | | ... | ${dut2_vif2_idx}
553 | | Set Test Variable | ${dut1_vif1_mac}
554 | | Set Test Variable | ${dut1_vif2_mac}
555 | | Set Test Variable | ${dut2_vif1_mac}
556 | | Set Test Variable | ${dut2_vif2_mac}
557 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
558 | | ... | vrf=${fib_table_1}
559 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
560 | | ... | vrf=${fib_table_2}
561 | | Add arp on dut | ${dut1} | ${dut1_vif1} | 4.4.4.2 | 52:54:00:00:04:01
562 | | ... | vrf=${fib_table_1}
563 | | Add arp on dut | ${dut1} | ${dut1_vif2} | 5.5.5.2 | 52:54:00:00:04:02
564 | | ... | vrf=${fib_table_2}
565 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
566 | | ... | vrf=${fib_table_1}
567 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
568 | | ... | vrf=${fib_table_2}
569 | | Add arp on dut | ${dut2} | ${dut2_vif1} | 4.4.4.2 | 52:54:00:00:04:01
570 | | ... | vrf=${fib_table_1}
571 | | Add arp on dut | ${dut2} | ${dut2_vif2} | 5.5.5.2 | 52:54:00:00:04:02
572 | | ... | vrf=${fib_table_2}
573 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut1_vif1}
574 | | ... | vrf=${fib_table_1}
575 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
576 | | ... | vrf=${fib_table_1}
577 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
578 | | ... | vrf=${fib_table_2}
579 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut1_vif2}
580 | | ... | vrf=${fib_table_2}
581 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut2_vif1}
582 | | ... | vrf=${fib_table_1}
583 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
584 | | ... | vrf=${fib_table_1}
585 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
586 | | ... | vrf=${fib_table_2}
587 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut2_vif2}
588 | | ... | vrf=${fib_table_2}
589
590 | IPv6 forwarding initialized in a 3-node circular topology
591 | | [Documentation]
592 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
593 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
594 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
595 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
596 | | ... | next hop of neighbour DUT interface IPv6 address.
597 | | ...
598 | | ${prefix}= | Set Variable | 64
599 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
600 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
601 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
602 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
603 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
604 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
605 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
606 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
607 | | Vpp nodes ra suppress link layer | ${nodes}
608 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
609 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
610 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
611 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
612 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
613 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
614
615 | Scale IPv6 forwarding initialized in a 3-node circular topology
616 | | [Documentation]
617 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
618 | | ... | DUT nodes in 3-node circular topology
619 | | ...
620 | | ... | *Arguments:*
621 | | ... | - ${count} - IP route count. Type: integer
622 | | ...
623 | | ... | *Return:*
624 | | ... | - No value returned
625 | | ...
626 | | ... | *Example:*
627 | | ...
628 | | ... | \| Scale IPv6 forwarding initialized in a 3-node circular topology \
629 | | ... | \| 100000 \|
630 | | [Arguments] | ${count}
631 | | ${subn_prefix}= | Set Variable | 64
632 | | ${host_prefix}= | Set Variable | 128
633 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
634 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
635 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
636 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
637 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
638 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
639 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
640 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
641 | | Vpp nodes ra suppress link layer | ${nodes}
642 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
643 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
644 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
645 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
646 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
647 | | ...           | interface=${dut1_if2} | count=${count}
648 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
649 | | ...           | interface=${dut1_if1} | count=${count}
650 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
651 | | ...           | interface=${dut2_if2} | count=${count}
652 | | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
653 | | ...           | interface=${dut2_if1} | count=${count}
654
655 | IPv6 iAcl whitelist initialized in a 3-node circular topology
656 | | [Documentation]
657 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
658 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
659 | | ...
660 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
661 | | ... | ${dut1} | ip6 | dst
662 | | And Vpp Configures Classify Session L3
663 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
664 | | ... | ip6 | dst | 2001:2::2
665 | | And Vpp Enable Input Acl Interface
666 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
667 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
668 | | ... | ${dut2} | ip6 | dst
669 | | And Vpp Configures Classify Session L3
670 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
671 | | ... | ip6 | dst | 2001:1::2
672 | | And Vpp Enable Input Acl Interface
673 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
674
675 | L2 xconnect initialized in a 3-node circular topology
676 | | [Documentation]
677 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
678 | | ... | each DUT. Interfaces are brought up.
679 | | ... |
680 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
681 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
682 | | All Vpp Interfaces Ready Wait | ${nodes}
683
684 | L2 bridge domain initialized in a 3-node circular topology
685 | | [Documentation]
686 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
687 | | ... | that is created automatically with index 1. Learning is enabled.
688 | | ... | Interfaces are brought up.
689 | | ... |
690 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
691 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
692 | | All Vpp Interfaces Ready Wait | ${nodes}
693
694 2-node Performance Suite Setup with DUT's NIC model
695 | | [Documentation]
696 | | ... | Suite preparation phase that setup default startup configuration of
697 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
698 | | ... | variables used in test cases based on interface model provided as an
699 | | ... | argument. Initializes traffic generator.
700 | | ...
701 | | ... | *Arguments:*
702 | | ... | - topology_type - Topology type. Type: string
703 | | ... | - nic_model - Interface model. Type: string
704 | | ...
705 | | ... | *Example:*
706 | | ...
707 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
708 | | [Arguments] | ${topology_type} | ${nic_model}
709 | | Setup default startup configuration of VPP on all DUTs
710 | | Show vpp version on all DUTs
711 | | Setup performance rate Variables
712 | | Setup performance global Variables
713 | | 2-node circular Topology Variables Setup with DUT interface model
714 | | ... | ${nic_model}
715 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
716 | | ...                          | ${dut1} | ${dut1_if1}
717 | | ...                          | ${dut1} | ${dut1_if2}
718 | | ...                          | ${topology_type}
719
720 3-node Performance Suite Setup with DUT's NIC model
721 | | [Documentation]
722 | | ... | Suite preparation phase that setup default startup configuration of
723 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
724 | | ... | variables used in test cases based on interface model provided as an
725 | | ... | argument. Initializes traffic generator.
726 | | ...
727 | | ... | *Arguments:*
728 | | ... | - topology_type - Topology type. Type: string
729 | | ... | - nic_model - Interface model. Type: string
730 | | ...
731 | | ... | *Example:*
732 | | ...
733 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
734 | | [Arguments] | ${topology_type} | ${nic_model}
735 | | Setup default startup configuration of VPP on all DUTs
736 | | Show vpp version on all DUTs
737 | | Setup performance rate Variables
738 | | Setup performance global Variables
739 | | 3-node circular Topology Variables Setup with DUT interface model
740 | | ... | ${nic_model}
741 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
742 | | ...                          | ${dut1} | ${dut1_if1}
743 | | ...                          | ${dut2} | ${dut2_if2}
744 | | ...                          | ${topology_type}
745
746 | 3-node Performance Suite Teardown
747 | | [Documentation]
748 | | ... | Suite teardown phase with traffic generator teardown.
749 | | ...
750 | | Teardown traffic generator | ${tg}
751
752 | Find NDR using linear search and pps
753 | | [Documentation]
754 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
755 | | ...
756 | | ... | *Arguments:*
757 | | ... | - framesize - L2 Frame Size [B]. Type: integer
758 | | ... | - start_rate - Initial start rate [pps]. Type: float
759 | | ... | - step_rate - Step of linear search [pps]. Type: float
760 | | ... | - topology_type - Topology type. Type: string
761 | | ... | - min_rate - Lower limit of search [pps]. Type: float
762 | | ... | - max_rate - Upper limit of search [pps]. Type: float
763 | | ...
764 | | ... | *Return:*
765 | | ... | - No value returned
766 | | ...
767 | | ... | *Example:*
768 | | ...
769 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \| \
770 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952
771 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
772 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
773 | | ${duration}= | Set Variable | 10
774 | | Set Duration | ${duration}
775 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
776 | | Set Search Linear Step | ${step_rate}
777 | | Set Search Frame Size | ${framesize}
778 | | Set Search Rate Type pps
779 | | Linear Search | ${start_rate} | ${topology_type}
780 | | ${rate_per_stream} | ${latency}= | Verify Search Result
781 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
782 | | ...                          | ${latency}
783 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
784 | | ...                              | ${framesize} | ${topology_type}
785 | | ...                              | fail_on_loss=${False}
786
787 | Find PDR using linear search and pps
788 | | [Documentation]
789 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
790 | | ... | with PDR threshold and type specified by parameter.
791 | | ...
792 | | ... | *Arguments:*
793 | | ... | - framesize - L2 Frame Size [B]. Type: integer
794 | | ... | - start_rate - Initial start rate [pps]. Type: float
795 | | ... | - step_rate - Step of linear search [pps]. Type: float
796 | | ... | - topology_type - Topology type. Type: string
797 | | ... | - min_rate - Lower limit of search [pps]. Type: float
798 | | ... | - max_rate - Upper limit of search [pps]. Type: float
799 | | ... | - loss_acceptance - Accepted loss during search. Type: float
800 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
801 | | ...
802 | | ... | *Example:*
803 | | ...
804 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
805 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage
806 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
807 | | ...         | ${topology_type} | ${min_rate} | ${max_rate}
808 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
809 | | ${duration}= | Set Variable | 10
810 | | Set Duration | ${duration}
811 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
812 | | Set Search Linear Step | ${step_rate}
813 | | Set Search Frame Size | ${framesize}
814 | | Set Search Rate Type pps
815 | | Set Loss Acceptance | ${loss_acceptance}
816 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
817 | | ...            | Set Loss Acceptance Type Percentage
818 | | Linear Search | ${start_rate} | ${topology_type}
819 | | ${rate_per_stream} | ${latency}= | Verify Search Result
820 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
821 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
822 | | ...                          | ${latency}
823 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
824 | | ...                                   | ${framesize} | ${topology_type}
825 | | ...                                   | ${loss_acceptance}
826 | | ...                                   | ${loss_acceptance_type}
827 | | ...                                   | fail_on_loss=${False}
828
829 | Find NDR using binary search and pps
830 | | [Documentation]
831 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
832 | | ...
833 | | ... | *Arguments:*
834 | | ... | - framesize - L2 Frame Size [B]. Type: integer
835 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
836 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
837 | | ... | - topology_type - Topology type. Type: string
838 | | ... | - min_rate - Lower limit of search [pps]. Type: float
839 | | ... | - max_rate - Upper limit of search [pps]. Type: float
840 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
841 | | ...
842 | | ... | *Example:*
843 | | ...
844 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
845 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000
846 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
847 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
848 | | ${duration}= | Set Variable | 10
849 | | Set Duration | ${duration}
850 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
851 | | Set Search Frame Size | ${framesize}
852 | | Set Search Rate Type pps
853 | | Set Binary Convergence Threshold | ${threshold}
854 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
855 | | ${rate_per_stream} | ${latency}= | Verify Search Result
856 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
857 | | ...                          | ${latency}
858 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
859 | | ...                              | ${framesize} | ${topology_type}
860 | | ...                              | fail_on_loss=${False}
861
862 | Find PDR using binary search and pps
863 | | [Documentation]
864 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
865 | | ... | with PDR threshold and type specified by parameter.
866 | | ...
867 | | ... | *Arguments:*
868 | | ... | - framesize - L2 Frame Size [B]. Type: integer
869 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
870 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
871 | | ... | - topology_type - Topology type. Type: string
872 | | ... | - min_rate - Lower limit of search [pps]. Type: float
873 | | ... | - max_rate - Upper limit of search [pps]. Type: float
874 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
875 | | ... | - loss_acceptance - Accepted loss during search. Type: float
876 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
877 | | ...
878 | | ... | *Example:*
879 | | ...
880 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
881 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
882 | | ... | \| percentage
883 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
884 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
885 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
886 | | ${duration}= | Set Variable | 10
887 | | Set Duration | ${duration}
888 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
889 | | Set Search Frame Size | ${framesize}
890 | | Set Search Rate Type pps
891 | | Set Loss Acceptance | ${loss_acceptance}
892 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
893 | | ...            | Set Loss Acceptance Type Percentage
894 | | Set Binary Convergence Threshold | ${threshold}
895 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
896 | | ${rate_per_stream} | ${latency}= | Verify Search Result
897 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
898 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
899 | | ...                          | ${latency}
900 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
901 | | ...                                   | ${framesize} | ${topology_type}
902 | | ...                                   | ${loss_acceptance}
903 | | ...                                   | ${loss_acceptance_type}
904 | | ...                                   | fail_on_loss=${False}
905
906 | Find NDR using combined search and pps
907 | | [Documentation]
908 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
909 | | ... | non drop rate.
910 | | ...
911 | | ... | *Arguments:*
912 | | ... | - framesize - L2 Frame Size [B]. Type: integer
913 | | ... | - start_rate - Initial start rate [pps]. Type: float
914 | | ... | - step_rate - Step of linear search [pps]. Type: float
915 | | ... | - topology_type - Topology type. Type: string
916 | | ... | - min_rate - Lower limit of search [pps]. Type: float
917 | | ... | - max_rate - Upper limit of search [pps]. Type: float
918 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
919 | | ...
920 | | ... | *Example:*
921 | | ...
922 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
923 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000
924 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
925 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
926 | | ${duration}= | Set Variable | 10
927 | | Set Duration | ${duration}
928 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
929 | | Set Search Linear Step | ${step_rate}
930 | | Set Search Frame Size | ${framesize}
931 | | Set Search Rate Type pps
932 | | Set Binary Convergence Threshold | ${threshold}
933 | | Combined Search | ${start_rate} | ${topology_type}
934 | | ${rate_per_stream} | ${latency}= | Verify Search Result
935 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
936 | | ...                          | ${latency}
937 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
938 | | ...                              | ${framesize} | ${topology_type}
939 | | ...                              | fail_on_loss=${False}
940
941 | Find PDR using combined search and pps
942 | | [Documentation]
943 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
944 | | ... | partial drop rate with PDR threshold and type specified by parameter.
945 | | ...
946 | | ... | *Arguments:*
947 | | ... | - framesize - L2 Frame Size [B]. Type: integer
948 | | ... | - start_rate - Initial start rate [pps]. Type: float
949 | | ... | - step_rate - Step of linear search [pps]. Type: float
950 | | ... | - topology_type - Topology type. Type: string
951 | | ... | - min_rate - Lower limit of search [pps]. Type: float
952 | | ... | - max_rate - Upper limit of search [pps]. Type: float
953 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
954 | | ... | - loss_acceptance - Accepted loss during search. Type: float
955 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
956 | | ...
957 | | ... | *Example:*
958 | | ...
959 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
960 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
961 | | ... | \| percentage
962 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
963 | | ...         | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
964 | | ...         | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
965 | | ${duration}= | Set Variable | 10
966 | | Set Duration | ${duration}
967 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
968 | | Set Search Linear Step | ${step_rate}
969 | | Set Search Frame Size | ${framesize}
970 | | Set Search Rate Type pps
971 | | Set Loss Acceptance | ${loss_acceptance}
972 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
973 | | ...            | Set Loss Acceptance Type Percentage
974 | | Set Binary Convergence Threshold | ${threshold}
975 | | Combined Search | ${start_rate} | ${topology_type}
976 | | ${rate_per_stream} | ${latency}= | Verify Search Result
977 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
978 | | ...                          | ${loss_acceptance} | ${loss_acceptance_type}
979 | | ...                          | ${latency}
980 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
981 | | ...                                   | ${framesize} | ${topology_type}
982 | | ...                                   | ${loss_acceptance}
983 | | ...                                   | ${loss_acceptance_type}
984 | | ...                                   | fail_on_loss=${False}
985
986 | Display result of NDR search
987 | | [Documentation]
988 | | ... | Display result of NDR search in packet per seconds (total and per
989 | | ... | stream) and Gbps total bandwidth with untagged packet.
990 | | ... | Througput is calculated as:
991 | | ... | Measured rate per stream * Total number of streams
992 | | ... | Bandwidth is calculated as:
993 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
994 | | ...
995 | | ... | *Arguments:*
996 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
997 | | ... | - framesize - L2 Frame Size [B]. Type: integer
998 | | ... | - nr_streams - Total number of streams. Type: integer
999 | | ... | - latency - Latency stats. Type: dictionary
1000 | | ...
1001 | | ... | *Example:*
1002 | | ...
1003 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
1004 | | ... | \| (0, 10/10/10) \|
1005 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
1006 | | ...         | ${latency}
1007 | | ${framesize}= | Get Frame Size | ${framesize}
1008 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1009 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1010 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1011 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
1012 | | ...              | append=yes
1013 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1014 | | ...              | append=yes
1015 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
1016 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
1017 | | ...                | append=yes
1018
1019 | Display result of PDR search
1020 | | [Documentation]
1021 | | ... | Display result of PDR search in packet per seconds (total and per
1022 | | ... | stream) and Gbps total bandwidth with untagged packet.
1023 | | ... | Througput is calculated as:
1024 | | ... | Measured rate per stream * Total number of streams
1025 | | ... | Bandwidth is calculated as:
1026 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1027 | | ...
1028 | | ... | *Arguments:*
1029 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1030 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1031 | | ... | - nr_streams - Total number of streams. Type: integer
1032 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1033 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1034 | | ... | - latency - Latency stats. Type: dictionary
1035 | | ...
1036 | | ... | *Example:*
1037 | | ...
1038 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
1039 | | ... | \| percentage \| (0, 10/10/10) \|
1040 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
1041 | | ...         | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1042 | | ${framesize}= | Get Frame Size | ${framesize}
1043 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1044 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1045 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1046 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps)
1047 | | ...              | append=yes
1048 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1049 | | ...              | append=yes
1050 | | :FOR | ${idx} | ${lat} | IN ENUMERATE | @{latency}
1051 | | | Set Test Message | ${\n}LATENCY_STREAM_${idx}: ${lat} usec (min/avg/max)
1052 | | ...                | append=yes
1053 | | Set Test Message | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
1054 | | ...              | append=yes
1055
1056 | Traffic should pass with no loss
1057 | | [Documentation]
1058 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
1059 | | ... | evaluation.
1060 | | ...
1061 | | ... | *Arguments:*
1062 | | ... | - duration - Duration of traffic run [s]. Type: integer
1063 | | ... | - rate - Rate for sending packets. Type: string
1064 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1065 | | ... | - topology_type - Topology type. Type: string
1066 | | ...
1067 | | ... | *Example:*
1068 | | ...
1069 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
1070 | | ... | \| 3-node-IPv4
1071 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1072 | | ...         | ${fail_on_loss}=${True}
1073 | | Clear and show runtime counters with running traffic | ${duration}
1074 | | ...  | ${rate} | ${framesize} | ${topology_type}
1075 | | Clear all counters on all DUTs
1076 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1077 | | ...                | ${topology_type} | warmup_time=0
1078 | | Show statistics on all DUTs
1079 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
1080
1081 | Traffic should pass with partial loss
1082 | | [Documentation]
1083 | | ... | Send traffic at specified rate. Partial packet loss is accepted
1084 | | ... | within loss acceptance value specified as argument.
1085 | | ...
1086 | | ... | *Arguments:*
1087 | | ... | - duration - Duration of traffic run [s]. Type: integer
1088 | | ... | - rate - Rate for sending packets. Type: string
1089 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1090 | | ... | - topology_type - Topology type. Type: string
1091 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1092 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1093 | | ...
1094 | | ... | *Example:*
1095 | | ...
1096 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1097 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
1098 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1099 | | ...         | ${loss_acceptance} | ${loss_acceptance_type}
1100 | | ...         | ${fail_on_loss}=${True}
1101 | | Clear and show runtime counters with running traffic | ${duration}
1102 | | ...  | ${rate} | ${framesize} | ${topology_type}
1103 | | Clear all counters on all DUTs
1104 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1105 | | ...                | ${topology_type} | warmup_time=0
1106 | | Show statistics on all DUTs
1107 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
1108 | | ...            | ${loss_acceptance} | ${loss_acceptance_type}
1109
1110 | Clear and show runtime counters with running traffic
1111 | | [Documentation]
1112 | | ... | Start traffic at specified rate then clear runtime counters on all
1113 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
1114 | | ... | on all DUTs. Finally stop traffic
1115 | | ...
1116 | | ... | *Arguments:*
1117 | | ... | - duration - Duration of traffic run [s]. Type: integer
1118 | | ... | - rate - Rate for sending packets. Type: string
1119 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1120 | | ... | - topology_type - Topology type. Type: string
1121 | | ...
1122 | | ... | *Example:*
1123 | | ...
1124 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1125 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage
1126 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1127 | | Send traffic on tg | -1 | ${rate} | ${framesize}
1128 | | ...                | ${topology_type} | warmup_time=0 | async_call=${True}
1129 | | ...                | latency=${False}
1130 | | Clear runtime counters on all DUTs
1131 | | Sleep | ${duration}
1132 | | Show runtime counters on all DUTs
1133 | | Stop traffic on tg
1134
1135 | Add PCI devices to DUTs from 3-node single link topology
1136 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1137 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1138 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
1139 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
1140 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
1141 | | Add PCI device | ${dut2} | ${dut2_if1_pci} | ${dut2_if2_pci}
1142
1143 | Guest VM with dpdk-testpmd connected via vhost-user is setup
1144 | | [Documentation]
1145 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1146 | | ... | DPDK testpmd. Qemu Guest is using 3 cores pinned to physical cores 5,
1147 | | ... | 6, 7 and 2048M. Testpmd is using 3 cores (1 main core and 2 cores
1148 | | ... | dedicated to io) socket-mem=1024, mem-channel=4, txq/rxq=2048,
1149 | | ... | burst=64, disable-hw-vlan, total-num-mbufs, driver
1150 | | ... | usr/lib/librte_pmd_virtio.so.
1151 | | ...
1152 | | ... | *Arguments:*
1153 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1154 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1155 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1156 | | ... | - vm_name - QemuUtil instance name. Type: string
1157 | | ...
1158 | | ... | *Example:*
1159 | | ...
1160 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1161 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \|
1162 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1163 | | Import Library | resources.libraries.python.QemuUtils
1164 | | ...            | WITH NAME | ${vm_name}
1165 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1166 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1167 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1168 | | Run keyword | ${vm_name}.Qemu Set Smp | 3 | 3 | 1 | 1
1169 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1170 | | Run keyword | ${vm_name}.Qemu Set Huge Allocate
1171 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1172 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1173 | | Run keyword | ${vm_name}.Qemu Set Affinity | 5 | 6 | 7
1174 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x7
1175 | | ...                | eal_mem_channels=4
1176 | | ...                | eal_socket_mem=1024
1177 | | ...                | pmd_fwd_mode=io
1178 | | ...                | pmd_disable_hw_vlan=${True}
1179 | | Return From Keyword | ${vm}
1180
1181 | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1182 | | [Documentation]
1183 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1184 | | ... | DPDK testpmd. Qemu Guest is using 3 cores pinned to physical cores 5,
1185 | | ... | 6, 7 and 2048M. Testpmd is using 3 cores (1 main core and 2 cores
1186 | | ... | dedicated to io) socket-mem=1024, mem-channel=4, txq/rxq=2048,
1187 | | ... | burst=64, disable-hw-vlan, total-num-mbufs=65K, driver
1188 | | ... | usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1189 | | ...
1190 | | ... | *Arguments:*
1191 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1192 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1193 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1194 | | ... | - vm_name - QemuUtil instance name. Type: string
1195 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1196 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1197 | | ...
1198 | | ... | *Example:*
1199 | | ...
1200 | | ... | \| Guest VM with dpdk-testpmd for Vhost L2BD forwarding is setup \
1201 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1202 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \|
1203 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1204 | | ...         | ${eth0_mac} | ${eth1_mac}
1205 | | Import Library | resources.libraries.python.QemuUtils
1206 | | ...            | WITH NAME | ${vm_name}
1207 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1208 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1209 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1210 | | Run keyword | ${vm_name}.Qemu Set Smp | 3 | 3 | 1 | 1
1211 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1212 | | Run keyword | ${vm_name}.Qemu Set Huge Allocate
1213 | | Run keyword | ${vm_name}.Qemu Set Disk Image
1214 | | ...         | /var/lib/vm/csit-nested-1.3.img
1215 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1216 | | Run keyword | ${vm_name}.Qemu Set Affinity | 5 | 6 | 7
1217 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x7
1218 | | ...                | eal_mem_channels=4
1219 | | ...                | eal_socket_mem=1024
1220 | | ...                | pmd_fwd_mode=mac
1221 | | ...                | pmd_eth_peer_0=0,${eth0_mac}
1222 | | ...                | pmd_eth_peer_1=1,${eth1_mac}
1223 | | ...                | pmd_disable_hw_vlan=${True}
1224 | | Return From Keyword | ${vm}
1225
1226 | Guest VM with Linux Bridge connected via vhost-user is setup
1227 | | [Documentation]
1228 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1229 | | ... | linux bridge. Qemu Guest is using 3 cores pinned to physical cores 5,
1230 | | ... | 6, 7 and 2048M.
1231 | | ...
1232 | | ... | *Arguments:*
1233 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1234 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1235 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1236 | | ... | - vm_name - QemuUtil instance name. Type: string
1237 | | ...
1238 | | ... | *Example:*
1239 | | ...
1240 | | ... | \| Guest VM with Linux Bridge connected via vhost-user is setup \
1241 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \|
1242 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1243 | | Import Library | resources.libraries.python.QemuUtils
1244 | | ...            | WITH NAME | ${vm_name}
1245 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1246 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1247 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1248 | | Run keyword | ${vm_name}.Qemu Set Smp | 3 | 3 | 1 | 1
1249 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1250 | | Run keyword | ${vm_name}.Qemu Set Huge Allocate
1251 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1252 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1253 | | Run keyword | ${vm_name}.Qemu Set Affinity | 5 | 6 | 7
1254 | | ${br}= | Set Variable | br0
1255 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1256 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1257 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1258 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1259 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1260 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1261 | | Return From Keyword | ${vm}
1262
1263 | Guest VM with dpdk-testpmd Teardown
1264 | | [Documentation]
1265 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
1266 | | ... | Argument is dictionary of all qemu nodes running with its names.
1267 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
1268 | | ... |
1269 | | ... | *Arguments:*
1270 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1271 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1272 | | ...
1273 | | ... | *Example:*
1274 | | ...
1275 | | ... | \| Guest VM with dpdk-testpmd Teardown \| ${node['DUT1']} \
1276 | | ... | \| ${dut_vm_refs} \|
1277 | | ...
1278 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1279 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1280 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1281 | | | Dpdk Testpmd Stop | ${vm}
1282 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1283 | | | Run Keyword | ${vm_name}.Qemu Kill
1284 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1285
1286 | Guest VM Teardown
1287 | | [Documentation]
1288 | | ... | Stop all qemu processes running on ${dut_node}.
1289 | | ... | Argument is dictionary of all qemu nodes running with its names.
1290 | | ... |
1291 | | ... | *Arguments:*
1292 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1293 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1294 | | ...
1295 | | ... | *Example:*
1296 | | ...
1297 | | ... | \| Guest VM Teardown \| ${node['DUT1']} \
1298 | | ... | \| ${dut_vm_refs} \|
1299 | | ...
1300 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1301 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1302 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1303 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1304 | | | Run Keyword | ${vm_name}.Qemu Kill
1305 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1306
1307 | Lisp IPv4 forwarding initialized in a 3-node circular topology
1308 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1309 | | ...             | Don`t set route.
1310 | | ...
1311 | | ... | *Arguments:*
1312 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1313 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1314 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1315 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1316 | | ... | -${duts_prefix} - ip prefix. Type: int
1317 | | ...
1318 | | ... | *Return:*
1319 | | ... | - No value returned
1320 | | ...
1321 | | ... | *Example:*
1322 | | ... | \| Lisp IPv4 forwarding initialized in a 3-node circular topology \
1323 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1324 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1325 | | ...
1326 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1327 | | ...         | ${dut2_dut1_address} | ${dut2_tg_address}
1328 | | ...         | ${duts_prefix}
1329 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1330 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1331 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1332 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1333 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1334 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1335 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1336 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1337 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1338 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1339 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1340 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1341 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_address} | ${duts_prefix}
1342 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_address} | ${duts_prefix}
1343 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_address} | ${duts_prefix}
1344 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_address} | ${duts_prefix}
1345 | | All Vpp Interfaces Ready Wait | ${nodes}
1346
1347 | Lisp IPv6 forwarding initialized in a 3-node circular topology
1348 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1349 | | ...             | Don`t set route.
1350 | | ...
1351 | | ... | *Arguments:*
1352 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1353 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1354 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1355 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1356 | | ... | -${duts_prefix} - ip prefix. Type: int
1357 | | ...
1358 | | ... | *Return:*
1359 | | ... | - No value returned
1360 | | ...
1361 | | ... | *Example:*
1362 | | ... | \| Lisp IPv6 forwarding initialized in a 3-node circular topology \
1363 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1364 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1365 | | ...
1366 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1367 | | ...         | ${dut2_dut1_address} | ${dut2_tg_address}
1368 | | ...         | ${prefix}
1369 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1370 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1371 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1372 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1373 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
1374 | | ...                  | ${prefix}
1375 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
1376 | | ...                  | ${prefix}
1377 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
1378 | | ...                  | ${prefix}
1379 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
1380 | | ...                  | ${prefix}
1381 | | Vpp nodes ra suppress link layer | ${nodes}
1382 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2
1383 | | ...             | ${tg1_if1_mac}
1384 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2
1385 | | ...             | ${tg1_if2_mac}
1386 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
1387 | | ...             | ${dut2_if1_mac}
1388 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
1389 | | ...             | ${dut1_if2_mac}
1390
1391 | Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular topology
1392 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1393 | | ...             | Don`t set route.
1394 | | ...
1395 | | ... | *Arguments:*
1396 | | ... | -${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
1397 | | ... |                             Type: string
1398 | | ... | -${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1399 | | ... | -${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
1400 | | ... |                             Type: string
1401 | | ... | -${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1402 | | ... | -${prefix4} - IPv4 prefix. Type: int
1403 | | ... | -${prefix6} - IPv6 prefix. Type: int
1404 | | ...
1405 | | ... | *Return:*
1406 | | ... | - No value returned
1407 | | ...
1408 | | ... | *Example:*
1409 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular topology \
1410 | | ... | \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1411 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1412 | | ... | \| ${prefix4} \| ${prefix6} \|
1413 | | ...
1414 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1415 | | ...         | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1416 | | ...         | ${prefix4} | ${prefix6}
1417 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1418 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1419 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1420 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1421 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1422 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1423 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1424 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1425 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_ip4_address} | ${prefix4}
1426 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
1427 | | ...                  | ${prefix6}
1428 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
1429 | | ...                  | ${prefix6}
1430 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_ip4_address} | ${prefix4}
1431 | | Vpp nodes ra suppress link layer | ${nodes}
1432 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1433 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1434 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
1435 | | ...             | ${dut2_if1_mac}
1436 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
1437 | | ...             | ${dut1_if2_mac}
1438
1439 | Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular topology
1440 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1441 | | ...             | Don`t set route.
1442 | | ...
1443 | | ... | *Arguments:*
1444 | | ... | -${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
1445 | | ... |                             Type: string
1446 | | ... | -${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1447 | | ... | -${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
1448 | | ... |                             Type: string
1449 | | ... | -${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1450 | | ... | -${prefix4} - IPv4 prefix. Type: int
1451 | | ... | -${prefix6} - IPv6 prefix. Type: int
1452 | | ...
1453 | | ... | *Return:*
1454 | | ... | - No value returned
1455 | | ...
1456 | | ... | *Example:*
1457 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular topology \
1458 | | ... | \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1459 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1460 | | ... | \| ${prefix4} \| ${prefix6} \|
1461 | | ...
1462 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1463 | | ...         | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1464 | | ...         | ${prefix4} | ${prefix6}
1465 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1466 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1467 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1468 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1469 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1470 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1471 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1472 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1473 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
1474 | | ...                  | ${prefix6}
1475 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1476 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1477 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
1478 | | ...                  | ${prefix6}
1479 | | Vpp nodes ra suppress link layer | ${nodes}
1480 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1481 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1482 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1483 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1484