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