Use 'Qemu Kill All' in perf test teardown
[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 DUT1.
116 | | ... | - dut2_if2 - DUT2 interface towards TG.
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 | IPsec 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 and
252 | | ... | DUT1-DUT2 links. Set routing for encrypted traffic on both DUT nodes
253 | | ... | with prefix /8 and next hop of neighbour DUT or TG interface IPv4
254 | | ... | address.
255 | | ...
256 | | VPP Show Crypto Device Mapping | ${dut1}
257 | | VPP Show Crypto Device Mapping | ${dut2}
258 | | VPP interfaces in path are up in a 3-node circular topology
259 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
260 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
261 | | ${dut1_if1_mac}= | Get Interface MAC | ${dut1} | ${dut1_if1}
262 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
263 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
264 | | ${dut2_if2_mac}= | Get Interface MAC | ${dut2} | ${dut2_if2}
265 | | Set Interface State | ${dut1} | ${dut1_if1} | up
266 | | Set Interface State | ${dut1} | ${dut1_if2} | up
267 | | Set Interface State | ${dut2} | ${dut2_if1} | up
268 | | Set Interface State | ${dut2} | ${dut2_if2} | up
269 | | Set Test Variable | ${tg_if1_mac}
270 | | Set Test Variable | ${tg_if2_mac}
271 | | Set Test Variable | ${dut1_if1_mac}
272 | | Set Test Variable | ${dut1_if2_mac}
273 | | Set Test Variable | ${dut2_if1_mac}
274 | | Set Test Variable | ${dut2_if2_mac}
275 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4}
276 | | ... | 24
277 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | ${dut1_if2_ip4}
278 | | ... | 24
279 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | ${dut2_if1_ip4}
280 | | ... | 24
281 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | ${dut2_if2_ip4}
282 | | ... | 24
283 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
284 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_if1_ip4} | ${dut2_if1_mac}
285 | | Add arp on dut | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
286 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_if2_ip4} | ${dut1_if2_mac}
287 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | ${tg_if1_ip4} | ${dut1_if1}
288 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | ${tg_if2_ip4} | ${dut2_if2}
289
290 | IPv4 forwarding initialized in a 3-node circular topology
291 | | [Documentation]
292 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
293 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
294 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
295 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
296 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
297 | | ...
298 | | Set Interface State | ${dut1} | ${dut1_if1} | up
299 | | Set Interface State | ${dut1} | ${dut1_if2} | up
300 | | Set Interface State | ${dut2} | ${dut2_if1} | up
301 | | Set Interface State | ${dut2} | ${dut2_if2} | up
302 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
303 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
304 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
305 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
306 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
307 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
308 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
309 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
310 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
311 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
312 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
313 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
314 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
315 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
316 | | All Vpp Interfaces Ready Wait | ${nodes}
317
318 | IPv4 forwarding initialized in a 2-node switched topology
319 | | [Documentation]
320 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node circular
321 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
322 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
323 | | ... | /30 prefix on DUT1 link. Set routing on DUT node with prefix /24 and
324 | | ... | next hop of neighbour DUT interface IPv4 address.
325 | | ...
326 | | Set Interface State | ${dut1} | ${dut1_if1} | up
327 | | Set Interface State | ${dut1} | ${dut1_if2} | up
328 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
329 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
330 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.3 | ${tg1_if1_mac}
331 | | dut1_v4.set_arp | ${dut1_if2} | 20.20.20.3 | ${tg1_if2_mac}
332 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.2 | 24
333 | | dut1_v4.set_ip | ${dut1_if2} | 20.20.20.2 | 24
334 | | All Vpp Interfaces Ready Wait | ${nodes}
335
336 | Scale IPv4 forwarding initialized in a 3-node circular topology
337 | | [Documentation]
338 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
339 | | ... | DUT nodes in 3-node circular topology
340 | | ...
341 | | ... | *Arguments:*
342 | | ... | - ${count} - IP route count. Type: integer
343 | | ...
344 | | ... | *Return:*
345 | | ... | - No value returned
346 | | ...
347 | | ... | *Example:*
348 | | ...
349 | | ... | \| Scale IPv4 forwarding initialized in a 3-node circular topology \
350 | | ... | \| 100000 \|
351 | | ...
352 | | [Arguments] | ${count}
353 | | ...
354 | | Set Interface State | ${dut1} | ${dut1_if1} | up
355 | | Set Interface State | ${dut1} | ${dut1_if2} | up
356 | | Set Interface State | ${dut2} | ${dut2_if1} | up
357 | | Set Interface State | ${dut2} | ${dut2_if2} | up
358 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
359 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
360 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
361 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
362 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
363 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
364 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
365 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
366 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
367 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
368 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
369 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
370 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
371 | | ... | count=${count}
372 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
373 | | ... | count=${count}
374 | | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
375 | | ... | count=${count}
376 | | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
377 | | ... | count=${count}
378 | | All Vpp Interfaces Ready Wait | ${nodes}
379
380 | IPv4 forwarding with vhost initialized in a 3-node circular topology
381 | | [Documentation]
382 | | ... | Create vhost-user interfaces in VPP. Set UP state of all VPP
383 | | ... | interfaces in path on nodes in 3-node circular topology. Create 2
384 | | ... | FIB tables on each DUT with multipath routing. Assign pair of
385 | | ... | Physical and Virtual interfaces on both nodes to each FIB table.
386 | | ... | Setup IPv4 addresses with /30 prefix on DUT-TG links and /30 prefix
387 | | ... | on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB tables
388 | | ... | with prefix /24 and next hop of neighbour IPv4 address. Setup
389 | | ... | ARP on all VPP interfaces.
390 | | ...
391 | | ... | *Arguments:*
392 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
393 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
394 | | ...
395 | | ... | *Return:*
396 | | ... | - No value returned
397 | | ...
398 | | ... | *Example:*
399 | | ...
400 | | ... | \| IPv4 forwarding with vhost initialized in a 3-node circular \
401 | | ... | topology \| /tmp/sock1 \| /tmp/sock2 \|
402 | | ...
403 | | [Arguments] | ${sock1} | ${sock2}
404 | | ...
405 | | VPP interfaces in path are up in a 3-node circular topology
406 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
407 | | ... | ${sock1} | ${sock2}
408 | | ${dut1_vif1}= | Set Variable | ${vhost_if1}
409 | | ${dut1_vif2}= | Set Variable | ${vhost_if2}
410 | | Set Interface State | ${dut1} | ${dut1_vif1} | up
411 | | Set Interface State | ${dut1} | ${dut1_vif2} | up
412 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
413 | | ... | ${sock1} | ${sock2}
414 | | ${dut2_vif1}= | Set Variable | ${vhost_if1}
415 | | ${dut2_vif2}= | Set Variable | ${vhost_if2}
416 | | Set Interface State | ${dut2} | ${dut2_vif1} | up
417 | | Set Interface State | ${dut2} | ${dut2_vif2} | up
418 | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif1}
419 | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif2}
420 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
421 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
422 | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif1}
423 | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif2}
424 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
425 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
426 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
427 | | ... | via 4.4.4.2 sw_if_index ${dut1_vif1_idx} multipath
428 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
429 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
430 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
431 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
432 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
433 | | ... | via 5.5.5.2 sw_if_index ${dut1_vif2_idx} multipath
434 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
435 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
436 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
437 | | ... | via 4.4.4.1 sw_if_index ${dut2_vif1_idx} multipath
438 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
439 | | ... | via 5.5.5.2 sw_if_index ${dut2_vif2_idx} multipath
440 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
441 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
442 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
443 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif1} | ${fib_table_1}
444 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
445 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif2} | ${fib_table_2}
446 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
447 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif1} | ${fib_table_1}
448 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
449 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif2} | ${fib_table_2}
450 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
451 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
452 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif1} | 4.4.4.1 | 30
453 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif2} | 5.5.5.1 | 30
454 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
455 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
456 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif1} | 4.4.4.1 | 30
457 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif2} | 5.5.5.1 | 30
458 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
459 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
460 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
461 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
462 | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
463 | | ... | ${dut1_vif1_idx}
464 | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
465 | | ... | ${dut1_vif2_idx}
466 | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
467 | | ... | ${dut2_vif1_idx}
468 | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
469 | | ... | ${dut2_vif2_idx}
470 | | Set Test Variable | ${dut1_vif1_mac}
471 | | Set Test Variable | ${dut1_vif2_mac}
472 | | Set Test Variable | ${dut2_vif1_mac}
473 | | Set Test Variable | ${dut2_vif2_mac}
474 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
475 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
476 | | Add arp on dut | ${dut1} | ${dut1_vif1} | 4.4.4.2 | 52:54:00:00:04:01
477 | | Add arp on dut | ${dut1} | ${dut1_vif2} | 5.5.5.2 | 52:54:00:00:04:02
478 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
479 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
480 | | Add arp on dut | ${dut2} | ${dut2_vif1} | 4.4.4.2 | 52:54:00:00:04:01
481 | | Add arp on dut | ${dut2} | ${dut2_vif2} | 5.5.5.2 | 52:54:00:00:04:02
482 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut1_vif1}
483 | | ... | vrf=${fib_table_1}
484 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
485 | | ... | vrf=${fib_table_1}
486 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
487 | | ... | vrf=${fib_table_2}
488 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut1_vif2}
489 | | ... | vrf=${fib_table_2}
490 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut2_vif1}
491 | | ... | vrf=${fib_table_1}
492 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
493 | | ... | vrf=${fib_table_1}
494 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
495 | | ... | vrf=${fib_table_2}
496 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut2_vif2}
497 | | ... | vrf=${fib_table_2}
498
499 | IPv4 forwarding with Vhost-User for '${nr}' VMs initialized in a 3-node circular topology
500 | | [Documentation]
501 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
502 | | ... | VPP nodes. Set UP state of all VPP interfaces in path. Create ${nr}+1
503 | | ... | FIB tables on each DUT with multipath routing. Assign each Virtual
504 | | ... | interface to FIB table with Physical interface or Virtual interface on
505 | | ... | both nodes. Setup IPv4 addresses with /30 prefix on DUT-TG links and
506 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB
507 | | ... | tables with prefix /24 and next hop of neighbour IPv4 address. Setup
508 | | ... | ARP on all VPP interfaces.
509 | | ...
510 | | ... | *Arguments:*
511 | | ... | _None_
512 | | ...
513 | | ... | *Note:*
514 | | ... | Socket paths for VM are defined in following format:
515 | | ... | - /tmp/sock-${VM_ID}-1
516 | | ... | - /tmp/sock-${VM_ID}-2
517 | | ...
518 | | ... | *Return:*
519 | | ... | - No value returned
520 | | ...
521 | | ... | *Example:*
522 | | ...
523 | | ... | \| IPv4 forwarding with Vhost-User for '2' VMs initialized in \
524 | | ... | a 3-node circular topology \|
525 | | ...
526 | | VPP interfaces in path are up in a 3-node circular topology
527 | | ${fib_table_1}= | Set Variable | ${101}
528 | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nr}
529 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
530 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
531 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
532 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
533 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
534 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
535 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
536 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
537 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
538 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
539 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
540 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
541 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
542 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
543 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
544 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
545 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
546 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
547 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
548 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
549 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
550 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
551 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
552 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
553 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
554 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
555 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
556 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
557 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
558 | | ... | vrf=${fib_table_1}
559 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
560 | | ... | vrf=${fib_table_2}
561 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
562 | | ... | vrf=${fib_table_1}
563 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
564 | | ... | vrf=${fib_table_2}
565 | | ${ip_base_start}= | Set Variable | ${4}
566 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
567 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
568 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
569 | |      | ${fib_table_1}= | Evaluate | ${100}+${number}
570 | |      | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
571 | |      | ${ip_base_vif1}= | Evaluate | ${ip_base_start}+(${number}-1)*2
572 | |      | ${ip_base_vif2}= | Evaluate | ${ip_base_vif1}+1
573 | |      | ${ip_net_vif1}= | Set Variable
574 | |      | ... | ${ip_base_vif1}.${ip_base_vif1}.${ip_base_vif1}
575 | |      | ${ip_net_vif2}= | Set Variable
576 | |      | ... | ${ip_base_vif2}.${ip_base_vif2}.${ip_base_vif2}
577 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
578 | |      | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
579 | |      | ... | dut1-vhost-${number}-if2
580 | |      | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
581 | |      | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
582 | |      | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1}
583 | |      | ... | ${dut1-vhost-${number}-if1}
584 | |      | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1}
585 | |      | ... | ${dut1-vhost-${number}-if2}
586 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
587 | |      | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
588 | |      | ... | dut2-vhost-${number}-if2
589 | |      | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if1} | up
590 | |      | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if2} | up
591 | |      | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2}
592 | |      | ... | ${dut2-vhost-${number}-if1}
593 | |      | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2}
594 | |      | ... | ${dut2-vhost-${number}-if2}
595 | |      | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
596 | |      | ... | via ${ip_net_vif1}.1 sw_if_index ${dut1_vif1_idx} multipath
597 | |      | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
598 | |      | ... | via ${ip_net_vif2}.2 sw_if_index ${dut1_vif2_idx} multipath
599 | |      | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
600 | |      | ... | via ${ip_net_vif1}.1 sw_if_index ${dut2_vif1_idx} multipath
601 | |      | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
602 | |      | ... | via ${ip_net_vif2}.2 sw_if_index ${dut2_vif2_idx} multipath
603 | |      | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
604 | |      | ... | ${fib_table_1}
605 | |      | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
606 | |      | ... | ${fib_table_2}
607 | |      | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if1}
608 | |      | ... | ${fib_table_1}
609 | |      | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if2}
610 | |      | ... | ${fib_table_2}
611 | |      | IP addresses are set on interfaces
612 | |      | ... | ${dut1} | ${dut1-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
613 | |      | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
614 | |      | ... | ${dut2} | ${dut2-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
615 | |      | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
616 | |      | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
617 | |      | ... | ${dut1_vif1_idx}
618 | |      | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
619 | |      | ... | ${dut1_vif2_idx}
620 | |      | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
621 | |      | ... | ${dut2_vif1_idx}
622 | |      | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
623 | |      | ... | ${dut2_vif2_idx}
624 | |      | Set Test Variable | ${dut1-vhost-${number}-if1_mac}
625 | |      | ... | ${dut1_vif1_mac}
626 | |      | Set Test Variable | ${dut1-vhost-${number}-if2_mac}
627 | |      | ... | ${dut1_vif2_mac}
628 | |      | Set Test Variable | ${dut2-vhost-${number}-if1_mac}
629 | |      | ... | ${dut2_vif1_mac}
630 | |      | Set Test Variable | ${dut2-vhost-${number}-if2_mac}
631 | |      | ... | ${dut2_vif2_mac}
632 | |      | ${qemu_id}= | Set Variable If | ${number} < 10 | 0${number}
633 | |      | ... | ${number}
634 | |      | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if1}
635 | |      | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
636 | |      | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if2}
637 | |      | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
638 | |      | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if1}
639 | |      | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
640 | |      | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if2}
641 | |      | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
642 | |      | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
643 | |      | ... | ${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
644 | |      | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
645 | |      | ... | ${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
646 | |      | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
647 | |      | ... | ${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
648 | |      | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
649 | |      | ... | ${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
650
651 | IPv4 policer 2r3c-${t} initialized in a 3-node circular topology
652 | | [Documentation]
653 | | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
654 | | ... | on all DUT nodes in 3-node circular topology. Policer is applied on
655 | | ... | links TG - DUT1 and DUT2 - TG.
656 | | ...
657 | | ${dscp}= | DSCP AF22
658 | | Policer Set Name | policer1
659 | | Policer Set CIR | ${cir}
660 | | Policer Set EIR | ${eir}
661 | | Policer Set CB | ${cb}
662 | | Policer Set EB | ${eb}
663 | | Policer Set Rate Type pps
664 | | Policer Set Round Type Closest
665 | | Policer Set Type 2R3C 2698
666 | | Policer Set Conform Action Transmit
667 | | Policer Set Exceed Action Mark and Transmit | ${dscp}
668 | | Policer Set Violate Action Transmit
669 | | Policer Enable Color Aware
670 | | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
671 | | Policer Classify Set Precolor Exceed
672 | | Policer Set Node | ${dut1}
673 | | Policer Classify Set Interface | ${dut1_if1}
674 | | Policer Classify Set Match IP | 20.20.20.2 | ${False}
675 | | Policer Set Configuration
676 | | Policer Set Node | ${dut2}
677 | | Policer Classify Set Interface | ${dut2_if2}
678 | | Policer Classify Set Match IP | 10.10.10.2 | ${False}
679 | | Policer Set Configuration
680
681 | IPv6 forwarding initialized in a 3-node circular topology
682 | | [Documentation]
683 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
684 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
685 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
686 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
687 | | ... | next hop of neighbour DUT interface IPv6 address.
688 | | ...
689 | | ${prefix}= | Set Variable | 64
690 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
691 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
692 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
693 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
694 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
695 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
696 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
697 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
698 | | Vpp nodes ra suppress link layer | ${nodes}
699 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
700 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
701 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
702 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
703 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
704 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
705
706 | Scale IPv6 forwarding initialized in a 3-node circular topology
707 | | [Documentation]
708 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
709 | | ... | DUT nodes in 3-node circular topology
710 | | ...
711 | | ... | *Arguments:*
712 | | ... | - ${count} - IP route count. Type: integer
713 | | ...
714 | | ... | *Return:*
715 | | ... | - No value returned
716 | | ...
717 | | ... | *Example:*
718 | | ...
719 | | ... | \| Scale IPv6 forwarding initialized in a 3-node circular topology \
720 | | ... | \| 100000 \|
721 | | ...
722 | | [Arguments] | ${count}
723 | | ...
724 | | ${subn_prefix}= | Set Variable | 64
725 | | ${host_prefix}= | Set Variable | 128
726 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
727 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
728 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
729 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
730 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
731 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
732 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
733 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
734 | | Vpp nodes ra suppress link layer | ${nodes}
735 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
736 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
737 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
738 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
739 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
740 | | ... | interface=${dut1_if2} | count=${count}
741 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
742 | | ... | interface=${dut1_if1} | count=${count}
743 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
744 | | ... | interface=${dut2_if1} | count=${count}
745 | | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
746 | | ... | interface=${dut2_if2} | count=${count}
747
748 | IPv6 iAcl whitelist initialized in a 3-node circular topology
749 | | [Documentation]
750 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
751 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
752 | | ...
753 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
754 | | ... | ${dut1} | ip6 | dst
755 | | And Vpp Configures Classify Session L3
756 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
757 | | ... | ip6 | dst | 2001:2::2
758 | | And Vpp Enable Input Acl Interface
759 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
760 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
761 | | ... | ${dut2} | ip6 | dst
762 | | And Vpp Configures Classify Session L3
763 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
764 | | ... | ip6 | dst | 2001:1::2
765 | | And Vpp Enable Input Acl Interface
766 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
767
768 | L2 xconnect initialized in a 3-node circular topology
769 | | [Documentation]
770 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
771 | | ... | each DUT. Interfaces are brought up.
772 | | ... |
773 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
774 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
775 | | All Vpp Interfaces Ready Wait | ${nodes}
776
777 | L2 xconnect with VXLANoIPv4 initialized in a 3-node circular topology
778 | | [Documentation]
779 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
780 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
781 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
782 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
783 | | ... | interfaces.
784 | | ...
785 | | VPP interfaces in path are up in a 3-node circular topology
786 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
787 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
788 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
789 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
790 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
791 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
792 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
793 | | ... | 172.16.0.1 | 172.16.0.2
794 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
795 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
796 | | ... | 172.16.0.2 | 172.16.0.1
797 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
798
799 | L2 xconnect with Vhost-User initialized in a 3-node circular topology
800 | | [Documentation]
801 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
802 | | ... | connect each Vhost interface with one physical interface.
803 | | ...
804 | | ... | *Arguments:*
805 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
806 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
807 | | ...
808 | | ... | *Example:*
809 | | ...
810 | | ... | \| L2 xconnect with Vhost-User initialized in a 3-node \
811 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \|
812 | | ...
813 | | [Arguments] | ${sock1} | ${sock2}
814 | | ...
815 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
816 | | ... | ${sock1} | ${sock2}
817 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
818 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if2} | ${vhost_if2}
819 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
820 | | ... | ${sock1} | ${sock2}
821 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${vhost_if1}
822 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
823 | | All Vpp Interfaces Ready Wait | ${nodes}
824
825 | L2 xconnect with Vhost-User for '${nr}' initialized in a 3-node circular topology
826 | | [Documentation]
827 | | ... | Create pairs of Vhost-User interfaces on all defined VPP nodes. Cross
828 | | ... | connect each Vhost interface with one physical interface or virtual
829 | | ... | interface to create a chain accross DUT node.
830 | | ...
831 | | ... | *Arguments:*
832 | | ... | _None_
833 | | ...
834 | | ... | *Note:*
835 | | ... | Socket paths for VM are defined in following format:
836 | | ... | - /tmp/sock-${VM_ID}-1
837 | | ... | - /tmp/sock-${VM_ID}-2
838 | | ...
839 | | ... | *Example:*
840 | | ...
841 | | ... | \| L2 xconnect with Vhost-User for '2' initialized in a 3-node \
842 | | ... | circular topology \|
843 | | ...
844 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
845 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
846 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
847 | |      | ${prev_index}= | Evaluate | ${number}-1
848 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
849 | |      | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
850 | |      | ... | dut1-vhost-${number}-if2
851 | |      | ${dut1_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut1_if1}
852 | |      | ... | ${dut1-vhost-${prev_index}-if2}
853 | |      | L2 setup xconnect on DUT | ${dut1} | ${dut1_xconnect_if1}
854 | |      | ... | ${dut1-vhost-${number}-if1}
855 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
856 | |      | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
857 | |      | ... | dut2-vhost-${number}-if2
858 | |      | ${dut2_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut2_if1}
859 | |      | ... | ${dut2-vhost-${prev_index}-if2}
860 | |      | L2 setup xconnect on DUT | ${dut2} | ${dut2_xconnect_if1}
861 | |      | ... | ${dut2-vhost-${number}-if1}
862 | |      | Run Keyword If | ${number}==${nr} | L2 setup xconnect on DUT
863 | |      | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${dut1_if2}
864 | |      | Run Keyword If | ${number}==${nr} | L2 setup xconnect on DUT
865 | |      | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${dut2_if2}
866
867 | L2 xconnect with Vhost-User and VLAN initialized in a 3-node circular topology
868 | | [Documentation]
869 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
870 | | ... | connect each Vhost interface with one physical interface.
871 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
872 | | ...
873 | | ... | *Arguments:*
874 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
875 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
876 | | ... | - subid - ID of the sub-interface to be created. Type: string
877 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
878 | | ...
879 | | ... | *Example:*
880 | | ...
881 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
882 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
883 | | ...
884 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
885 | | ...
886 | | VPP interfaces in path are up in a 3-node circular topology
887 | | VLAN dot1q subinterfaces initialized on 3-node topology
888 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
889 | | L2 tag rewrite method setup on interfaces
890 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
891 | | ... | ${tag_rewrite}
892 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
893 | | ... | ${sock1} | ${sock2}
894 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
895 | | L2 setup xconnect on DUT | ${dut1} | ${subif_index_1} | ${vhost_if2}
896 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
897 | | ... | ${sock1} | ${sock2}
898 | | L2 setup xconnect on DUT | ${dut2} | ${subif_index_2} | ${vhost_if1}
899 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
900 | | All Vpp Interfaces Ready Wait | ${nodes}
901
902 | L2 bridge domain initialized in a 3-node circular topology
903 | | [Documentation]
904 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
905 | | ... | that is created automatically with index 1. Learning is enabled.
906 | | ... | Interfaces are brought up.
907 | | ...
908 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
909 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
910 | | All Vpp Interfaces Ready Wait | ${nodes}
911
912 | L2 bridge domains with Vhost-User initialized in a 3-node circular topology
913 | | [Documentation]
914 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
915 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
916 | | ... | with physical inteface.
917 | | ...
918 | | ... | *Arguments:*
919 | | ... | - bd_id1 - Bridge domain ID. Type: integer
920 | | ... | - bd_id2 - Bridge domain ID. Type: integer
921 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
922 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
923 | | ...
924 | | ... | *Example:*
925 | | ...
926 | | ... | \| L2 bridge domains with Vhost-User initialized in a 3-node \
927 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
928 | | ...
929 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
930 | | ...
931 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
932 | | ... | ${sock1} | ${sock2}
933 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
934 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
935 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
936 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
937 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
938 | | ... | ${sock1} | ${sock2}
939 | | Interface is added to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id1}
940 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
941 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
942 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
943 | | All Vpp Interfaces Ready Wait | ${nodes}
944
945 | L2 bridge domains with Vhost-User for '${nr}' VMs initialized in a 3-node circular topology
946 | | [Documentation]
947 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
948 | | ... | defined VPP nodes. Add each Vhost-User interface into L2 bridge
949 | | ... | domains with learning enabled with physical inteface or Vhost-User
950 | | ... | interface of another VM.
951 | | ...
952 | | ... | *Arguments:*
953 | | ... | _None_
954 | | ...
955 | | ... | *Note:*
956 | | ... | Socket paths for VM are defined in following format:
957 | | ... | - /tmp/sock-${VM_ID}-1
958 | | ... | - /tmp/sock-${VM_ID}-2
959 | | ...
960 | | ... | *Example:*
961 | | ...
962 | | ... | \| L2 bridge domains with Vhost-User for '2' VMs initialized in \
963 | | ... | a 3-node circular topology \|
964 | | ...
965 | | ${bd_id2}= | Evaluate | ${nr}+1
966 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${1}
967 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
968 | | Interface is added to bridge domain | ${dut2} | ${dut2_if1} | ${1}
969 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
970 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
971 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
972 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
973 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
974 | |      | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
975 | |      | ... | dut1-vhost-${number}-if2
976 | |      | ${bd_id2}= | Evaluate | ${number}+1
977 | |      | Interface is added to bridge domain | ${dut1}
978 | |      | ... | ${dut1-vhost-${number}-if1} | ${number}
979 | |      | Interface is added to bridge domain | ${dut1}
980 | |      | ... | ${dut1-vhost-${number}-if2} | ${bd_id2}
981 | |      | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
982 | |      | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
983 | |      | ... | dut2-vhost-${number}-if2
984 | |      | Interface is added to bridge domain | ${dut2}
985 | |      | ... | ${dut2-vhost-${number}-if1} | ${number}
986 | |      | Interface is added to bridge domain | ${dut2}
987 | |      | ... | ${dut2-vhost-${number}-if2} | ${bd_id2}
988
989 | L2 bridge domain with VXLANoIPv4 initialized in a 3-node circular topology
990 | | [Documentation]
991 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
992 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
993 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
994 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
995 | | ... | interfaces.
996 | | ...
997 | | VPP interfaces in path are up in a 3-node circular topology
998 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
999 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
1000 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1001 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1002 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1003 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1004 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1005 | | ... | 172.16.0.1 | 172.16.0.2
1006 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1007 | | ... | 172.16.0.2 | 172.16.0.1
1008 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1009 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1010 | | All Vpp Interfaces Ready Wait | ${nodes}
1011
1012 | L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a 3-node circular topology
1013 | | [Documentation]
1014 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1015 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1016 | | ... | with physical inteface.
1017 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1018 | | ... | interfaces on each DUT. All interfaces are brought up.
1019 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1020 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1021 | | ...
1022 | | ... | *Arguments:*
1023 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1024 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1025 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1026 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1027 | | ...
1028 | | ... | *Example:*
1029 | | ...
1030 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1031 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1032 | | ...
1033 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1034 | | ...
1035 | | VPP interfaces in path are up in a 3-node circular topology
1036 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
1037 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
1038 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1039 | | ... | 172.16.0.1 | 172.16.0.2
1040 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1041 | | ... | 172.16.0.2 | 172.16.0.1
1042 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
1043 | | ... | ${sock1} | ${sock2}
1044 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1045 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1046 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1047 | | Interface is added to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1048 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
1049 | | ... | ${sock1} | ${sock2}
1050 | | Interface is added to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1051 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1052 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1053 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1054 | | All Vpp Interfaces Ready Wait | ${nodes}
1055
1056 | L2 bridge domains with Vhost-User initialized in a 2-node circular topology
1057 | | [Documentation]
1058 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1059 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1060 | | ... | with physical inteface.
1061 | | ...
1062 | | ... | *Arguments:*
1063 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1064 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1065 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1066 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1067 | | ...
1068 | | ... | *Example:*
1069 | | ...
1070 | | ... | \| L2 bridge domains with Vhost-User initialized in a 2-node \
1071 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1072 | | ...
1073 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1074 | | ...
1075 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
1076 | | ... | ${sock1} | ${sock2}
1077 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1078 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1079 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1080 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1081 | | All Vpp Interfaces Ready Wait | ${nodes}
1082
1083 | L2 bridge domains with Vhost-User and VLAN initialized in a 3-node circular topology
1084 | | [Documentation]
1085 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1086 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1087 | | ... | with physical inteface.
1088 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
1089 | | ...
1090 | | ... | *Arguments:*
1091 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1092 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1093 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1094 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1095 | | ... | - subid - ID of the sub-interface to be created. Type: string
1096 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1097 | | ...
1098 | | ... | *Example:*
1099 | | ...
1100 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
1101 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10\
1102 | | ... | pop-1 \|
1103 | | ...
1104 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1105 | | ... | ${tag_rewrite}
1106 | | ...
1107 | | VPP interfaces in path are up in a 3-node circular topology
1108 | | VLAN dot1q subinterfaces initialized on 3-node topology
1109 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1110 | | L2 tag rewrite method setup on interfaces
1111 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1112 | | ... | ${tag_rewrite}
1113 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
1114 | | ... | ${sock1} | ${sock2}
1115 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1116 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1117 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1118 | | Interface is added to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1119 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
1120 | | ... | ${sock1} | ${sock2}
1121 | | Interface is added to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1122 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1123 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1124 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1125 | | All Vpp Interfaces Ready Wait | ${nodes}
1126
1127 | 2-node Performance Suite Setup with DUT's NIC model
1128 | | [Documentation]
1129 | | ... | Suite preparation phase that setup default startup configuration of
1130 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
1131 | | ... | variables used in test cases based on interface model provided as an
1132 | | ... | argument. Initializes traffic generator.
1133 | | ...
1134 | | ... | *Arguments:*
1135 | | ... | - topology_type - Topology type. Type: string
1136 | | ... | - nic_model - Interface model. Type: string
1137 | | ...
1138 | | ... | *Example:*
1139 | | ...
1140 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
1141 | | ...
1142 | | [Arguments] | ${topology_type} | ${nic_model}
1143 | | ...
1144 | | Show vpp version on all DUTs
1145 | | 2-node circular Topology Variables Setup with DUT interface model
1146 | | ... | ${nic_model}
1147 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
1148 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
1149
1150 | 2-node-switched Performance Suite Setup with DUT's NIC model
1151 | | [Documentation]
1152 | | ... | Suite preparation phase that setup default startup configuration of
1153 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
1154 | | ... | variables used in test cases based on interface model provided as an
1155 | | ... | argument. Initializes traffic generator.
1156 | | ...
1157 | | ... | *Arguments:*
1158 | | ... | - topology_type - Topology type. Type: string
1159 | | ... | - nic_model - Interface model. Type: string
1160 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
1161 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
1162 | | ...
1163 | | ... | *Example:*
1164 | | ...
1165 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
1166 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
1167 | | ...
1168 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
1169 | | ... | ${tg_if2_dest_mac}
1170 | | ...
1171 | | Show vpp version on all DUTs
1172 | | 2-node circular Topology Variables Setup with DUT interface model
1173 | | ... | ${nic_model}
1174 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
1175 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
1176 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
1177
1178 | 3-node Performance Suite Setup with DUT's NIC model
1179 | | [Documentation]
1180 | | ... | Suite preparation phase that setup default startup configuration of
1181 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
1182 | | ... | variables used in test cases based on interface model provided as an
1183 | | ... | argument. Initializes traffic generator.
1184 | | ...
1185 | | ... | *Arguments:*
1186 | | ... | - topology_type - Topology type. Type: string
1187 | | ... | - nic_model - Interface model. Type: string
1188 | | ...
1189 | | ... | *Example:*
1190 | | ...
1191 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
1192 | | ...
1193 | | [Arguments] | ${topology_type} | ${nic_model}
1194 | | ...
1195 | | Show vpp version on all DUTs
1196 | | 3-node circular Topology Variables Setup with DUT interface model
1197 | | ... | ${nic_model}
1198 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
1199 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
1200
1201 | 3-node Performance Suite Teardown
1202 | | [Documentation]
1203 | | ... | Suite teardown phase with traffic generator teardown.
1204 | | ...
1205 | | Teardown traffic generator | ${tg}
1206
1207 | 2-node Performance Suite Teardown
1208 | | [Documentation]
1209 | | ... | Suite teardown phase with traffic generator teardown.
1210 | | ...
1211 | | Teardown traffic generator | ${tg}
1212
1213 | Find NDR using linear search and pps
1214 | | [Documentation]
1215 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
1216 | | ...
1217 | | ... | *Arguments:*
1218 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1219 | | ... | - start_rate - Initial start rate [pps]. Type: float
1220 | | ... | - step_rate - Step of linear search [pps]. Type: float
1221 | | ... | - topology_type - Topology type. Type: string
1222 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1223 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1224 | | ...
1225 | | ... | *Return:*
1226 | | ... | - No value returned
1227 | | ...
1228 | | ... | *Example:*
1229 | | ...
1230 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \
1231 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \|
1232 | | ...
1233 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1234 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
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 | | Linear Search | ${start_rate} | ${topology_type}
1243 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1244 | | ${tmp}= | Create List | 100%NDR | ${lat}
1245 | | ${latency}= | Create List | ${tmp}
1246 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1247 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1248 | | ... | ${framesize} | ${topology_type}
1249 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1250 | | Append To List | ${latency} | ${tmp}
1251 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1252 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1253 | | ... | ${framesize} | ${topology_type}
1254 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1255 | | Append To List | ${latency} | ${tmp}
1256 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1257 | | ... | ${latency}
1258 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1259 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
1260
1261 | Find PDR using linear search and pps
1262 | | [Documentation]
1263 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
1264 | | ... | with PDR threshold and type specified by parameter.
1265 | | ...
1266 | | ... | *Arguments:*
1267 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1268 | | ... | - start_rate - Initial start rate [pps]. Type: float
1269 | | ... | - step_rate - Step of linear search [pps]. Type: float
1270 | | ... | - topology_type - Topology type. Type: string
1271 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1272 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1273 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1274 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1275 | | ...
1276 | | ... | *Example:*
1277 | | ...
1278 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
1279 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage \|
1280 | | ...
1281 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1282 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
1283 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1284 | | ...
1285 | | ${duration}= | Set Variable | ${perf_trial_duration}
1286 | | Set Duration | ${duration}
1287 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1288 | | Set Search Linear Step | ${step_rate}
1289 | | Set Search Frame Size | ${framesize}
1290 | | Set Search Rate Type pps
1291 | | Set Loss Acceptance | ${loss_acceptance}
1292 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1293 | | ... | Set Loss Acceptance Type Percentage
1294 | | Linear Search | ${start_rate} | ${topology_type}
1295 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1296 | | ${tmp}= | Create List | 100%PDR | ${lat}
1297 | | ${latency}= | Create List | ${tmp}
1298 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1299 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1300 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1301 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1302 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1303
1304 | Find NDR using binary search and pps
1305 | | [Documentation]
1306 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
1307 | | ...
1308 | | ... | *Arguments:*
1309 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1310 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1311 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1312 | | ... | - topology_type - Topology type. Type: string
1313 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1314 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1315 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1316 | | ...
1317 | | ... | *Example:*
1318 | | ...
1319 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
1320 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \|
1321 | | ...
1322 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1323 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1324 | | ...
1325 | | ${duration}= | Set Variable | ${perf_trial_duration}
1326 | | Set Duration | ${duration}
1327 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1328 | | Set Search Frame Size | ${framesize}
1329 | | Set Search Rate Type pps
1330 | | Set Binary Convergence Threshold | ${threshold}
1331 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1332 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1333 | | ${tmp}= | Create List | 100%NDR | ${lat}
1334 | | ${latency}= | Create List | ${tmp}
1335 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1336 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1337 | | ... | ${framesize} | ${topology_type}
1338 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1339 | | Append To List | ${latency} | ${tmp}
1340 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1341 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1342 | | ... | ${framesize} | ${topology_type}
1343 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1344 | | Append To List | ${latency} | ${tmp}
1345 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1346 | | ... | ${latency}
1347 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1348 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
1349
1350 | Find PDR using binary search and pps
1351 | | [Documentation]
1352 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
1353 | | ... | with PDR threshold and type specified by parameter.
1354 | | ...
1355 | | ... | *Arguments:*
1356 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1357 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1358 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1359 | | ... | - topology_type - Topology type. Type: string
1360 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1361 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1362 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1363 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1364 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1365 | | ...
1366 | | ... | *Example:*
1367 | | ...
1368 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
1369 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
1370 | | ... | \| percentage \|
1371 | | ...
1372 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1373 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1374 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1375 | | ...
1376 | | ${duration}= | Set Variable | ${perf_trial_duration}
1377 | | Set Duration | ${duration}
1378 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1379 | | Set Search Frame Size | ${framesize}
1380 | | Set Search Rate Type pps
1381 | | Set Loss Acceptance | ${loss_acceptance}
1382 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1383 | | ... | Set Loss Acceptance Type Percentage
1384 | | Set Binary Convergence Threshold | ${threshold}
1385 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1386 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1387 | | ${tmp}= | Create List | 100%PDR | ${lat}
1388 | | ${latency}= | Create List | ${tmp}
1389 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1390 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1391 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1392 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1393 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1394
1395 | Find NDR using combined search and pps
1396 | | [Documentation]
1397 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1398 | | ... | non drop rate.
1399 | | ...
1400 | | ... | *Arguments:*
1401 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1402 | | ... | - start_rate - Initial start rate [pps]. Type: float
1403 | | ... | - step_rate - Step of linear search [pps]. Type: float
1404 | | ... | - topology_type - Topology type. Type: string
1405 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1406 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1407 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1408 | | ...
1409 | | ... | *Example:*
1410 | | ...
1411 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
1412 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \|
1413 | | ...
1414 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1415 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1416 | | ...
1417 | | ${duration}= | Set Variable | ${perf_trial_duration}
1418 | | Set Duration | ${duration}
1419 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1420 | | Set Search Linear Step | ${step_rate}
1421 | | Set Search Frame Size | ${framesize}
1422 | | Set Search Rate Type pps
1423 | | Set Binary Convergence Threshold | ${threshold}
1424 | | Combined Search | ${start_rate} | ${topology_type}
1425 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1426 | | ${tmp}= | Create List | 100%NDR | ${lat}
1427 | | ${latency}= | Create List | ${tmp}
1428 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1429 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1430 | | ... | ${framesize} | ${topology_type}
1431 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1432 | | Append To List | ${latency} | ${tmp}
1433 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1434 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1435 | | ... | ${framesize} | ${topology_type}
1436 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1437 | | Append To List | ${latency} | ${tmp}
1438 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1439 | | ... | ${latency}
1440 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1441 | | ... | ${framesize} | ${topology_type}
1442 | | ... | fail_on_loss=${False}
1443
1444 | Find PDR using combined search and pps
1445 | | [Documentation]
1446 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1447 | | ... | partial drop rate with PDR threshold and type specified by parameter.
1448 | | ...
1449 | | ... | *Arguments:*
1450 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1451 | | ... | - start_rate - Initial start rate [pps]. Type: float
1452 | | ... | - step_rate - Step of linear search [pps]. Type: float
1453 | | ... | - topology_type - Topology type. Type: string
1454 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1455 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1456 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1457 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1458 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1459 | | ...
1460 | | ... | *Example:*
1461 | | ...
1462 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
1463 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
1464 | | ... | \| percentage \|
1465 | | ...
1466 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1467 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1468 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1469 | | ...
1470 | | ${duration}= | Set Variable | ${perf_trial_duration}
1471 | | Set Duration | ${duration}
1472 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1473 | | Set Search Linear Step | ${step_rate}
1474 | | Set Search Frame Size | ${framesize}
1475 | | Set Search Rate Type pps
1476 | | Set Loss Acceptance | ${loss_acceptance}
1477 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1478 | | ... | Set Loss Acceptance Type Percentage
1479 | | Set Binary Convergence Threshold | ${threshold}
1480 | | Combined Search | ${start_rate} | ${topology_type}
1481 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1482 | | ${tmp}= | Create List | 100%PDR | ${lat}
1483 | | ${latency}= | Create List | ${tmp}
1484 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1485 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1486 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1487 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1488 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1489
1490 | Display result of NDR search
1491 | | [Documentation]
1492 | | ... | Display result of NDR search in packet per seconds (total and per
1493 | | ... | stream) and Gbps total bandwidth with untagged packet.
1494 | | ... | Througput is calculated as:
1495 | | ... | Measured rate per stream * Total number of streams
1496 | | ... | Bandwidth is calculated as:
1497 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1498 | | ...
1499 | | ... | *Arguments:*
1500 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1501 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1502 | | ... | - nr_streams - Total number of streams. Type: integer
1503 | | ... | - latency - Latency stats. Type: dictionary
1504 | | ...
1505 | | ... | *Example:*
1506 | | ...
1507 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
1508 | | ... | \| [100%NDR, [10/10/10, 1/2/3]] \|
1509 | | ...
1510 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams} | ${latency}
1511 | | ...
1512 | | ${framesize}= | Get Frame Size | ${framesize}
1513 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1514 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1515 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1516 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1517 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1518 | | ... | append=yes
1519 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1520 | | :FOR | ${lat} | IN | @{latency}
1521 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1522
1523 | Display result of PDR search
1524 | | [Documentation]
1525 | | ... | Display result of PDR search in packet per seconds (total and per
1526 | | ... | stream) and Gbps total bandwidth with untagged packet.
1527 | | ... | Througput is calculated as:
1528 | | ... | Measured rate per stream * Total number of streams
1529 | | ... | Bandwidth is calculated as:
1530 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1531 | | ...
1532 | | ... | *Arguments:*
1533 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1534 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1535 | | ... | - nr_streams - Total number of streams. Type: integer
1536 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1537 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1538 | | ... | - latency - Latency stats. Type: dictionary
1539 | | ...
1540 | | ... | *Example:*
1541 | | ...
1542 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
1543 | | ... | \| percentage \| [100%NDR, [10/10/10, 1/2/3]] \|
1544 | | ...
1545 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
1546 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1547 | | ...
1548 | | ${framesize}= | Get Frame Size | ${framesize}
1549 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1550 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1551 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1552 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1553 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1554 | | ... | append=yes
1555 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1556 | | :FOR | ${lat} | IN | @{latency}
1557 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1558 | | Set Test Message
1559 | | ... | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
1560 | | ... | append=yes
1561
1562 | Measure latency pps
1563 | | [Documentation]
1564 | | ... | Send traffic at specified rate. Measure min/avg/max latency
1565 | | ...
1566 | | ... | *Arguments:*
1567 | | ... | - duration - Duration of traffic run [s]. Type: integer
1568 | | ... | - rate - Rate for sending packets. Type: integer
1569 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1570 | | ... | - topology_type - Topology type. Type: string
1571 | | ...
1572 | | ... | *Example:*
1573 | | ...
1574 | | ... | \| Measure latency \| 10 \| 4.0 \| 64 \| 3-node-IPv4 \|
1575 | | ...
1576 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1577 | | ...
1578 | | Return From Keyword If | ${rate} <= 10000 | ${-1}
1579 | | ${ret}= | For DPDK Performance Test
1580 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1581 | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize}
1582 | | ... | ${topology_type} | warmup_time=0
1583 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1584 | | Run keyword and return | Get latency
1585
1586 | Traffic should pass with no loss
1587 | | [Documentation]
1588 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
1589 | | ... | evaluation.
1590 | | ...
1591 | | ... | *Arguments:*
1592 | | ... | - duration - Duration of traffic run [s]. Type: integer
1593 | | ... | - rate - Rate for sending packets. Type: string
1594 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1595 | | ... | - topology_type - Topology type. Type: string
1596 | | ... | - fail_on_loss - If True, the keyword fails if loss occurred.
1597 | | ... | Type: boolean
1598 | | ...
1599 | | ... | *Example:*
1600 | | ...
1601 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
1602 | | ... | \| 3-node-IPv4 \|
1603 | | ...
1604 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1605 | | ... | ${fail_on_loss}=${True}
1606 | | ...
1607 | | Clear and show runtime counters with running traffic | ${duration}
1608 | | ... | ${rate} | ${framesize} | ${topology_type}
1609 | | ${ret}= | For DPDK Performance Test
1610 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1611 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1612 | | ... | ${topology_type} | warmup_time=0
1613 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1614 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
1615
1616 | Traffic should pass with partial loss
1617 | | [Documentation]
1618 | | ... | Send traffic at specified rate. Partial packet loss is accepted
1619 | | ... | within loss acceptance value specified as argument.
1620 | | ...
1621 | | ... | *Arguments:*
1622 | | ... | - duration - Duration of traffic run [s]. Type: integer
1623 | | ... | - rate - Rate for sending packets. Type: string
1624 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1625 | | ... | - topology_type - Topology type. Type: string
1626 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1627 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1628 | | ...
1629 | | ... | *Example:*
1630 | | ...
1631 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1632 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1633 | | ...
1634 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1635 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1636 | | ... | ${fail_on_loss}=${True}
1637 | | ...
1638 | | Clear and show runtime counters with running traffic | ${duration}
1639 | | ... | ${rate} | ${framesize} | ${topology_type}
1640 | | ${ret}= | For DPDK Performance Test
1641 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1642 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1643 | | ... | ${topology_type} | warmup_time=0
1644 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1645 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
1646 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1647
1648 | Clear and show runtime counters with running traffic
1649 | | [Documentation]
1650 | | ... | Start traffic at specified rate then clear runtime counters on all
1651 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
1652 | | ... | on all DUTs. Finally stop traffic
1653 | | ...
1654 | | ... | *Arguments:*
1655 | | ... | - duration - Duration of traffic run [s]. Type: integer
1656 | | ... | - rate - Rate for sending packets. Type: string
1657 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1658 | | ... | - topology_type - Topology type. Type: string
1659 | | ...
1660 | | ... | *Example:*
1661 | | ...
1662 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1663 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1664 | | ...
1665 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1666 | | ...
1667 | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type}
1668 | | ... | warmup_time=0 | async_call=${True} | latency=${False}
1669 | | ${ret}= | For DPDK Performance Test
1670 | | Run Keyword If | ${ret}==${FALSE} | Clear runtime counters on all DUTs
1671 | | Sleep | ${duration}
1672 | | Run Keyword If | ${ret}==${FALSE} | Show runtime counters on all DUTs
1673 | | Stop traffic on tg
1674
1675 | Add PCI devices to DUTs from 3-node single link topology
1676 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1677 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1678 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
1679 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
1680 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
1681 | | Add PCI device | ${dut2} | ${dut2_if1_pci} | ${dut2_if2_pci}
1682
1683 | Add PCI devices to DUTs from 2-node single link topology
1684 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1685 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1686 | | Add PCI device | ${dut1} | ${dut1_if1_pci} | ${dut1_if2_pci}
1687
1688 | Guest VM with dpdk-testpmd connected via vhost-user is setup
1689 | | [Documentation]
1690 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1691 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1692 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1693 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1694 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1695 | | ...
1696 | | ... | *Arguments:*
1697 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1698 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1699 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1700 | | ... | - vm_name - QemuUtil instance name. Type: string
1701 | | ... | - skip - Number of cpus which will be skipped. Type: integer
1702 | | ... | - count - Number of cpus which will be allocated for qemu.
1703 | | ... | Type: integer
1704 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1705 | | ... | Type: integer
1706 | | ...
1707 | | ... | *Example:*
1708 | | ...
1709 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1710 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1711 | | ... | \| ${5} \|
1712 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1713 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1714 | | ... | \| qemu_id=${2} \|
1715 | | ...
1716 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1717 | | ... | ${count}=${5} | ${qemu_id}=${1}
1718 | | ...
1719 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1720 | | ... | WITH NAME | ${vm_name}
1721 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1722 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1723 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1724 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1725 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1726 | | ... | ${dut1_if1} | ${dut1_if2}
1727 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1728 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1729 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1730 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1731 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1732 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
1733 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1734 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1735 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1736 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1737 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1738 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1739 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1740 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1741 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1742 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1743 | | Return From Keyword | ${vm}
1744
1745 | '${nr}' Guest VMs with dpdk-testpmd connected via vhost-user is setup in a 3-node circular topology
1746 | | [Documentation]
1747 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1748 | | ... | DPDK testpmd for defined number of VMs on all defined VPP nodes.
1749 | | ...
1750 | | ... | *Arguments:*
1751 | | ... | _None_
1752 | | ...
1753 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1754 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1755 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1756 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1757 | | ...
1758 | | ... | *Example:*
1759 | | ...
1760 | | ... | \| '2' Guest VM with dpdk-testpmd connected via vhost-user is setup \
1761 | | ... | in a 3-node circular topology \|
1762 | | ...
1763 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1764 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1765 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1766 | |      | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1767 | |      | ${vm1}= | Guest VM with dpdk-testpmd connected via vhost-user is setup
1768 | |      | ...     | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1769 | |      | ...     | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1770 | |      | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1771 | |      | ${vm2}= | Guest VM with dpdk-testpmd connected via vhost-user is setup
1772 | |      | ...     | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1773 | |      | ...     | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1774 | |      | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1775
1776 | Guest VM with dpdk-testpmd using SMT connected via vhost-user is setup
1777 | | [Documentation]
1778 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1779 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1780 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1781 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1782 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1783 | | ...
1784 | | ... | *Arguments:*
1785 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1786 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1787 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1788 | | ... | - vm_name - QemuUtil instance name. Type: string
1789 | | ... | - skip - number of cpus which will be skipped. Type: int
1790 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1791 | | ...
1792 | | ... | *Example:*
1793 | | ...
1794 | | ... | \| Guest VM with dpdk-testpmd using SMT connected via vhost-user is \
1795 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1796 | | ... | \| ${6} \| ${5} \|
1797 | | ...
1798 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1799 | | ... | ${count}=${5}
1800 | | ...
1801 | | Import Library | resources.libraries.python.QemuUtils
1802 | | ... | WITH NAME | ${vm_name}
1803 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1804 | | ... | ${dut1_if1} | ${dut1_if2}
1805 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1806 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1807 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1808 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1809 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
1810 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1811 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1812 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1813 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1814 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1815 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1816 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1817 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1818 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1819 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1820 | | Return From Keyword | ${vm}
1821
1822 | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1823 | | [Documentation]
1824 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1825 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1826 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1827 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1828 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1829 | | ...
1830 | | ... | *Arguments:*
1831 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1832 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1833 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1834 | | ... | - vm_name - QemuUtil instance name. Type: string
1835 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1836 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1837 | | ... | - skip - number of cpus which will be skipped. Type: integer
1838 | | ... | - count - number of cpus which will be allocated for qemu.
1839 | | ... | Type: integer
1840 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1841 | | ... | Type: integer
1842 | | ...
1843 | | ... | *Example:*
1844 | | ...
1845 | | ... | \| Guest VM with dpdk-testpmd for Vhost L2BD forwarding is setup \
1846 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1847 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1848 | | ... | \| Guest VM with dpdk-testpmd for Vhost L2BD forwarding is setup \
1849 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1850 | | ... | \| 00:00:00:00:02:01 \| 00:00:00:00:02:02 \| ${6} \| ${5} \
1851 | | ... | \| qemu_id=${2} \|
1852 | | ...
1853 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1854 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1855 | | ... | ${qemu_id}=${1}
1856 | | ...
1857 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1858 | | ... | WITH NAME | ${vm_name}
1859 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1860 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1861 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1862 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1863 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1864 | | ... | ${dut1_if1} | ${dut1_if2}
1865 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1866 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1867 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1868 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1869 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1870 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
1871 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1872 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1873 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1874 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1875 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1876 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1877 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1878 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1879 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1880 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1881 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1882 | | Return From Keyword | ${vm}
1883
1884 | '${nr}' Guest VMs with dpdk-testpmd-mac connected via vhost-user is setup in a 3-node circular topology
1885 | | [Documentation]
1886 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1887 | | ... | DPDK testpmd with fwd mode set to mac rewrite for defined number of
1888 | | ... | VMs on all defined VPP nodes.
1889 | | ...
1890 | | ... | *Arguments:*
1891 | | ... | _None_
1892 | | ...
1893 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1894 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1895 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1896 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1897 | | ...
1898 | | ... | *Example:*
1899 | | ...
1900 | | ... | \| '2' Guest VMs with dpdk-testpmd-mac connected via vhost-user is \
1901 | | ... | setup in a 3-node circular topology \|
1902 | | ...
1903 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1904 | |      | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1905 | |      | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1906 | |      | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1907 | |      | ${vm1}= | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1908 | |      | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1909 | |      | ... | ${dut1-vhost-${number}-if1_mac}
1910 | |      | ... | ${dut1-vhost-${number}-if2_mac} | skip=${skip_cpus}
1911 | |      | ... | count=${vm_cpus} | qemu_id=${number}
1912 | |      | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1913 | |      | ${vm2}= | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1914 | |      | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1915 | |      | ... | ${dut2-vhost-${number}-if1_mac}
1916 | |      | ... | ${dut2-vhost-${number}-if2_mac} | skip=${skip_cpus}
1917 | |      | ... | count=${vm_cpus} | qemu_id=${number}
1918 | |      | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1919
1920 | Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user is setup
1921 | | [Documentation]
1922 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1923 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1924 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1925 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1926 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1927 | | ...
1928 | | ... | *Arguments:*
1929 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1930 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1931 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1932 | | ... | - vm_name - QemuUtil instance name. Type: string
1933 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1934 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1935 | | ... | - skip - number of cpus which will be skipped. Type: int
1936 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1937 | | ...
1938 | | ... | *Example:*
1939 | | ...
1940 | | ... | \| Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user \
1941 | | ... | is setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1942 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1943 | | ...
1944 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1945 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1946 | | ...
1947 | | Import Library | resources.libraries.python.QemuUtils
1948 | | ... | WITH NAME | ${vm_name}
1949 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1950 | | ... | ${dut1_if1} | ${dut1_if2}
1951 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1952 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1953 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1954 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1955 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
1956 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1957 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1958 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1959 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1960 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1961 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1962 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1963 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1964 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1965 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1966 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1967 | | Return From Keyword | ${vm}
1968
1969 | Guest VM with Linux Bridge connected via vhost-user is setup
1970 | | [Documentation]
1971 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1972 | | ... | linux bridge. Qemu Guest uses 2048M.
1973 | | ...
1974 | | ... | *Arguments:*
1975 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1976 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1977 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1978 | | ... | - vm_name - QemuUtil instance name. Type: string
1979 | | ... | - skip - number of cpus which will be skipped. Type: int
1980 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1981 | | ...
1982 | | ... | *Example:*
1983 | | ...
1984 | | ... | \| Guest VM with Linux Bridge connected via vhost-user is setup \
1985 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1986 | | ... | \| ${5} \|
1987 | | ...
1988 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1989 | | ... | ${count}=${5}
1990 | | ...
1991 | | Import Library | resources.libraries.python.QemuUtils
1992 | | ... | WITH NAME | ${vm_name}
1993 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1994 | | ... | ${dut1_if1} | ${dut1_if2}
1995 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1996 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1997 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1998 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1999 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
2000 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
2001 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2002 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2003 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2004 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2005 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2006 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2007 | | ${br}= | Set Variable | br0
2008 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
2009 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
2010 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
2011 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
2012 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
2013 | | Set Interface State | ${vm} | ${br} | up | if_type=name
2014 | | Return From Keyword | ${vm}
2015
2016 | Guest VM with Linux Bridge using SMT connected via vhost-user is setup
2017 | | [Documentation]
2018 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
2019 | | ... | linux bridge. Qemu Guest uses 2048M.
2020 | | ...
2021 | | ... | *Arguments:*
2022 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
2023 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2024 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
2025 | | ... | - vm_name - QemuUtil instance name. Type: string
2026 | | ... | - skip - number of cpus which will be skipped. Type: int
2027 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
2028 | | ...
2029 | | ... | *Example:*
2030 | | ...
2031 | | ... | \| Guest VM with Linux Bridge using SMT connected via vhost-user is \
2032 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
2033 | | ... | \| ${6}\| ${5} \|
2034 | | ...
2035 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
2036 | | ... | ${count}=${5}
2037 | | ...
2038 | | Import Library | resources.libraries.python.QemuUtils
2039 | | ... | WITH NAME | ${vm_name}
2040 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
2041 | | ... | ${dut1_if1} | ${dut1_if2}
2042 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
2043 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
2044 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2045 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2046 | | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True}
2047 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
2048 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2049 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2050 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2051 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2052 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2053 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2054 | | ${br}= | Set Variable | br0
2055 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
2056 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
2057 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
2058 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
2059 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
2060 | | Set Interface State | ${vm} | ${br} | up | if_type=name
2061 | | Return From Keyword | ${vm}
2062
2063 | Guest VM with dpdk-testpmd Teardown
2064 | | [Documentation]
2065 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
2066 | | ... | Argument is dictionary of all qemu nodes running with its names.
2067 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
2068 | | ...
2069 | | ... | *Arguments:*
2070 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
2071 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
2072 | | ...
2073 | | ... | *Example:*
2074 | | ...
2075 | | ... | \| Guest VM with dpdk-testpmd Teardown \| ${node['DUT1']} \
2076 | | ... | \| ${dut_vm_refs} \|
2077 | | ...
2078 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
2079 | | ${vms_number}= | Get Length | ${dut_vm_refs}
2080 | | ${index}= | Set Variable | ${0}
2081 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
2082 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
2083 | | | ${index}= | Evaluate | ${index} + 1
2084 | | | Dpdk Testpmd Stop | ${vm}
2085 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2086 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
2087 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
2088
2089 | Guest VM Teardown
2090 | | [Documentation]
2091 | | ... | Stop all qemu processes running on ${dut_node}.
2092 | | ... | Argument is dictionary of all qemu nodes running with its names.
2093 | | ...
2094 | | ... | *Arguments:*
2095 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
2096 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
2097 | | ...
2098 | | ... | *Example:*
2099 | | ...
2100 | | ... | \| Guest VM Teardown \| ${node['DUT1']} \
2101 | | ... | \| ${dut_vm_refs} \|
2102 | | ...
2103 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
2104 | | ${vms_number}= | Get Length | ${dut_vm_refs}
2105 | | ${index}= | Set Variable | ${0}
2106 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
2107 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
2108 | | | ${index}= | Evaluate | ${index} + 1
2109 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2110 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
2111 | | | Run Keyword If | '${index}' == '${vms_number}' | ${vm_name}.Qemu Kill All
2112
2113 | Lisp IPv4 forwarding initialized in a 3-node circular topology
2114 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
2115 | | ... | Don`t set route.
2116 | | ...
2117 | | ... | *Arguments:*
2118 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
2119 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2120 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
2121 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2122 | | ... | -${duts_prefix} - ip prefix. Type: int
2123 | | ...
2124 | | ... | *Return:*
2125 | | ... | - No value returned
2126 | | ...
2127 | | ... | *Example:*
2128 | | ... | \| Lisp IPv4 forwarding initialized in a 3-node circular topology \
2129 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2130 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2131 | | ...
2132 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2133 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
2134 | | ...
2135 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2136 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2137 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2138 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2139 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2140 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2141 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2142 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2143 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2144 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2145 | | ... | ${dut2_if1_mac}
2146 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2147 | | ... | ${dut1_if2_mac}
2148 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2149 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1}
2150 | | ... | ${dut1_tg_address} | ${duts_prefix}
2151 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2}
2152 | | ... | ${dut1_dut2_address} | ${duts_prefix}
2153 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1}
2154 | | ... | ${dut2_dut1_address} | ${duts_prefix}
2155 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2}
2156 | | ... | ${dut2_tg_address} | ${duts_prefix}
2157 | | All Vpp Interfaces Ready Wait | ${nodes}
2158
2159 | Lisp GPE IPv4 over IPsec initialized in a 3-node circular topology
2160 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
2161 | | ...
2162 | | ... | *Arguments:*
2163 | | ... | -${encr_alg} - Encryption algorithm. Type: string
2164 | | ... | -${auth_alg} - Authentication algorithm. Type: string
2165 | | ...
2166 | | ... | *Return:*
2167 | | ... | - No value returned
2168 | | ...
2169 | | ... | *Example:*
2170 | | ... | \| Lisp GPE IPv4 over IPsec initialized in a 3-node circular topology\
2171 | | ... | \| ${encr_alg} \| ${auth_alg}
2172 | | ...
2173 | | [Arguments] | ${encr_alg} | ${auth_alg}
2174 | | ...
2175 | | IPsec Generate Keys | ${encr_alg} | ${auth_alg}
2176 | | Lisp IPv4 forwarding initialized in a 3-node circular topology
2177 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
2178 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
2179 | | Set up LISP GPE topology
2180 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
2181 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
2182 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
2183 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
2184 | | VPP Setup IPsec Manual Keyed Connection
2185 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
2186 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
2187 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
2188 | | VPP Setup IPsec Manual Keyed Connection
2189 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
2190 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
2191 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
2192
2193 | Lisp IPv6 forwarding initialized in a 3-node circular topology
2194 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
2195 | | ... | Don`t set route.
2196 | | ...
2197 | | ... | *Arguments:*
2198 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
2199 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2200 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
2201 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2202 | | ... | -${duts_prefix} - ip prefix. Type: int
2203 | | ...
2204 | | ... | *Return:*
2205 | | ... | - No value returned
2206 | | ...
2207 | | ... | *Example:*
2208 | | ... | \| Lisp IPv6 forwarding initialized in a 3-node circular topology \
2209 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2210 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2211 | | ...
2212 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2213 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
2214 | | ...
2215 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2216 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2217 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2218 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2219 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
2220 | | ... | ${prefix}
2221 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
2222 | | ... | ${prefix}
2223 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
2224 | | ... | ${prefix}
2225 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
2226 | | ... | ${prefix}
2227 | | Vpp nodes ra suppress link layer | ${nodes}
2228 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2229 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2230 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2231 | | ... | ${dut2_if1_mac}
2232 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2233 | | ... | ${dut1_if2_mac}
2234
2235 | Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular topology
2236 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2237 | | ... | Don`t set route.
2238 | | ...
2239 | | ... | *Arguments:*
2240 | | ... | - ${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
2241 | | ... | Type: string
2242 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
2243 | | ... | - ${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
2244 | | ... | Type: string
2245 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
2246 | | ... | - ${prefix4} - IPv4 prefix. Type: int
2247 | | ... | - ${prefix6} - IPv6 prefix. Type: int
2248 | | ...
2249 | | ... | *Return:*
2250 | | ... | - No value returned
2251 | | ...
2252 | | ... | *Example:*
2253 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
2254 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
2255 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
2256 | | ... | \| ${prefix4} \| ${prefix6} \|
2257 | | ...
2258 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
2259 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
2260 | | ... | ${prefix4} | ${prefix6}
2261 | | ...
2262 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2263 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2264 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2265 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2266 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2267 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2268 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2269 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2270 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1}
2271 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
2272 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
2273 | | ... | ${prefix6}
2274 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
2275 | | ... | ${prefix6}
2276 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2}
2277 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
2278 | | Vpp nodes ra suppress link layer | ${nodes}
2279 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2280 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2281 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
2282 | | ... | ${dut2_if1_mac}
2283 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
2284 | | ... | ${dut1_if2_mac}
2285
2286 | Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular topology
2287 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2288 | | ... | Don`t set route.
2289 | | ...
2290 | | ... | *Arguments:*
2291 | | ... | - ${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
2292 | | ... | Type: string
2293 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
2294 | | ... | - ${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
2295 | | ... | Type: string
2296 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
2297 | | ... | - ${prefix4} - IPv4 prefix. Type: int
2298 | | ... | - ${prefix6} - IPv6 prefix. Type: int
2299 | | ...
2300 | | ... | *Return:*
2301 | | ... | - No value returned
2302 | | ...
2303 | | ... | *Example:*
2304 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
2305 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
2306 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
2307 | | ... | \| ${prefix6} \| ${prefix4} \|
2308 | | ...
2309 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
2310 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
2311 | | ... | ${prefix6} | ${prefix4}
2312 | | ...
2313 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2314 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2315 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2316 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2317 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2318 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2319 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2320 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2321 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
2322 | | ... | ${prefix6}
2323 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2}
2324 | | ... | ${dut1_dut2_ip4_address} | ${prefix4}
2325 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1}
2326 | | ... | ${dut2_dut1_ip4_address} | ${prefix4}
2327 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
2328 | | ... | ${prefix6}
2329 | | Vpp nodes ra suppress link layer | ${nodes}
2330 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2331 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2332 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address}
2333 | | ... | ${dut2_if1_mac}
2334 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address}
2335 | | ... | ${dut1_if2_mac}
2336
2337 | SNAT is initialized in a 3-node circular topology
2338 | | [Documentation] | Initialization of 3-node topology with SNAT between DUTs:
2339 | | ... | - set interfaces up
2340 | | ... | - set IP addresses
2341 | | ... | - set ARP
2342 | | ... | - create routes
2343 | | ... | - set SNAT - only on DUT1
2344 | | ...
2345 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2346 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2347 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2348 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2349 | | All Vpp Interfaces Ready Wait | ${nodes}
2350 | | ...
2351 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
2352 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
2353 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
2354 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 12.0.0.1 | 20
2355 | | ...
2356 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2357 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2358 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2359 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2360 | | ...
2361 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
2362 | | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
2363 | | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
2364 | | Add arp on dut | ${dut2} | ${dut2_if2} | 12.0.0.2 | ${tg_if2_mac}
2365 | | ...
2366 | | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | 11.0.0.2 | ${dut1_if2}
2367 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | 10.0.0.2 | ${dut1_if1}
2368 | | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | 12.0.0.2 | ${dut2_if2}
2369 | | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | 11.0.0.1 | ${dut2_if1}
2370 | | ...
2371 | | Set inside and outside interfaces | ${dut1} | ${dut1_if1} | ${dut1_if2}
2372 | | Set deterministic mode for SNAT | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
2373
2374 | DPDK 2-node Performance Suite Setup with DUT's NIC model
2375 | | [Documentation]
2376 | | ... | Updates interfaces on all nodes and setup global
2377 | | ... | variables used in test cases based on interface model provided as an
2378 | | ... | argument. Initializes traffic generator. Initializes DPDK test
2379 | | ... | environment.
2380 | | ...
2381 | | ... | *Arguments:*
2382 | | ... | - topology_type - Topology type. Type: string
2383 | | ... | - nic_model - Interface model. Type: string
2384 | | ...
2385 | | ... | *Example:*
2386 | | ...
2387 | | ... | \| DPDK 2-node Performance Suite Setup with DUT's NIC model \
2388 | | ... | \| L2 \| Intel-X520-DA2 \|
2389 | | ...
2390 | | [Arguments] | ${topology_type} | ${nic_model}
2391 | | ...
2392 | | 2-node circular Topology Variables Setup with DUT interface model
2393 | | ... | ${nic_model}
2394 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
2395 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
2396 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2397
2398 | DPDK 3-node Performance Suite Setup with DUT's NIC model
2399 | | [Documentation]
2400 | | ... | Updates interfaces on all nodes and setup global
2401 | | ... | variables used in test cases based on interface model provided as an
2402 | | ... | argument. Initializes traffic generator. Initializes DPDK test
2403 | | ... | environment.
2404 | | ...
2405 | | ... | *Arguments:*
2406 | | ... | - topology_type - Topology type. Type: string
2407 | | ... | - nic_model - Interface model. Type: string
2408 | | ...
2409 | | ... | *Example:*
2410 | | ...
2411 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
2412 | | ...
2413 | | [Arguments] | ${topology_type} | ${nic_model}
2414 | | ...
2415 | | 3-node circular Topology Variables Setup with DUT interface model
2416 | | ... | ${nic_model}
2417 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
2418 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
2419 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2420 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
2421
2422 | DPDK 3-node Performance Suite Teardown
2423 | | [Documentation]
2424 | | ... | Suite teardown phase with traffic generator teardown.
2425 | | ... | Cleanup DPDK test environment.
2426 | | ...
2427 | | Teardown traffic generator | ${tg}
2428 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2429 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
2430
2431 | DPDK 2-node Performance Suite Teardown
2432 | | [Documentation]
2433 | | ... | Suite teardown phase with traffic generator teardown.
2434 | | ... | Cleanup DPDK test environment.
2435 | | ...
2436 | | Teardown traffic generator | ${tg}
2437 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
2438
2439 | For DPDK Performance Test
2440 | | [Documentation]
2441 | | ... | Return TRUE if variable DPDK_TEST exist, otherwise FALSE.
2442 | | ${ret} | ${tmp}= | Run Keyword And Ignore Error
2443 | | ... | Variable Should Exist | ${DPDK_TEST}
2444 | | Return From Keyword If | "${ret}" == "PASS" | ${TRUE}
2445 | | Return From Keyword | ${FALSE}
2446
2447 | Performance test setup
2448 | | [Documentation] | Common test setup for performance tests.
2449 | | ...
2450 | | Reset VAT History On All DUTs | ${nodes}
2451
2452 | Performance test teardown
2453 | | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
2454 | | ... | tests.
2455 | | ...
2456 | | ... | *Arguments:*
2457 | | ... | - rate - Rate for sending packets. Type: string
2458 | | ... | - framesize - L2 Frame Size [B]. Type: integer
2459 | | ... | - topology_type - Topology type. Type: string
2460 | | ...
2461 | | ... | *Example:*
2462 | | ...
2463 | | ... | \| Performance test teardown \| 4.0mpps \| 64 \| 3-node-IPv4 \|
2464 | | ...
2465 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
2466 | | ...
2467 | | Show VAT History On All DUTs | ${nodes}
2468 | | Show statistics on all DUTs
2469 | | Run Keyword If Test Failed
2470 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
2471 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
2472 | | Remove startup configuration of VPP from all DUTs
2473
2474 | Performance ndrchk test teardown
2475 | | [Documentation] | Common test teardown for ndrchk performance tests.
2476 | | ...
2477 | | Show VAT History On All DUTs | ${nodes}
2478 | | Show statistics on all DUTs
2479 | | Remove startup configuration of VPP from all DUTs
2480
2481 | Performance test with vhost and VM with dpdk-testpmd teardown
2482 | | [Documentation] | Common test teardown for performance tests which use
2483 | | ... | vhost(s) and VM(s) with dpdk-testpmd.
2484 | | ...
2485 | | ... | *Arguments:*
2486 | | ... | - rate - Rate for sending packets. Type: string
2487 | | ... | - framesize - L2 Frame Size [B]. Type: integer
2488 | | ... | - topology_type - Topology type. Type: string
2489 | | ... | - dut1_node - Node where to clean qemu. Type: dictionary
2490 | | ... | - dut1_vm_refs - VM references on node. Type: dictionary
2491 | | ... | - dut2_node - Node where to clean qemu. Type: dictionary
2492 | | ... | - dut2_vm_refs - VM references on node. Type: dictionary
2493 | | ...
2494 | | ... | *Example:*
2495 | | ...
2496 | | ... | \| Performance test with vhost and VM with dpdk-testpmd teardown \
2497 | | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
2498 | | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
2499 | | ...
2500 | | [Arguments] | ${rate} | ${framesize} | ${topology_type}
2501 | | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
2502 | | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
2503 | | ...
2504 | | Show VAT History On All DUTs | ${nodes}
2505 | | Show Vpp Vhost On All DUTs
2506 | | Show statistics on all DUTs
2507 | | Run Keyword If Test Failed
2508 | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
2509 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
2510 | | Remove startup configuration of VPP from all DUTs
2511 | | Run keyword unless | ${dut1_node}==${None}
2512 | | ... | Guest VM with dpdk-testpmd Teardown | ${dut1} | ${dut1_vm_refs}
2513 | | Run keyword unless | ${dut2_node}==${None}
2514 | | ... | Guest VM with dpdk-testpmd Teardown | ${dut2} | ${dut2_vm_refs}