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