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