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