CSIT-547: Add x520 L2BD perf test with 2 VMs per DUT
[csit.git] / resources / libraries / robot / performance.robot
1 # Copyright (c) 2017 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 | Collections
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.DpdkUtil
19 | Library | resources.libraries.python.InterfaceUtil
20 | Library | resources.libraries.python.VhostUser
21 | Library | resources.libraries.python.TrafficGenerator
22 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
23 | Resource | resources/libraries/robot/default.robot
24 | Resource | resources/libraries/robot/interfaces.robot
25 | Resource | resources/libraries/robot/counters.robot
26 | Resource | resources/libraries/robot/bridge_domain.robot
27 | Resource | resources/libraries/robot/l2_xconnect.robot
28 | Resource | resources/libraries/robot/ipv4.robot
29 | Resource | resources/libraries/robot/ipv6.robot
30 | Resource | resources/libraries/robot/qemu.robot
31 | Resource | resources/libraries/robot/tagging.robot
32 | Documentation | Performance suite keywords
33
34 *** Keywords ***
35 | Calculate pps
36 | | [Documentation]
37 | | ... | Calculate pps for given rate and L2 frame size,
38 | | ... | additional 20B are added to L2 frame size as padding.
39 | | ...
40 | | ... | *Arguments*
41 | | ... | - bps - Rate in bps. Type: integer
42 | | ... | - framesize - L2 frame size in Bytes. Type: integer
43 | | ...
44 | | ... | *Return*
45 | | ... | - Calculated pps. Type: integer
46 | | ...
47 | | ... | *Example:*
48 | | ...
49 | | ... | \| Calculate pps \| 10000000000 \| 64 \|
50 | | ...
51 | | [Arguments] | ${bps} | ${framesize}
52 | | ...
53 | | ${framesize}= | Get Frame Size | ${framesize}
54 | | ${ret}= | Evaluate | (${bps}/((${framesize}+20)*8)).__trunc__()
55 | | Return From Keyword | ${ret}
56
57 | Get Frame Size
58 | | [Documentation]
59 | | ... | Framesize can be either integer in case of a single packet
60 | | ... | in stream, or set of packets in case of IMIX type or simmilar.
61 | | ... | This keyword returns average framesize.
62 | | ...
63 | | ... | *Arguments:*
64 | | ... | - framesize - Framesize. Type: integer or string
65 | | ...
66 | | ... | *Example:*
67 | | ...
68 | | ... | \| Get Frame Size \| IMIX_v4_1 \|
69 | | ...
70 | | [Arguments] | ${framesize}
71 | | ...
72 | | Run Keyword If | '${framesize}' == 'IMIX_v4_1'
73 | | ... | Return From Keyword | 353.83333
74 | | Return From Keyword | ${framesize}
75
76 | 2-node circular Topology Variables Setup
77 | | [Documentation]
78 | | ... | Compute path for testing on two given nodes in circular
79 | | ... | topology and set corresponding suite variables.
80 | | ...
81 | | ... | _NOTE:_ This KW sets following suite variables:
82 | | ... | - tg - TG node
83 | | ... | - tg_if1 - 1st TG interface towards DUT.
84 | | ... | - tg_if2 - 2nd TG interface towards DUT.
85 | | ... | - dut1 - DUT1 node
86 | | ... | - dut1_if1 - 1st DUT interface towards TG.
87 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
88 | | ...
89 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
90 | | Compute Path | always_same_link=${FALSE}
91 | | ${tg_if1} | ${tg}= | First Interface
92 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
93 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
94 | | ${tg_if2} | ${tg}= | Last Interface
95 | | Set Suite Variable | ${tg}
96 | | Set Suite Variable | ${tg_if1}
97 | | Set Suite Variable | ${tg_if2}
98 | | Set Suite Variable | ${dut1}
99 | | Set Suite Variable | ${dut1_if1}
100 | | Set Suite Variable | ${dut1_if2}
101
102 | 3-node circular Topology Variables Setup
103 | | [Documentation]
104 | | ... | Compute path for testing on three given nodes in circular
105 | | ... | topology and set corresponding suite variables.
106 | | ...
107 | | ... | _NOTE:_ This KW sets following suite variables:
108 | | ... | - tg - TG node
109 | | ... | - tg_if1 - TG interface towards DUT1.
110 | | ... | - tg_if2 - TG interface towards DUT2.
111 | | ... | - dut1 - DUT1 node
112 | | ... | - dut1_if1 - DUT1 interface towards TG.
113 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
114 | | ... | - dut2 - DUT2 node
115 | | ... | - dut2_if1 - DUT2 interface towards TG.
116 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
117 | | ...
118 | | Append Nodes | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
119 | | ... | ${nodes['TG']}
120 | | Compute Path
121 | | ${tg_if1} | ${tg}= | Next Interface
122 | | ${dut1_if1} | ${dut1}= | Next Interface
123 | | ${dut1_if2} | ${dut1}= | Next Interface
124 | | ${dut2_if1} | ${dut2}= | Next Interface
125 | | ${dut2_if2} | ${dut2}= | Next Interface
126 | | ${tg_if2} | ${tg}= | Next Interface
127 | | Set Suite Variable | ${tg}
128 | | Set Suite Variable | ${tg_if1}
129 | | Set Suite Variable | ${tg_if2}
130 | | Set Suite Variable | ${dut1}
131 | | Set Suite Variable | ${dut1_if1}
132 | | Set Suite Variable | ${dut1_if2}
133 | | Set Suite Variable | ${dut2}
134 | | Set Suite Variable | ${dut2_if1}
135 | | Set Suite Variable | ${dut2_if2}
136
137 | 2-node circular Topology Variables Setup with DUT interface model
138 | | [Documentation]
139 | | ... | Compute path for testing on two given nodes in circular topology
140 | | ... | based on interface model provided as an argument and set
141 | | ... | corresponding suite variables.
142 | | ...
143 | | ... | *Arguments:*
144 | | ... | - iface_model - Interface model. Type: string
145 | | ...
146 | | ... | _NOTE:_ This KW sets following suite variables:
147 | | ... | - tg - TG node
148 | | ... | - tg_if1 - 1st TG interface towards DUT.
149 | | ... | - tg_if2 - 2nd TG interface towards DUT.
150 | | ... | - dut1 - DUT1 node
151 | | ... | - dut1_if1 - 1st DUT interface towards TG.
152 | | ... | - dut1_if2 - 2nd DUT interface towards TG.
153 | | ...
154 | | ... | *Example:*
155 | | ...
156 | | ... | \| 2-node circular Topology Variables Setup with DUT interface model \
157 | | ... | \| Intel-X520-DA2 \|
158 | | ...
159 | | [Arguments] | ${iface_model}
160 | | ...
161 | | ${iface_model_list}= | Create list | ${iface_model}
162 | | Append Node | ${nodes['TG']}
163 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
164 | | Append Node | ${nodes['TG']}
165 | | Compute Path | always_same_link=${FALSE}
166 | | ${tg_if1} | ${tg}= | First Interface
167 | | ${dut1_if1} | ${dut1}= | First Ingress Interface
168 | | ${dut1_if2} | ${dut1}= | Last Egress Interface
169 | | ${tg_if2} | ${tg}= | Last Interface
170 | | Set Suite Variable | ${tg}
171 | | Set Suite Variable | ${tg_if1}
172 | | Set Suite Variable | ${tg_if2}
173 | | Set Suite Variable | ${dut1}
174 | | Set Suite Variable | ${dut1_if1}
175 | | Set Suite Variable | ${dut1_if2}
176
177 | 3-node circular Topology Variables Setup with DUT interface model
178 | | [Documentation]
179 | | ... | Compute path for testing on three given nodes in circular topology
180 | | ... | based on interface model provided as an argument and set
181 | | ... | corresponding suite variables.
182 | | ...
183 | | ... | *Arguments:*
184 | | ... | - iface_model - Interface model. Type: string
185 | | ...
186 | | ... | _NOTE:_ This KW sets following suite variables:
187 | | ... | - tg - TG node
188 | | ... | - tg_if1 - TG interface towards DUT1.
189 | | ... | - tg_if2 - TG interface towards DUT2.
190 | | ... | - dut1 - DUT1 node
191 | | ... | - dut1_if1 - DUT1 interface towards TG.
192 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
193 | | ... | - dut2 - DUT2 node
194 | | ... | - dut2_if1 - DUT2 interface towards TG.
195 | | ... | - dut2_if2 - DUT2 interface towards DUT1.
196 | | ...
197 | | ... | *Example:*
198 | | ...
199 | | ... | \| 3-node circular Topology Variables Setup with DUT interface model \
200 | | ... | \| Intel-X520-DA2 \|
201 | | ...
202 | | [Arguments] | ${iface_model}
203 | | ...
204 | | ${iface_model_list}= | Create list | ${iface_model}
205 | | Append Node | ${nodes['TG']}
206 | | Append Node | ${nodes['DUT1']} | filter_list=${iface_model_list}
207 | | Append Node | ${nodes['DUT2']} | filter_list=${iface_model_list}
208 | | Append Node | ${nodes['TG']}
209 | | Compute Path
210 | | ${tg_if1} | ${tg}= | Next Interface
211 | | ${dut1_if1} | ${dut1}= | Next Interface
212 | | ${dut1_if2} | ${dut1}= | Next Interface
213 | | ${dut2_if1} | ${dut2}= | Next Interface
214 | | ${dut2_if2} | ${dut2}= | Next Interface
215 | | ${tg_if2} | ${tg}= | Next Interface
216 | | Set Suite Variable | ${tg}
217 | | Set Suite Variable | ${tg_if1}
218 | | Set Suite Variable | ${tg_if2}
219 | | Set Suite Variable | ${dut1}
220 | | Set Suite Variable | ${dut1_if1}
221 | | Set Suite Variable | ${dut1_if2}
222 | | Set Suite Variable | ${dut2}
223 | | Set Suite Variable | ${dut2_if1}
224 | | Set Suite Variable | ${dut2_if2}
225
226 | VPP interfaces in path are up in a 2-node circular topology
227 | | [Documentation]
228 | | ... | *Set UP state on VPP interfaces in path on nodes in 2-node circular
229 | | ... | topology.*
230 | | ...
231 | | Set Interface State | ${dut1} | ${dut1_if1} | up
232 | | Set Interface State | ${dut1} | ${dut1_if2} | up
233 | | Vpp Node Interfaces Ready Wait | ${dut1}
234
235 | VPP interfaces in path are up in a 3-node circular topology
236 | | [Documentation]
237 | | ... | *Set UP state on VPP interfaces in path on nodes in 3-node circular
238 | | ... | topology.*
239 | | ...
240 | | Set Interface State | ${dut1} | ${dut1_if1} | up
241 | | Set Interface State | ${dut1} | ${dut1_if2} | up
242 | | Set Interface State | ${dut2} | ${dut2_if1} | up
243 | | Set Interface State | ${dut2} | ${dut2_if2} | up
244 | | Vpp Node Interfaces Ready Wait | ${dut1}
245 | | Vpp Node Interfaces Ready Wait | ${dut2}
246
247 | IPv4 forwarding initialized in a 3-node circular topology
248 | | [Documentation]
249 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
250 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
251 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
252 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
253 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
254 | | ...
255 | | Set Interface State | ${dut1} | ${dut1_if1} | up
256 | | Set Interface State | ${dut1} | ${dut1_if2} | up
257 | | Set Interface State | ${dut2} | ${dut2_if1} | up
258 | | Set Interface State | ${dut2} | ${dut2_if2} | up
259 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
260 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
261 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
262 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
263 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
264 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
265 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
266 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
267 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
268 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
269 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
270 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
271 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
272 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
273 | | All Vpp Interfaces Ready Wait | ${nodes}
274
275 | IPv4 forwarding initialized in a 2-node switched topology
276 | | [Documentation]
277 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node circular
278 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
279 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
280 | | ... | /30 prefix on DUT1 link. Set routing on DUT node with prefix /24 and
281 | | ... | next hop of neighbour DUT interface IPv4 address.
282 | | ...
283 | | Set Interface State | ${dut1} | ${dut1_if1} | up
284 | | Set Interface State | ${dut1} | ${dut1_if2} | up
285 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
286 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
287 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.3 | ${tg1_if1_mac}
288 | | dut1_v4.set_arp | ${dut1_if2} | 20.20.20.3 | ${tg1_if2_mac}
289 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.2 | 24
290 | | dut1_v4.set_ip | ${dut1_if2} | 20.20.20.2 | 24
291 | | All Vpp Interfaces Ready Wait | ${nodes}
292
293 | Scale IPv4 forwarding initialized in a 3-node circular topology
294 | | [Documentation]
295 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
296 | | ... | DUT nodes in 3-node circular topology
297 | | ...
298 | | ... | *Arguments:*
299 | | ... | - ${count} - IP route count. Type: integer
300 | | ...
301 | | ... | *Return:*
302 | | ... | - No value returned
303 | | ...
304 | | ... | *Example:*
305 | | ...
306 | | ... | \| Scale IPv4 forwarding initialized in a 3-node circular topology \
307 | | ... | \| 100000 \|
308 | | ...
309 | | [Arguments] | ${count}
310 | | ...
311 | | Set Interface State | ${dut1} | ${dut1_if1} | up
312 | | Set Interface State | ${dut1} | ${dut1_if2} | up
313 | | Set Interface State | ${dut2} | ${dut2_if1} | up
314 | | Set Interface State | ${dut2} | ${dut2_if2} | up
315 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
316 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
317 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
318 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
319 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
320 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
321 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
322 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
323 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
324 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
325 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
326 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
327 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
328 | | ... | count=${count}
329 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
330 | | ... | count=${count}
331 | | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
332 | | ... | count=${count}
333 | | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
334 | | ... | count=${count}
335 | | All Vpp Interfaces Ready Wait | ${nodes}
336
337 | IPv4 forwarding with vhost initialized in a 3-node circular topology
338 | | [Documentation]
339 | | ... | Create vhost-user interfaces in VPP. Set UP state of all VPP
340 | | ... | interfaces in path on nodes in 3-node circular topology. Create 2
341 | | ... | FIB tables on each DUT with multipath routing. Assign pair of
342 | | ... | Physical and Virtual interfaces on both nodes to each FIB table.
343 | | ... | Setup IPv4 addresses with /30 prefix on DUT-TG links and /30 prefix
344 | | ... | on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB tables
345 | | ... | with prefix /24 and next hop of neighbour IPv4 address. Setup
346 | | ... | ARP on all VPP interfaces.
347 | | ...
348 | | ... | *Arguments:*
349 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
350 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
351 | | ...
352 | | ... | *Return:*
353 | | ... | - No value returned
354 | | ...
355 | | ... | *Example:*
356 | | ...
357 | | ... | \| IPv4 forwarding with vhost initialized in a 3-node circular \
358 | | ... | topology \| /tmp/sock1 \| /tmp/sock2 \|
359 | | ...
360 | | [Arguments] | ${sock1} | ${sock2}
361 | | ...
362 | | VPP interfaces in path are up in a 3-node circular topology
363 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
364 | | ... | ${sock1} | ${sock2}
365 | | ${dut1_vif1}= | Set Variable | ${vhost_if1}
366 | | ${dut1_vif2}= | Set Variable | ${vhost_if2}
367 | | Set Interface State | ${dut1} | ${dut1_vif1} | up
368 | | Set Interface State | ${dut1} | ${dut1_vif2} | up
369 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
370 | | ... | ${sock1} | ${sock2}
371 | | ${dut2_vif1}= | Set Variable | ${vhost_if1}
372 | | ${dut2_vif2}= | Set Variable | ${vhost_if2}
373 | | Set Interface State | ${dut2} | ${dut2_vif1} | up
374 | | Set Interface State | ${dut2} | ${dut2_vif2} | up
375 | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif1}
376 | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif2}
377 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
378 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
379 | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif1}
380 | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif2}
381 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
382 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
383 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
384 | | ... | via 4.4.4.2 sw_if_index ${dut1_vif1_idx} multipath
385 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
386 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
387 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
388 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
389 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
390 | | ... | via 5.5.5.2 sw_if_index ${dut1_vif2_idx} multipath
391 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
392 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
393 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
394 | | ... | via 4.4.4.1 sw_if_index ${dut2_vif1_idx} multipath
395 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
396 | | ... | via 5.5.5.2 sw_if_index ${dut2_vif2_idx} multipath
397 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
398 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
399 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
400 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif1} | ${fib_table_1}
401 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
402 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif2} | ${fib_table_2}
403 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
404 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif1} | ${fib_table_1}
405 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
406 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif2} | ${fib_table_2}
407 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
408 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
409 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif1} | 4.4.4.1 | 30
410 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif2} | 5.5.5.1 | 30
411 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
412 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
413 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif1} | 4.4.4.1 | 30
414 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif2} | 5.5.5.1 | 30
415 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
416 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
417 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
418 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
419 | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
420 | | ... | ${dut1_vif1_idx}
421 | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
422 | | ... | ${dut1_vif2_idx}
423 | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
424 | | ... | ${dut2_vif1_idx}
425 | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
426 | | ... | ${dut2_vif2_idx}
427 | | Set Test Variable | ${dut1_vif1_mac}
428 | | Set Test Variable | ${dut1_vif2_mac}
429 | | Set Test Variable | ${dut2_vif1_mac}
430 | | Set Test Variable | ${dut2_vif2_mac}
431 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
432 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
433 | | Add arp on dut | ${dut1} | ${dut1_vif1} | 4.4.4.2 | 52:54:00:00:04:01
434 | | Add arp on dut | ${dut1} | ${dut1_vif2} | 5.5.5.2 | 52:54:00:00:04:02
435 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
436 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
437 | | Add arp on dut | ${dut2} | ${dut2_vif1} | 4.4.4.2 | 52:54:00:00:04:01
438 | | Add arp on dut | ${dut2} | ${dut2_vif2} | 5.5.5.2 | 52:54:00:00:04:02
439 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut1_vif1}
440 | | ... | vrf=${fib_table_1}
441 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
442 | | ... | vrf=${fib_table_1}
443 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
444 | | ... | vrf=${fib_table_2}
445 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut1_vif2}
446 | | ... | vrf=${fib_table_2}
447 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut2_vif1}
448 | | ... | vrf=${fib_table_1}
449 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
450 | | ... | vrf=${fib_table_1}
451 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
452 | | ... | vrf=${fib_table_2}
453 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut2_vif2}
454 | | ... | vrf=${fib_table_2}
455
456 | IPv4 policer 2r3c-${t} initialized in a 3-node circular topology
457 | | [Documentation]
458 | | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
459 | | ... | on all DUT nodes in 3-node circular topology. Policer is applied on
460 | | ... | links TG - DUT1 and DUT2 - TG.
461 | | ...
462 | | ${dscp}= | DSCP AF22
463 | | Policer Set Name | policer1
464 | | Policer Set CIR | ${cir}
465 | | Policer Set EIR | ${eir}
466 | | Policer Set CB | ${cb}
467 | | Policer Set EB | ${eb}
468 | | Policer Set Rate Type pps
469 | | Policer Set Round Type Closest
470 | | Policer Set Type 2R3C 2698
471 | | Policer Set Conform Action Transmit
472 | | Policer Set Exceed Action Mark and Transmit | ${dscp}
473 | | Policer Set Violate Action Transmit
474 | | Policer Enable Color Aware
475 | | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
476 | | Policer Classify Set Precolor Exceed
477 | | Policer Set Node | ${dut1}
478 | | Policer Classify Set Interface | ${dut1_if1}
479 | | Policer Classify Set Match IP | 20.20.20.2 | ${False}
480 | | Policer Set Configuration
481 | | Policer Set Node | ${dut2}
482 | | Policer Classify Set Interface | ${dut2_if2}
483 | | Policer Classify Set Match IP | 10.10.10.2 | ${False}
484 | | Policer Set Configuration
485
486 | IPv6 forwarding initialized in a 3-node circular topology
487 | | [Documentation]
488 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
489 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
490 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
491 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
492 | | ... | next hop of neighbour DUT interface IPv6 address.
493 | | ...
494 | | ${prefix}= | Set Variable | 64
495 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
496 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
497 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
498 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
499 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
500 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
501 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
502 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
503 | | Vpp nodes ra suppress link layer | ${nodes}
504 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
505 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
506 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
507 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
508 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
509 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
510
511 | Scale IPv6 forwarding initialized in a 3-node circular topology
512 | | [Documentation]
513 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
514 | | ... | DUT nodes in 3-node circular topology
515 | | ...
516 | | ... | *Arguments:*
517 | | ... | - ${count} - IP route count. Type: integer
518 | | ...
519 | | ... | *Return:*
520 | | ... | - No value returned
521 | | ...
522 | | ... | *Example:*
523 | | ...
524 | | ... | \| Scale IPv6 forwarding initialized in a 3-node circular topology \
525 | | ... | \| 100000 \|
526 | | ...
527 | | [Arguments] | ${count}
528 | | ...
529 | | ${subn_prefix}= | Set Variable | 64
530 | | ${host_prefix}= | Set Variable | 128
531 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
532 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
533 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
534 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
535 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
536 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
537 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
538 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
539 | | Vpp nodes ra suppress link layer | ${nodes}
540 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
541 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
542 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
543 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
544 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
545 | | ... | interface=${dut1_if2} | count=${count}
546 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
547 | | ... | interface=${dut1_if1} | count=${count}
548 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
549 | | ... | interface=${dut2_if1} | count=${count}
550 | | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
551 | | ... | interface=${dut2_if2} | count=${count}
552
553 | IPv6 iAcl whitelist initialized in a 3-node circular topology
554 | | [Documentation]
555 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
556 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
557 | | ...
558 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
559 | | ... | ${dut1} | ip6 | dst
560 | | And Vpp Configures Classify Session L3
561 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
562 | | ... | ip6 | dst | 2001:2::2
563 | | And Vpp Enable Input Acl Interface
564 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
565 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
566 | | ... | ${dut2} | ip6 | dst
567 | | And Vpp Configures Classify Session L3
568 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
569 | | ... | ip6 | dst | 2001:1::2
570 | | And Vpp Enable Input Acl Interface
571 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
572
573 | L2 xconnect initialized in a 3-node circular topology
574 | | [Documentation]
575 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
576 | | ... | each DUT. Interfaces are brought up.
577 | | ... |
578 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
579 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
580 | | All Vpp Interfaces Ready Wait | ${nodes}
581
582 | L2 xconnect with VXLANoIPv4 initialized in a 3-node circular topology
583 | | [Documentation]
584 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
585 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
586 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
587 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
588 | | ... | interfaces.
589 | | ...
590 | | VPP interfaces in path are up in a 3-node circular topology
591 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
592 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
593 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
594 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
595 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
596 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
597 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
598 | | ... | 172.16.0.1 | 172.16.0.2
599 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
600 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
601 | | ... | 172.16.0.2 | 172.16.0.1
602 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
603
604 | L2 xconnect with Vhost-User initialized in a 3-node circular topology
605 | | [Documentation]
606 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
607 | | ... | connect each Vhost interface with one physical interface.
608 | | ...
609 | | ... | *Arguments:*
610 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
611 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
612 | | ...
613 | | ... | *Example:*
614 | | ...
615 | | ... | \| L2 xconnect with Vhost-User initialized in a 3-node \
616 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \|
617 | | ...
618 | | [Arguments] | ${sock1} | ${sock2}
619 | | ...
620 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
621 | | ... | ${sock1} | ${sock2}
622 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
623 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if2} | ${vhost_if2}
624 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
625 | | ... | ${sock1} | ${sock2}
626 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${vhost_if1}
627 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
628 | | All Vpp Interfaces Ready Wait | ${nodes}
629
630 | L2 xconnect with Vhost-User and VLAN initialized in a 3-node circular topology
631 | | [Documentation]
632 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
633 | | ... | connect each Vhost interface with one physical interface.
634 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
635 | | ...
636 | | ... | *Arguments:*
637 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
638 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
639 | | ... | - subid - ID of the sub-interface to be created. Type: string
640 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
641 | | ...
642 | | ... | *Example:*
643 | | ...
644 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
645 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
646 | | ...
647 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
648 | | ...
649 | | VPP interfaces in path are up in a 3-node circular topology
650 | | VLAN dot1q subinterfaces initialized on 3-node topology
651 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
652 | | L2 tag rewrite method setup on interfaces
653 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
654 | | ... | ${tag_rewrite}
655 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
656 | | ... | ${sock1} | ${sock2}
657 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
658 | | L2 setup xconnect on DUT | ${dut1} | ${subif_index_1} | ${vhost_if2}
659 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
660 | | ... | ${sock1} | ${sock2}
661 | | L2 setup xconnect on DUT | ${dut2} | ${subif_index_2} | ${vhost_if1}
662 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
663 | | All Vpp Interfaces Ready Wait | ${nodes}
664
665 | L2 bridge domain initialized in a 3-node circular topology
666 | | [Documentation]
667 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
668 | | ... | that is created automatically with index 1. Learning is enabled.
669 | | ... | Interfaces are brought up.
670 | | ...
671 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
672 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
673 | | All Vpp Interfaces Ready Wait | ${nodes}
674
675 | L2 bridge domains with Vhost-User initialized in a 3-node circular topology
676 | | [Documentation]
677 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
678 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
679 | | ... | with physical inteface.
680 | | ...
681 | | ... | *Arguments:*
682 | | ... | - bd_id1 - Bridge domain ID. Type: integer
683 | | ... | - bd_id2 - Bridge domain ID. Type: integer
684 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
685 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
686 | | ...
687 | | ... | *Example:*
688 | | ...
689 | | ... | \| L2 bridge domains with Vhost-User initialized in a 3-node \
690 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
691 | | ...
692 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
693 | | ...
694 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
695 | | ... | ${sock1} | ${sock2}
696 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
697 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
698 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
699 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
700 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
701 | | ... | ${sock1} | ${sock2}
702 | | Interface is added to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id1}
703 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
704 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
705 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
706 | | All Vpp Interfaces Ready Wait | ${nodes}
707
708 | L2 bridge domains with Vhost-User for '${nr}' VMs initialized in a 3-node circular topology
709 | | [Documentation]
710 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
711 | | ... | defined VPP nodes. Add each Vhost-User interface into L2 bridge
712 | | ... | domains with learning enabled with physical inteface or Vhost-User
713 | | ... | interface of another VM.
714 | | ...
715 | | ... | *Arguments:*
716 | | ... | _None_
717 | | ...
718 | | ... | *Note:*
719 | | ... | Socket paths for VM are defined in following format:
720 | | ... | - /tmp/sock-${VM_ID}-1
721 | | ... | - /tmp/sock-${VM_ID}-2
722 | | ...
723 | | ... | *Example:*
724 | | ...
725 | | ... | \| L2 bridge domains with Vhost-User for '2' VMs initialized in \
726 | | ... | a 3-node circular topology \|
727 | | ...
728 | | ${bd_id2}= | Evaluate | ${nr}+1
729 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${1}
730 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
731 | | Interface is added to bridge domain | ${dut2} | ${dut2_if1} | ${1}
732 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
733 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
734 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
735 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
736 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
737 | |      | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
738 | |      | ... | dut1-vhost-${number}-if2
739 | |      | ${bd_id2}= | Evaluate | ${number}+1
740 | |      | Interface is added to bridge domain | ${dut1}
741 | |      | ... | ${dut1-vhost-${number}-if1} | ${number}
742 | |      | Interface is added to bridge domain | ${dut1}
743 | |      | ... | ${dut1-vhost-${number}-if2} | ${bd_id2}
744 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
745 | |      | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
746 | |      | ... | dut2-vhost-${number}-if2
747 | |      | Interface is added to bridge domain | ${dut2}
748 | |      | ... | ${dut2-vhost-${number}-if1} | ${number}
749 | |      | Interface is added to bridge domain | ${dut2}
750 | |      | ... | ${dut2-vhost-${number}-if2} | ${bd_id2}
751
752 | L2 bridge domain with VXLANoIPv4 initialized in a 3-node circular topology
753 | | [Documentation]
754 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
755 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
756 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
757 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
758 | | ... | interfaces.
759 | | ...
760 | | VPP interfaces in path are up in a 3-node circular topology
761 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
762 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
763 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
764 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
765 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
766 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
767 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
768 | | ... | 172.16.0.1 | 172.16.0.2
769 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
770 | | ... | 172.16.0.2 | 172.16.0.1
771 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
772 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
773 | | All Vpp Interfaces Ready Wait | ${nodes}
774
775 | L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a 3-node circular topology
776 | | [Documentation]
777 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
778 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
779 | | ... | with physical inteface.
780 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
781 | | ... | interfaces on each DUT. All interfaces are brought up.
782 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
783 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
784 | | ...
785 | | ... | *Arguments:*
786 | | ... | - bd_id1 - Bridge domain ID. Type: integer
787 | | ... | - bd_id2 - Bridge domain ID. Type: integer
788 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
789 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
790 | | ...
791 | | ... | *Example:*
792 | | ...
793 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
794 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
795 | | ...
796 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
797 | | ...
798 | | VPP interfaces in path are up in a 3-node circular topology
799 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
800 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
801 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
802 | | ... | 172.16.0.1 | 172.16.0.2
803 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
804 | | ... | 172.16.0.2 | 172.16.0.1
805 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
806 | | ... | ${sock1} | ${sock2}
807 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
808 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
809 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
810 | | Interface is added to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
811 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
812 | | ... | ${sock1} | ${sock2}
813 | | Interface is added to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
814 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
815 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
816 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
817 | | All Vpp Interfaces Ready Wait | ${nodes}
818
819 | L2 bridge domains with Vhost-User initialized in a 2-node circular topology
820 | | [Documentation]
821 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
822 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
823 | | ... | with physical inteface.
824 | | ...
825 | | ... | *Arguments:*
826 | | ... | - bd_id1 - Bridge domain ID. Type: integer
827 | | ... | - bd_id2 - Bridge domain ID. Type: integer
828 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
829 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
830 | | ...
831 | | ... | *Example:*
832 | | ...
833 | | ... | \| L2 bridge domains with Vhost-User initialized in a 2-node \
834 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
835 | | ...
836 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
837 | | ...
838 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
839 | | ... | ${sock1} | ${sock2}
840 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
841 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
842 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
843 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
844 | | All Vpp Interfaces Ready Wait | ${nodes}
845
846 | L2 bridge domains with Vhost-User and VLAN initialized in a 3-node circular topology
847 | | [Documentation]
848 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
849 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
850 | | ... | with physical inteface.
851 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
852 | | ...
853 | | ... | *Arguments:*
854 | | ... | - bd_id1 - Bridge domain ID. Type: integer
855 | | ... | - bd_id2 - Bridge domain ID. Type: integer
856 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
857 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
858 | | ... | - subid - ID of the sub-interface to be created. Type: string
859 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
860 | | ...
861 | | ... | *Example:*
862 | | ...
863 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
864 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10\
865 | | ... | pop-1 \|
866 | | ...
867 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
868 | | ... | ${tag_rewrite}
869 | | ...
870 | | VPP interfaces in path are up in a 3-node circular topology
871 | | VLAN dot1q subinterfaces initialized on 3-node topology
872 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
873 | | L2 tag rewrite method setup on interfaces
874 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
875 | | ... | ${tag_rewrite}
876 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
877 | | ... | ${sock1} | ${sock2}
878 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
879 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
880 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
881 | | Interface is added to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
882 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
883 | | ... | ${sock1} | ${sock2}
884 | | Interface is added to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
885 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
886 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
887 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
888 | | All Vpp Interfaces Ready Wait | ${nodes}
889
890 | 2-node Performance Suite Setup with DUT's NIC model
891 | | [Documentation]
892 | | ... | Suite preparation phase that setup default startup configuration of
893 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
894 | | ... | variables used in test cases based on interface model provided as an
895 | | ... | argument. Initializes traffic generator.
896 | | ...
897 | | ... | *Arguments:*
898 | | ... | - topology_type - Topology type. Type: string
899 | | ... | - nic_model - Interface model. Type: string
900 | | ...
901 | | ... | *Example:*
902 | | ...
903 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
904 | | ...
905 | | [Arguments] | ${topology_type} | ${nic_model}
906 | | ...
907 | | Show vpp version on all DUTs
908 | | 2-node circular Topology Variables Setup with DUT interface model
909 | | ... | ${nic_model}
910 | | Setup 2-node startup configuration of VPP on all DUTs
911 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
912 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
913
914 | 2-node-switched Performance Suite Setup with DUT's NIC model
915 | | [Documentation]
916 | | ... | Suite preparation phase that setup default startup configuration of
917 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
918 | | ... | variables used in test cases based on interface model provided as an
919 | | ... | argument. Initializes traffic generator.
920 | | ...
921 | | ... | *Arguments:*
922 | | ... | - topology_type - Topology type. Type: string
923 | | ... | - nic_model - Interface model. Type: string
924 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
925 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
926 | | ...
927 | | ... | *Example:*
928 | | ...
929 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
930 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
931 | | ...
932 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
933 | | ... | ${tg_if2_dest_mac}
934 | | ...
935 | | Show vpp version on all DUTs
936 | | 2-node circular Topology Variables Setup with DUT interface model
937 | | ... | ${nic_model}
938 | | Setup 2-node startup configuration of VPP on all DUTs
939 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
940 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
941 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
942
943 | 3-node Performance Suite Setup with DUT's NIC model
944 | | [Documentation]
945 | | ... | Suite preparation phase that setup default startup configuration of
946 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
947 | | ... | variables used in test cases based on interface model provided as an
948 | | ... | argument. Initializes traffic generator.
949 | | ...
950 | | ... | *Arguments:*
951 | | ... | - topology_type - Topology type. Type: string
952 | | ... | - nic_model - Interface model. Type: string
953 | | ...
954 | | ... | *Example:*
955 | | ...
956 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
957 | | ...
958 | | [Arguments] | ${topology_type} | ${nic_model}
959 | | ...
960 | | Show vpp version on all DUTs
961 | | 3-node circular Topology Variables Setup with DUT interface model
962 | | ... | ${nic_model}
963 | | Setup default startup configuration of VPP on all DUTs
964 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
965 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
966
967 | 3-node Performance Suite Teardown
968 | | [Documentation]
969 | | ... | Suite teardown phase with traffic generator teardown.
970 | | ...
971 | | Teardown traffic generator | ${tg}
972
973 | 2-node Performance Suite Teardown
974 | | [Documentation]
975 | | ... | Suite teardown phase with traffic generator teardown.
976 | | ...
977 | | Teardown traffic generator | ${tg}
978
979 | Find NDR using linear search and pps
980 | | [Documentation]
981 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
982 | | ...
983 | | ... | *Arguments:*
984 | | ... | - framesize - L2 Frame Size [B]. Type: integer
985 | | ... | - start_rate - Initial start rate [pps]. Type: float
986 | | ... | - step_rate - Step of linear search [pps]. Type: float
987 | | ... | - topology_type - Topology type. Type: string
988 | | ... | - min_rate - Lower limit of search [pps]. Type: float
989 | | ... | - max_rate - Upper limit of search [pps]. Type: float
990 | | ...
991 | | ... | *Return:*
992 | | ... | - No value returned
993 | | ...
994 | | ... | *Example:*
995 | | ...
996 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \
997 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \|
998 | | ...
999 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1000 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
1001 | | ...
1002 | | ${duration}= | Set Variable | ${perf_trial_duration}
1003 | | Set Duration | ${duration}
1004 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1005 | | Set Search Linear Step | ${step_rate}
1006 | | Set Search Frame Size | ${framesize}
1007 | | Set Search Rate Type pps
1008 | | Linear Search | ${start_rate} | ${topology_type}
1009 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1010 | | ${tmp}= | Create List | 100%NDR | ${lat}
1011 | | ${latency}= | Create List | ${tmp}
1012 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1013 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1014 | | ... | ${framesize} | ${topology_type}
1015 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1016 | | Append To List | ${latency} | ${tmp}
1017 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1018 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1019 | | ... | ${framesize} | ${topology_type}
1020 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1021 | | Append To List | ${latency} | ${tmp}
1022 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1023 | | ... | ${latency}
1024 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1025 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
1026
1027 | Find PDR using linear search and pps
1028 | | [Documentation]
1029 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
1030 | | ... | with PDR threshold and type specified by parameter.
1031 | | ...
1032 | | ... | *Arguments:*
1033 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1034 | | ... | - start_rate - Initial start rate [pps]. Type: float
1035 | | ... | - step_rate - Step of linear search [pps]. Type: float
1036 | | ... | - topology_type - Topology type. Type: string
1037 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1038 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1039 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1040 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1041 | | ...
1042 | | ... | *Example:*
1043 | | ...
1044 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
1045 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage \|
1046 | | ...
1047 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1048 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
1049 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1050 | | ...
1051 | | ${duration}= | Set Variable | ${perf_trial_duration}
1052 | | Set Duration | ${duration}
1053 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1054 | | Set Search Linear Step | ${step_rate}
1055 | | Set Search Frame Size | ${framesize}
1056 | | Set Search Rate Type pps
1057 | | Set Loss Acceptance | ${loss_acceptance}
1058 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1059 | | ... | Set Loss Acceptance Type Percentage
1060 | | Linear Search | ${start_rate} | ${topology_type}
1061 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1062 | | ${tmp}= | Create List | 100%PDR | ${lat}
1063 | | ${latency}= | Create List | ${tmp}
1064 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1065 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1066 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1067 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1068 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1069
1070 | Find NDR using binary search and pps
1071 | | [Documentation]
1072 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
1073 | | ...
1074 | | ... | *Arguments:*
1075 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1076 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1077 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1078 | | ... | - topology_type - Topology type. Type: string
1079 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1080 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1081 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1082 | | ...
1083 | | ... | *Example:*
1084 | | ...
1085 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
1086 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \|
1087 | | ...
1088 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1089 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1090 | | ...
1091 | | ${duration}= | Set Variable | ${perf_trial_duration}
1092 | | Set Duration | ${duration}
1093 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1094 | | Set Search Frame Size | ${framesize}
1095 | | Set Search Rate Type pps
1096 | | Set Binary Convergence Threshold | ${threshold}
1097 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1098 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1099 | | ${tmp}= | Create List | 100%NDR | ${lat}
1100 | | ${latency}= | Create List | ${tmp}
1101 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1102 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1103 | | ... | ${framesize} | ${topology_type}
1104 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1105 | | Append To List | ${latency} | ${tmp}
1106 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1107 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1108 | | ... | ${framesize} | ${topology_type}
1109 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1110 | | Append To List | ${latency} | ${tmp}
1111 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1112 | | ... | ${latency}
1113 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1114 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
1115
1116 | Find PDR using binary search and pps
1117 | | [Documentation]
1118 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
1119 | | ... | with PDR threshold and type specified by parameter.
1120 | | ...
1121 | | ... | *Arguments:*
1122 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1123 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1124 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1125 | | ... | - topology_type - Topology type. Type: string
1126 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1127 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1128 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1129 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1130 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1131 | | ...
1132 | | ... | *Example:*
1133 | | ...
1134 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
1135 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
1136 | | ... | \| percentage \|
1137 | | ...
1138 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1139 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1140 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1141 | | ...
1142 | | ${duration}= | Set Variable | ${perf_trial_duration}
1143 | | Set Duration | ${duration}
1144 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1145 | | Set Search Frame Size | ${framesize}
1146 | | Set Search Rate Type pps
1147 | | Set Loss Acceptance | ${loss_acceptance}
1148 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1149 | | ... | Set Loss Acceptance Type Percentage
1150 | | Set Binary Convergence Threshold | ${threshold}
1151 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1152 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1153 | | ${tmp}= | Create List | 100%PDR | ${lat}
1154 | | ${latency}= | Create List | ${tmp}
1155 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1156 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1157 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1158 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1159 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1160
1161 | Find NDR using combined search and pps
1162 | | [Documentation]
1163 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1164 | | ... | non drop rate.
1165 | | ...
1166 | | ... | *Arguments:*
1167 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1168 | | ... | - start_rate - Initial start rate [pps]. Type: float
1169 | | ... | - step_rate - Step of linear search [pps]. Type: float
1170 | | ... | - topology_type - Topology type. Type: string
1171 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1172 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1173 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1174 | | ...
1175 | | ... | *Example:*
1176 | | ...
1177 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
1178 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \|
1179 | | ...
1180 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1181 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1182 | | ...
1183 | | ${duration}= | Set Variable | ${perf_trial_duration}
1184 | | Set Duration | ${duration}
1185 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1186 | | Set Search Linear Step | ${step_rate}
1187 | | Set Search Frame Size | ${framesize}
1188 | | Set Search Rate Type pps
1189 | | Set Binary Convergence Threshold | ${threshold}
1190 | | Combined Search | ${start_rate} | ${topology_type}
1191 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1192 | | ${tmp}= | Create List | 100%NDR | ${lat}
1193 | | ${latency}= | Create List | ${tmp}
1194 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1195 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1196 | | ... | ${framesize} | ${topology_type}
1197 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1198 | | Append To List | ${latency} | ${tmp}
1199 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1200 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1201 | | ... | ${framesize} | ${topology_type}
1202 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1203 | | Append To List | ${latency} | ${tmp}
1204 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1205 | | ... | ${latency}
1206 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1207 | | ... | ${framesize} | ${topology_type}
1208 | | ... | fail_on_loss=${False}
1209
1210 | Find PDR using combined search and pps
1211 | | [Documentation]
1212 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1213 | | ... | partial drop rate with PDR threshold and type specified by parameter.
1214 | | ...
1215 | | ... | *Arguments:*
1216 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1217 | | ... | - start_rate - Initial start rate [pps]. Type: float
1218 | | ... | - step_rate - Step of linear search [pps]. Type: float
1219 | | ... | - topology_type - Topology type. Type: string
1220 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1221 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1222 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1223 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1224 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1225 | | ...
1226 | | ... | *Example:*
1227 | | ...
1228 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
1229 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
1230 | | ... | \| percentage \|
1231 | | ...
1232 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1233 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1234 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1235 | | ...
1236 | | ${duration}= | Set Variable | ${perf_trial_duration}
1237 | | Set Duration | ${duration}
1238 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1239 | | Set Search Linear Step | ${step_rate}
1240 | | Set Search Frame Size | ${framesize}
1241 | | Set Search Rate Type pps
1242 | | Set Loss Acceptance | ${loss_acceptance}
1243 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1244 | | ... | Set Loss Acceptance Type Percentage
1245 | | Set Binary Convergence Threshold | ${threshold}
1246 | | Combined Search | ${start_rate} | ${topology_type}
1247 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1248 | | ${tmp}= | Create List | 100%PDR | ${lat}
1249 | | ${latency}= | Create List | ${tmp}
1250 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1251 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1252 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1253 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1254 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1255
1256 | Display result of NDR search
1257 | | [Documentation]
1258 | | ... | Display result of NDR search in packet per seconds (total and per
1259 | | ... | stream) and Gbps total bandwidth with untagged packet.
1260 | | ... | Througput is calculated as:
1261 | | ... | Measured rate per stream * Total number of streams
1262 | | ... | Bandwidth is calculated as:
1263 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1264 | | ...
1265 | | ... | *Arguments:*
1266 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1267 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1268 | | ... | - nr_streams - Total number of streams. Type: integer
1269 | | ... | - latency - Latency stats. Type: dictionary
1270 | | ...
1271 | | ... | *Example:*
1272 | | ...
1273 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
1274 | | ... | \| [100%NDR, [10/10/10, 1/2/3]] \|
1275 | | ...
1276 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams} | ${latency}
1277 | | ...
1278 | | ${framesize}= | Get Frame Size | ${framesize}
1279 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1280 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1281 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1282 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1283 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1284 | | ... | append=yes
1285 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1286 | | :FOR | ${lat} | IN | @{latency}
1287 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1288
1289 | Display result of PDR search
1290 | | [Documentation]
1291 | | ... | Display result of PDR search in packet per seconds (total and per
1292 | | ... | stream) and Gbps total bandwidth with untagged packet.
1293 | | ... | Througput is calculated as:
1294 | | ... | Measured rate per stream * Total number of streams
1295 | | ... | Bandwidth is calculated as:
1296 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1297 | | ...
1298 | | ... | *Arguments:*
1299 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1300 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1301 | | ... | - nr_streams - Total number of streams. Type: integer
1302 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1303 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1304 | | ... | - latency - Latency stats. Type: dictionary
1305 | | ...
1306 | | ... | *Example:*
1307 | | ...
1308 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
1309 | | ... | \| percentage \| [100%NDR, [10/10/10, 1/2/3]] \|
1310 | | ...
1311 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
1312 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1313 | | ...
1314 | | ${framesize}= | Get Frame Size | ${framesize}
1315 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1316 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1317 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1318 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1319 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1320 | | ... | append=yes
1321 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1322 | | :FOR | ${lat} | IN | @{latency}
1323 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1324 | | Set Test Message
1325 | | ... | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
1326 | | ... | append=yes
1327
1328 | Measure latency pps
1329 | | [Documentation]
1330 | | ... | Send traffic at specified rate. Measure min/avg/max latency
1331 | | ...
1332 | | ... | *Arguments:*
1333 | | ... | - duration - Duration of traffic run [s]. Type: integer
1334 | | ... | - rate - Rate for sending packets. Type: integer
1335 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1336 | | ... | - topology_type - Topology type. Type: string
1337 | | ...
1338 | | ... | *Example:*
1339 | | ...
1340 | | ... | \| Measure latency \| 10 \| 4.0 \| 64 \| 3-node-IPv4 \|
1341 | | ...
1342 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1343 | | ...
1344 | | Return From Keyword If | ${rate} <= 10000 | ${-1}
1345 | | ${ret}= | For DPDK Performance Test
1346 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1347 | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize}
1348 | | ... | ${topology_type} | warmup_time=0
1349 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1350 | | Run keyword and return | Get latency
1351
1352 | Traffic should pass with no loss
1353 | | [Documentation]
1354 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
1355 | | ... | evaluation.
1356 | | ...
1357 | | ... | *Arguments:*
1358 | | ... | - duration - Duration of traffic run [s]. Type: integer
1359 | | ... | - rate - Rate for sending packets. Type: string
1360 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1361 | | ... | - topology_type - Topology type. Type: string
1362 | | ... | - fail_on_loss - If True, the keyword fails if loss occurred.
1363 | | ... | Type: boolean
1364 | | ...
1365 | | ... | *Example:*
1366 | | ...
1367 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
1368 | | ... | \| 3-node-IPv4 \|
1369 | | ...
1370 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1371 | | ... | ${fail_on_loss}=${True}
1372 | | ...
1373 | | Clear and show runtime counters with running traffic | ${duration}
1374 | | ... | ${rate} | ${framesize} | ${topology_type}
1375 | | ${ret}= | For DPDK Performance Test
1376 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1377 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1378 | | ... | ${topology_type} | warmup_time=0
1379 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1380 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
1381
1382 | Traffic should pass with partial loss
1383 | | [Documentation]
1384 | | ... | Send traffic at specified rate. Partial packet loss is accepted
1385 | | ... | within loss acceptance value specified as argument.
1386 | | ...
1387 | | ... | *Arguments:*
1388 | | ... | - duration - Duration of traffic run [s]. Type: integer
1389 | | ... | - rate - Rate for sending packets. Type: string
1390 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1391 | | ... | - topology_type - Topology type. Type: string
1392 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1393 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1394 | | ...
1395 | | ... | *Example:*
1396 | | ...
1397 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1398 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1399 | | ...
1400 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1401 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1402 | | ... | ${fail_on_loss}=${True}
1403 | | ...
1404 | | Clear and show runtime counters with running traffic | ${duration}
1405 | | ... | ${rate} | ${framesize} | ${topology_type}
1406 | | ${ret}= | For DPDK Performance Test
1407 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1408 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1409 | | ... | ${topology_type} | warmup_time=0
1410 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1411 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
1412 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1413
1414 | Clear and show runtime counters with running traffic
1415 | | [Documentation]
1416 | | ... | Start traffic at specified rate then clear runtime counters on all
1417 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
1418 | | ... | on all DUTs. Finally stop traffic
1419 | | ...
1420 | | ... | *Arguments:*
1421 | | ... | - duration - Duration of traffic run [s]. Type: integer
1422 | | ... | - rate - Rate for sending packets. Type: string
1423 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1424 | | ... | - topology_type - Topology type. Type: string
1425 | | ...
1426 | | ... | *Example:*
1427 | | ...
1428 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1429 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1430 | | ...
1431 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1432 | | ...
1433 | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type}
1434 | | ... | warmup_time=0 | async_call=${True} | latency=${False}
1435 | | ${ret}= | For DPDK Performance Test
1436 | | Run Keyword If | ${ret}==${FALSE} | Clear runtime counters on all DUTs
1437 | | Sleep | ${duration}
1438 | | Run Keyword If | ${ret}==${FALSE} | Show runtime counters on all DUTs
1439 | | Stop traffic on tg
1440
1441 | Add PCI devices to DUTs from 3-node single link topology
1442 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1443 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1444 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
1445 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
1446 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
1447 | | Add PCI device | ${dut2} | ${dut2_if1_pci} | ${dut2_if2_pci}
1448
1449 | Add PCI devices to DUTs from 2-node single link topology
1450 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1451 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1452 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
1453
1454 | Guest VM with dpdk-testpmd connected via vhost-user is setup
1455 | | [Documentation]
1456 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1457 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1458 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1459 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1460 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1461 | | ...
1462 | | ... | *Arguments:*
1463 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1464 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1465 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1466 | | ... | - vm_name - QemuUtil instance name. Type: string
1467 | | ... | - skip - Number of cpus which will be skipped. Type: integer
1468 | | ... | - count - Number of cpus which will be allocated for qemu.
1469 | | ... | Type: integer
1470 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1471 | | ... | Type: integer
1472 | | ...
1473 | | ... | *Example:*
1474 | | ...
1475 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1476 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1477 | | ... | \| ${5} \|
1478 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1479 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1480 | | ... | \| qemu_id=${2} \|
1481 | | ...
1482 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1483 | | ... | ${count}=${5} | ${qemu_id}=${1}
1484 | | ...
1485 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1486 | | ... | WITH NAME | ${vm_name}
1487 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1488 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1489 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1490 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1491 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1492 | | ... | ${dut1_if1} | ${dut1_if2}
1493 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1494 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1495 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1496 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1497 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1498 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1499 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1500 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1501 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1502 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1503 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1504 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1505 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1506 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1507 | | Return From Keyword | ${vm}
1508
1509 | '${nr}' Guest VMs with dpdk-testpmd connected via vhost-user is setup in a 3-node circular topology
1510 | | [Documentation]
1511 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1512 | | ... | DPDK testpmd for defined number of VMs on all defined VPP nodes.
1513 | | ...
1514 | | ... | *Arguments:*
1515 | | ... | _None_
1516 | | ...
1517 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1518 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1519 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1520 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1521 | | ...
1522 | | ... | *Example:*
1523 | | ...
1524 | | ... | \| '2' Guest VM with dpdk-testpmd connected via vhost-user is setup \
1525 | | ... | in a 3-node circular topology \|
1526 | | ...
1527 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1528 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1529 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1530 | |      | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1531 | |      | ${vm1}= | Guest VM with dpdk-testpmd connected via vhost-user is setup
1532 | |      | ...     | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1533 | |      | ...     | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1534 | |      | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1535 | |      | ${vm2}= | Guest VM with dpdk-testpmd connected via vhost-user is setup
1536 | |      | ...     | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1537 | |      | ...     | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1538 | |      | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1539
1540 | Guest VM with dpdk-testpmd using SMT connected via vhost-user is setup
1541 | | [Documentation]
1542 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1543 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1544 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1545 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1546 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1547 | | ...
1548 | | ... | *Arguments:*
1549 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1550 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1551 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1552 | | ... | - vm_name - QemuUtil instance name. Type: string
1553 | | ... | - skip - number of cpus which will be skipped. Type: int
1554 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1555 | | ...
1556 | | ... | *Example:*
1557 | | ...
1558 | | ... | \| Guest VM with dpdk-testpmd using SMT connected via vhost-user is \
1559 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1560 | | ... | \| ${6} \| ${5} \|
1561 | | ...
1562 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1563 | | ... | ${count}=${5}
1564 | | ...
1565 | | Import Library | resources.libraries.python.QemuUtils
1566 | | ... | WITH NAME | ${vm_name}
1567 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1568 | | ... | ${dut1_if1} | ${dut1_if2}
1569 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1570 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1571 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1572 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1573 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1574 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1575 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1576 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1577 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1578 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1579 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1580 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1581 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1582 | | Return From Keyword | ${vm}
1583
1584 | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1585 | | [Documentation]
1586 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1587 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1588 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1589 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1590 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1591 | | ...
1592 | | ... | *Arguments:*
1593 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1594 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1595 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1596 | | ... | - vm_name - QemuUtil instance name. Type: string
1597 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1598 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1599 | | ... | - skip - number of cpus which will be skipped. Type: int
1600 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1601 | | ...
1602 | | ... | *Example:*
1603 | | ...
1604 | | ... | \| Guest VM with dpdk-testpmd for Vhost L2BD forwarding is setup \
1605 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1606 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1607 | | ...
1608 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1609 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1610 | | ...
1611 | | Import Library | resources.libraries.python.QemuUtils
1612 | | ... | WITH NAME | ${vm_name}
1613 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1614 | | ... | ${dut1_if1} | ${dut1_if2}
1615 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1616 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1617 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1618 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1619 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1620 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1621 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1622 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1623 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1624 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1625 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1626 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1627 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1628 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1629 | | Return From Keyword | ${vm}
1630
1631 | Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user is setup
1632 | | [Documentation]
1633 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1634 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1635 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1636 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1637 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1638 | | ...
1639 | | ... | *Arguments:*
1640 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1641 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1642 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1643 | | ... | - vm_name - QemuUtil instance name. Type: string
1644 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1645 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1646 | | ... | - skip - number of cpus which will be skipped. Type: int
1647 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1648 | | ...
1649 | | ... | *Example:*
1650 | | ...
1651 | | ... | \| Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user \
1652 | | ... | is setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1653 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1654 | | ...
1655 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1656 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1657 | | ...
1658 | | Import Library | resources.libraries.python.QemuUtils
1659 | | ... | WITH NAME | ${vm_name}
1660 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1661 | | ... | ${dut1_if1} | ${dut1_if2}
1662 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1663 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1664 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1665 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1666 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1667 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1668 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1669 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1670 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1671 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1672 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1673 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1674 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1675 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1676 | | Return From Keyword | ${vm}
1677
1678 | Guest VM with Linux Bridge connected via vhost-user is setup
1679 | | [Documentation]
1680 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1681 | | ... | linux bridge. Qemu Guest uses 2048M.
1682 | | ...
1683 | | ... | *Arguments:*
1684 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1685 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1686 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1687 | | ... | - vm_name - QemuUtil instance name. Type: string
1688 | | ... | - skip - number of cpus which will be skipped. Type: int
1689 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1690 | | ...
1691 | | ... | *Example:*
1692 | | ...
1693 | | ... | \| Guest VM with Linux Bridge connected via vhost-user is setup \
1694 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1695 | | ... | \| ${5} \|
1696 | | ...
1697 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1698 | | ... | ${count}=${5}
1699 | | ...
1700 | | Import Library | resources.libraries.python.QemuUtils
1701 | | ... | WITH NAME | ${vm_name}
1702 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1703 | | ... | ${dut1_if1} | ${dut1_if2}
1704 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1705 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1706 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1707 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1708 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1709 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1710 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1711 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1712 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1713 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1714 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1715 | | ${br}= | Set Variable | br0
1716 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1717 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1718 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1719 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1720 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1721 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1722 | | Return From Keyword | ${vm}
1723
1724 | Guest VM with Linux Bridge using SMT connected via vhost-user is setup
1725 | | [Documentation]
1726 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1727 | | ... | linux bridge. Qemu Guest uses 2048M.
1728 | | ...
1729 | | ... | *Arguments:*
1730 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1731 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1732 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1733 | | ... | - vm_name - QemuUtil instance name. Type: string
1734 | | ... | - skip - number of cpus which will be skipped. Type: int
1735 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1736 | | ...
1737 | | ... | *Example:*
1738 | | ...
1739 | | ... | \| Guest VM with Linux Bridge using SMT connected via vhost-user is \
1740 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1741 | | ... | \| ${6}\| ${5} \|
1742 | | ...
1743 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1744 | | ... | ${count}=${5}
1745 | | ...
1746 | | Import Library | resources.libraries.python.QemuUtils
1747 | | ... | WITH NAME | ${vm_name}
1748 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1749 | | ... | ${dut1_if1} | ${dut1_if2}
1750 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1751 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1752 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1753 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1754 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1755 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1756 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1757 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1758 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1759 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1760 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1761 | | ${br}= | Set Variable | br0
1762 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1763 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1764 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1765 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1766 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1767 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1768 | | Return From Keyword | ${vm}
1769
1770 | Guest VM with dpdk-testpmd Teardown
1771 | | [Documentation]
1772 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
1773 | | ... | Argument is dictionary of all qemu nodes running with its names.
1774 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
1775 | | ...
1776 | | ... | *Arguments:*
1777 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1778 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1779 | | ...
1780 | | ... | *Example:*
1781 | | ...
1782 | | ... | \| Guest VM with dpdk-testpmd Teardown \| ${node['DUT1']} \
1783 | | ... | \| ${dut_vm_refs} \|
1784 | | ...
1785 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1786 | | ${vms_number}= | Get Length | ${dut_vm_refs}
1787 | | ${index}= | Set Variable | ${0}
1788 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1789 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1790 | | | ${index}= | Evaluate | ${index} + 1
1791 | | | Dpdk Testpmd Stop | ${vm}
1792 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1793 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1794 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill
1795
1796 | Guest VM Teardown
1797 | | [Documentation]
1798 | | ... | Stop all qemu processes running on ${dut_node}.
1799 | | ... | Argument is dictionary of all qemu nodes running with its names.
1800 | | ...
1801 | | ... | *Arguments:*
1802 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1803 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1804 | | ...
1805 | | ... | *Example:*
1806 | | ...
1807 | | ... | \| Guest VM Teardown \| ${node['DUT1']} \
1808 | | ... | \| ${dut_vm_refs} \|
1809 | | ...
1810 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1811 | | ${vms_number}= | Get Length | ${dut_vm_refs}
1812 | | ${index}= | Set Variable | ${0}
1813 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1814 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1815 | | | ${index}= | Evaluate | ${index} + 1
1816 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1817 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1818 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill
1819
1820 | Lisp IPv4 forwarding initialized in a 3-node circular topology
1821 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1822 | | ... | Don`t set route.
1823 | | ...
1824 | | ... | *Arguments:*
1825 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1826 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1827 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1828 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1829 | | ... | -${duts_prefix} - ip prefix. Type: int
1830 | | ...
1831 | | ... | *Return:*
1832 | | ... | - No value returned
1833 | | ...
1834 | | ... | *Example:*
1835 | | ... | \| Lisp IPv4 forwarding initialized in a 3-node circular topology \
1836 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1837 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1838 | | ...
1839 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1840 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1841 | | ...
1842 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1843 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1844 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1845 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1846 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1847 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1848 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1849 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1850 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1851 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1852 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1853 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1854 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_address} | ${duts_prefix}
1855 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_address} | ${duts_prefix}
1856 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_address} | ${duts_prefix}
1857 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_address} | ${duts_prefix}
1858 | | All Vpp Interfaces Ready Wait | ${nodes}
1859
1860 | Lisp IPv6 forwarding initialized in a 3-node circular topology
1861 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1862 | | ... | Don`t set route.
1863 | | ...
1864 | | ... | *Arguments:*
1865 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1866 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1867 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1868 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1869 | | ... | -${duts_prefix} - ip prefix. Type: int
1870 | | ...
1871 | | ... | *Return:*
1872 | | ... | - No value returned
1873 | | ...
1874 | | ... | *Example:*
1875 | | ... | \| Lisp IPv6 forwarding initialized in a 3-node circular topology \
1876 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1877 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1878 | | ...
1879 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1880 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1881 | | ...
1882 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1883 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1884 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1885 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1886 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
1887 | | ... | ${prefix}
1888 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
1889 | | ... | ${prefix}
1890 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
1891 | | ... | ${prefix}
1892 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
1893 | | ... | ${prefix}
1894 | | Vpp nodes ra suppress link layer | ${nodes}
1895 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1896 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1897 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
1898 | | ... | ${dut2_if1_mac}
1899 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
1900 | | ... | ${dut1_if2_mac}
1901
1902 | Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular topology
1903 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1904 | | ... | Don`t set route.
1905 | | ...
1906 | | ... | *Arguments:*
1907 | | ... | - ${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
1908 | | ... | Type: string
1909 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1910 | | ... | - ${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
1911 | | ... | Type: string
1912 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1913 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1914 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1915 | | ...
1916 | | ... | *Return:*
1917 | | ... | - No value returned
1918 | | ...
1919 | | ... | *Example:*
1920 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1921 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1922 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1923 | | ... | \| ${prefix4} \| ${prefix6} \|
1924 | | ...
1925 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1926 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1927 | | ... | ${prefix4} | ${prefix6}
1928 | | ...
1929 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1930 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1931 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1932 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1933 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1934 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1935 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1936 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1937 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_ip4_address} | ${prefix4}
1938 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
1939 | | ... | ${prefix6}
1940 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
1941 | | ... | ${prefix6}
1942 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_ip4_address} | ${prefix4}
1943 | | Vpp nodes ra suppress link layer | ${nodes}
1944 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1945 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1946 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
1947 | | ... | ${dut2_if1_mac}
1948 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
1949 | | ... | ${dut1_if2_mac}
1950
1951 | Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular topology
1952 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1953 | | ... | Don`t set route.
1954 | | ...
1955 | | ... | *Arguments:*
1956 | | ... | - ${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
1957 | | ... | Type: string
1958 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1959 | | ... | - ${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
1960 | | ... | Type: string
1961 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1962 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1963 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1964 | | ...
1965 | | ... | *Return:*
1966 | | ... | - No value returned
1967 | | ...
1968 | | ... | *Example:*
1969 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1970 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1971 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1972 | | ... | \| ${prefix6} \| ${prefix4} \|
1973 | | ...
1974 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1975 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1976 | | ... | ${prefix6} | ${prefix4}
1977 | | ...
1978 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1979 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1980 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1981 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1982 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1983 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1984 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1985 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1986 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
1987 | | ... | ${prefix6}
1988 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1989 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1990 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
1991 | | ... | ${prefix6}
1992 | | Vpp nodes ra suppress link layer | ${nodes}
1993 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1994 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1995 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1996 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1997
1998 | DPDK 2-node Performance Suite Setup with DUT's NIC model
1999 | | [Documentation]
2000 | | ... | Updates interfaces on all nodes and setup global
2001 | | ... | variables used in test cases based on interface model provided as an
2002 | | ... | argument. Initializes traffic generator. Initializes DPDK test
2003 | | ... | environment.
2004 | | ...
2005 | | ... | *Arguments:*
2006 | | ... | - topology_type - Topology type. Type: string
2007 | | ... | - nic_model - Interface model. Type: string
2008 | | ...
2009 | | ... | *Example:*
2010 | | ...
2011 | | ... | \| DPDK 2-node Performance Suite Setup with DUT's NIC model \
2012 | | ... | \| L2 \| Intel-X520-DA2 \|
2013 | | ...
2014 | | [Arguments] | ${topology_type} | ${nic_model}
2015 | | ...
2016 | | 2-node circular Topology Variables Setup with DUT interface model
2017 | | ... | ${nic_model}
2018 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
2019 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
2020 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2021
2022 | DPDK 3-node Performance Suite Setup with DUT's NIC model
2023 | | [Documentation]
2024 | | ... | Updates interfaces on all nodes and setup global
2025 | | ... | variables used in test cases based on interface model provided as an
2026 | | ... | argument. Initializes traffic generator. Initializes DPDK test
2027 | | ... | environment.
2028 | | ...
2029 | | ... | *Arguments:*
2030 | | ... | - topology_type - Topology type. Type: string
2031 | | ... | - nic_model - Interface model. Type: string
2032 | | ...
2033 | | ... | *Example:*
2034 | | ...
2035 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
2036 | | ...
2037 | | [Arguments] | ${topology_type} | ${nic_model}
2038 | | ...
2039 | | 3-node circular Topology Variables Setup with DUT interface model
2040 | | ... | ${nic_model}
2041 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
2042 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
2043 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2044 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
2045
2046 | DPDK 3-node Performance Suite Teardown
2047 | | [Documentation]
2048 | | ... | Suite teardown phase with traffic generator teardown.
2049 | | ... | Cleanup DPDK test environment.
2050 | | ...
2051 | | Teardown traffic generator | ${tg}
2052 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2053 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
2054
2055 | DPDK 2-node Performance Suite Teardown
2056 | | [Documentation]
2057 | | ... | Suite teardown phase with traffic generator teardown.
2058 | | ... | Cleanup DPDK test environment.
2059 | | ...
2060 | | Teardown traffic generator | ${tg}
2061 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2062
2063 | For DPDK Performance Test
2064 | | [Documentation]
2065 | | ... | Return TRUE if variable DPDK_TEST exist, otherwise FALSE.
2066 | | ${ret} | ${tmp}= | Run Keyword And Ignore Error
2067 | | ... | Variable Should Exist | ${DPDK_TEST}
2068 | | Return From Keyword If | "${ret}" == "PASS" | ${TRUE}
2069 | | Return From Keyword | ${FALSE}
2070
2071 | Performance test setup
2072 | | [Documentation] | Common test setup for performance tests.
2073 | | ...
2074 | | Setup all DUTs before test
2075 | | Reset VAT History On All DUTs | ${nodes}
2076
2077 | Performance test teardown
2078 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
2079 | | ... | tests.
2080 | | ...
2081 | | ... | *Arguments:*
2082 | | ... | - rate - Rate for sending packets. Type: string
2083 | | ... | - framesize - L2 Frame Size [B]. Type: integer
2084 | | ... | - topology_type - Topology type. Type: string
2085 | | ...
2086 | | ... | *Example:*
2087 | | ...
2088 | | ... | \| Performance test teardown \| 4.0mpps \| 64 \| 3-node-IPv4 \|
2089 | | ...
2090 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
2091 | | ...
2092 | | Show VAT History On All DUTs | ${nodes}
2093 | | Show statistics on all DUTs
2094 | | Run Keyword If Test Failed
2095 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
2096 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
2097 | | Remove startup configuration of VPP from all DUTs
2098
2099 | Performance ndrchk test teardown
2100 | | [Documentation] | Common test teardown for ndrchk performance tests.
2101 | | ...
2102 | | Show VAT History On All DUTs | ${nodes}
2103 | | Show statistics on all DUTs
2104 | | Remove startup configuration of VPP from all DUTs
2105
2106 | Performance test with vhost and VM with dpdk-testpmd teardown
2107 | | [Documentation] | Common test teardown for performance tests which use
2108 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
2109 | | ...
2110 | | ... | *Arguments:*
2111 | | ... | - rate - Rate for sending packets. Type: string
2112 | | ... | - framesize - L2 Frame Size [B]. Type: integer
2113 | | ... | - topology_type - Topology type. Type: string
2114 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
2115 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
2116 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
2117 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
2118 | | ...
2119 | | ... | *Example:*
2120 | | ...
2121 | | ... | \| Performance test with vhost and VM with dpdk-testpmd teardown \
2122 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
2123 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
2124 | | ...
2125 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
2126 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
2127 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
2128 | | ...
2129 | | Show VAT History On All DUTs | ${nodes}
2130 | | Show Vpp Vhost On All DUTs
2131 | | Show statistics on all DUTs
2132 | | Run Keyword If Test Failed
2133 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
2134 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
2135 | | Remove startup configuration of VPP from all DUTs
2136 | | Run keyword unless | ${dut1_node}==${None}
2137 | | ... | Guest VM with dpdk-testpmd Teardown | ${dut1} | ${dut1_vm_refs}
2138 | | Run keyword unless | ${dut2_node}==${None}
2139 | | ... | Guest VM with dpdk-testpmd Teardown | ${dut2} | ${dut2_vm_refs}