CSIT-339: Add Keywords for SMT
[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.6.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} | ${sock2}
366 | | ${dut1_vif1}= | Set Variable | ${vhost_if1}
367 | | ${dut1_vif2}= | Set Variable | ${vhost_if2}
368 | | Set Interface State | ${dut1} | ${dut1_vif1} | up
369 | | Set Interface State | ${dut1} | ${dut1_vif2} | up
370 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
371 | | ... | ${sock1} | ${sock2}
372 | | ${dut2_vif1}= | Set Variable | ${vhost_if1}
373 | | ${dut2_vif2}= | Set Variable | ${vhost_if2}
374 | | Set Interface State | ${dut2} | ${dut2_vif1} | up
375 | | Set Interface State | ${dut2} | ${dut2_vif2} | up
376 | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif1}
377 | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif2}
378 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
379 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
380 | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif1}
381 | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif2}
382 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
383 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
384 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
385 | | ... | via 4.4.4.2 sw_if_index ${dut1_vif1_idx} multipath
386 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
387 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
388 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
389 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
390 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
391 | | ... | via 5.5.5.2 sw_if_index ${dut1_vif2_idx} multipath
392 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
393 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
394 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
395 | | ... | via 4.4.4.1 sw_if_index ${dut2_vif1_idx} multipath
396 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
397 | | ... | via 5.5.5.2 sw_if_index ${dut2_vif2_idx} multipath
398 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
399 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
400 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
401 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif1} | ${fib_table_1}
402 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
403 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif2} | ${fib_table_2}
404 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
405 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif1} | ${fib_table_1}
406 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
407 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif2} | ${fib_table_2}
408 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
409 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
410 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif1} | 4.4.4.1 | 30
411 | | IP addresses are set on interfaces | ${dut1} | ${dut1_vif2} | 5.5.5.1 | 30
412 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
413 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
414 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif1} | 4.4.4.1 | 30
415 | | IP addresses are set on interfaces | ${dut2} | ${dut2_vif2} | 5.5.5.1 | 30
416 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
417 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
418 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
419 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
420 | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
421 | | ... | ${dut1_vif1_idx}
422 | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
423 | | ... | ${dut1_vif2_idx}
424 | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
425 | | ... | ${dut2_vif1_idx}
426 | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
427 | | ... | ${dut2_vif2_idx}
428 | | Set Test Variable | ${dut1_vif1_mac}
429 | | Set Test Variable | ${dut1_vif2_mac}
430 | | Set Test Variable | ${dut2_vif1_mac}
431 | | Set Test Variable | ${dut2_vif2_mac}
432 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
433 | | ... | vrf=${fib_table_1}
434 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
435 | | ... | vrf=${fib_table_2}
436 | | Add arp on dut | ${dut1} | ${dut1_vif1} | 4.4.4.2 | 52:54:00:00:04:01
437 | | ... | vrf=${fib_table_1}
438 | | Add arp on dut | ${dut1} | ${dut1_vif2} | 5.5.5.2 | 52:54:00:00:04:02
439 | | ... | vrf=${fib_table_2}
440 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
441 | | ... | vrf=${fib_table_1}
442 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
443 | | ... | vrf=${fib_table_2}
444 | | Add arp on dut | ${dut2} | ${dut2_vif1} | 4.4.4.2 | 52:54:00:00:04:01
445 | | ... | vrf=${fib_table_1}
446 | | Add arp on dut | ${dut2} | ${dut2_vif2} | 5.5.5.2 | 52:54:00:00:04:02
447 | | ... | vrf=${fib_table_2}
448 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut1_vif1}
449 | | ... | vrf=${fib_table_1}
450 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
451 | | ... | vrf=${fib_table_1}
452 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
453 | | ... | vrf=${fib_table_2}
454 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut1_vif2}
455 | | ... | vrf=${fib_table_2}
456 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut2_vif1}
457 | | ... | vrf=${fib_table_1}
458 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
459 | | ... | vrf=${fib_table_1}
460 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
461 | | ... | vrf=${fib_table_2}
462 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut2_vif2}
463 | | ... | vrf=${fib_table_2}
464
465 | IPv4 policer 2r3c-${t} initialized in a 3-node circular topology
466 | | [Documentation]
467 | | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
468 | | ... | on all DUT nodes in 3-node circular topology. Policer is applied on
469 | | ... | links TG - DUT1 and DUT2 - TG.
470 | | ...
471 | | ${dscp}= | DSCP AF22
472 | | Policer Set Name | policer1
473 | | Policer Set CIR | ${cir}
474 | | Policer Set EIR | ${eir}
475 | | Policer Set CB | ${cb}
476 | | Policer Set EB | ${eb}
477 | | Policer Set Rate Type pps
478 | | Policer Set Round Type Closest
479 | | Policer Set Type 2R3C 2698
480 | | Policer Set Conform Action Transmit
481 | | Policer Set Exceed Action Mark and Transmit | ${dscp}
482 | | Policer Set Violate Action Transmit
483 | | Policer Enable Color Aware
484 | | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
485 | | Policer Classify Set Precolor Exceed
486 | | Policer Set Node | ${dut1}
487 | | Policer Classify Set Interface | ${dut1_if1}
488 | | Policer Classify Set Match IP | 20.20.20.2 | ${False}
489 | | Policer Set Configuration
490 | | Policer Set Node | ${dut2}
491 | | Policer Classify Set Interface | ${dut2_if2}
492 | | Policer Classify Set Match IP | 10.10.10.2 | ${False}
493 | | Policer Set Configuration
494
495 | IPv6 forwarding initialized in a 3-node circular topology
496 | | [Documentation]
497 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
498 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
499 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
500 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
501 | | ... | next hop of neighbour DUT interface IPv6 address.
502 | | ...
503 | | ${prefix}= | Set Variable | 64
504 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
505 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
506 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
507 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
508 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
509 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
510 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
511 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
512 | | Vpp nodes ra suppress link layer | ${nodes}
513 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
514 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
515 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
516 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
517 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
518 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
519
520 | Scale IPv6 forwarding initialized in a 3-node circular topology
521 | | [Documentation]
522 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
523 | | ... | DUT nodes in 3-node circular topology
524 | | ...
525 | | ... | *Arguments:*
526 | | ... | - ${count} - IP route count. Type: integer
527 | | ...
528 | | ... | *Return:*
529 | | ... | - No value returned
530 | | ...
531 | | ... | *Example:*
532 | | ...
533 | | ... | \| Scale IPv6 forwarding initialized in a 3-node circular topology \
534 | | ... | \| 100000 \|
535 | | [Arguments] | ${count}
536 | | ${subn_prefix}= | Set Variable | 64
537 | | ${host_prefix}= | Set Variable | 128
538 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
539 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
540 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
541 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
542 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
543 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
544 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
545 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
546 | | Vpp nodes ra suppress link layer | ${nodes}
547 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
548 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
549 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
550 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
551 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
552 | | ... | interface=${dut1_if2} | count=${count}
553 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
554 | | ... | interface=${dut1_if1} | count=${count}
555 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
556 | | ... | interface=${dut2_if1} | count=${count}
557 | | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
558 | | ... | interface=${dut2_if2} | count=${count}
559
560 | IPv6 iAcl whitelist initialized in a 3-node circular topology
561 | | [Documentation]
562 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
563 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
564 | | ...
565 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
566 | | ... | ${dut1} | ip6 | dst
567 | | And Vpp Configures Classify Session L3
568 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
569 | | ... | ip6 | dst | 2001:2::2
570 | | And Vpp Enable Input Acl Interface
571 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
572 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
573 | | ... | ${dut2} | ip6 | dst
574 | | And Vpp Configures Classify Session L3
575 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
576 | | ... | ip6 | dst | 2001:1::2
577 | | And Vpp Enable Input Acl Interface
578 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
579
580 | L2 xconnect initialized in a 3-node circular topology
581 | | [Documentation]
582 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
583 | | ... | each DUT. Interfaces are brought up.
584 | | ... |
585 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1_if2}
586 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${dut2_if2}
587 | | All Vpp Interfaces Ready Wait | ${nodes}
588
589 | L2 xconnect with VXLANoIPv4 initialized in a 3-node circular topology
590 | | [Documentation]
591 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
592 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
593 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
594 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
595 | | ... | interfaces.
596 | | ...
597 | | VPP interfaces in path are up in a 3-node circular topology
598 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
599 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
600 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
601 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
602 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
603 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
604 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
605 | | ... | 172.16.0.1 | 172.16.0.2
606 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
607 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
608 | | ... | 172.16.0.2 | 172.16.0.1
609 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
610
611 | L2 xconnect with Vhost-User initialized in a 3-node circular topology
612 | | [Documentation]
613 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
614 | | ... | connect each Vhost interface with one physical interface.
615 | | ...
616 | | ... | *Arguments:*
617 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
618 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
619 | | ...
620 | | ... | *Example:*
621 | | ...
622 | | ... | \| L2 xconnect with Vhost-User initialized in a 3-node \
623 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \|
624 | | [Arguments] | ${sock1} | ${sock2}
625 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
626 | | ... | ${sock1} | ${sock2}
627 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
628 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if2} | ${vhost_if2}
629 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
630 | | ... | ${sock1} | ${sock2}
631 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if1} | ${vhost_if1}
632 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
633 | | All Vpp Interfaces Ready Wait | ${nodes}
634
635 | L2 xconnect with Vhost-User and VLAN initialized in a 3-node circular topology
636 | | [Documentation]
637 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
638 | | ... | connect each Vhost interface with one physical interface.
639 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
640 | | ...
641 | | ... | *Arguments:*
642 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
643 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
644 | | ... | - subid - ID of the sub-interface to be created. Type: string
645 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
646 | | ...
647 | | ... | *Example:*
648 | | ...
649 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
650 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
651 | | ...
652 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
653 | | ...
654 | | VPP interfaces in path are up in a 3-node circular topology
655 | | VLAN dot1q subinterfaces initialized on 3-node topology
656 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
657 | | L2 tag rewrite method setup on interfaces
658 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
659 | | ... | ${tag_rewrite}
660 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
661 | | ... | ${sock1} | ${sock2}
662 | | L2 setup xconnect on DUT | ${dut1} | ${dut1_if1} | ${vhost_if1}
663 | | L2 setup xconnect on DUT | ${dut1} | ${subif_index_1} | ${vhost_if2}
664 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
665 | | ... | ${sock1} | ${sock2}
666 | | L2 setup xconnect on DUT | ${dut2} | ${subif_index_2} | ${vhost_if1}
667 | | L2 setup xconnect on DUT | ${dut2} | ${dut2_if2} | ${vhost_if2}
668 | | All Vpp Interfaces Ready Wait | ${nodes}
669
670 | L2 bridge domain initialized in a 3-node circular topology
671 | | [Documentation]
672 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
673 | | ... | that is created automatically with index 1. Learning is enabled.
674 | | ... | Interfaces are brought up.
675 | | ... |
676 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1_if2}
677 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if1} | ${dut2_if2}
678 | | All Vpp Interfaces Ready Wait | ${nodes}
679
680 | L2 bridge domains with Vhost-User initialized in a 3-node circular topology
681 | | [Documentation]
682 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
683 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
684 | | ... | with physical inteface.
685 | | ...
686 | | ... | *Arguments:*
687 | | ... | - bd_id1 - Bridge domain ID. Type: integer
688 | | ... | - bd_id2 - Bridge domain ID. Type: integer
689 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
690 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
691 | | ...
692 | | ... | *Example:*
693 | | ...
694 | | ... | \| L2 bridge domains with Vhost-User initialized in a 3-node \
695 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
696 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
697 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
698 | | ... | ${sock1} | ${sock2}
699 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
700 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
701 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
702 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
703 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
704 | | ... | ${sock1} | ${sock2}
705 | | Interface is added to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id1}
706 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
707 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
708 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
709 | | All Vpp Interfaces Ready Wait | ${nodes}
710
711 | L2 bridge domain with VXLANoIPv4 initialized in a 3-node circular topology
712 | | [Documentation]
713 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
714 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
715 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
716 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
717 | | ... | interfaces.
718 | | ...
719 | | VPP interfaces in path are up in a 3-node circular topology
720 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
721 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
722 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
723 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
724 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
725 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
726 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
727 | | ... | 172.16.0.1 | 172.16.0.2
728 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
729 | | ... | 172.16.0.2 | 172.16.0.1
730 | | Vpp l2bd forwarding setup | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
731 | | Vpp l2bd forwarding setup | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
732 | | All Vpp Interfaces Ready Wait | ${nodes}
733
734 | L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a 3-node circular topology
735 | | [Documentation]
736 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
737 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
738 | | ... | with physical inteface.
739 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
740 | | ... | interfaces on each DUT. All interfaces are brought up.
741 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
742 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
743 | | ...
744 | | ... | *Arguments:*
745 | | ... | - bd_id1 - Bridge domain ID. Type: integer
746 | | ... | - bd_id2 - Bridge domain ID. Type: integer
747 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
748 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
749 | | ...
750 | | ... | *Example:*
751 | | ...
752 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
753 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
754 | | ...
755 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
756 | | ...
757 | | VPP interfaces in path are up in a 3-node circular topology
758 | | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
759 | | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
760 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
761 | | ... | 172.16.0.1 | 172.16.0.2
762 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
763 | | ... | 172.16.0.2 | 172.16.0.1
764 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
765 | | ... | ${sock1} | ${sock2}
766 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
767 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
768 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
769 | | Interface is added to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
770 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
771 | | ... | ${sock1} | ${sock2}
772 | | Interface is added to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
773 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
774 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
775 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
776 | | All Vpp Interfaces Ready Wait | ${nodes}
777
778 | L2 bridge domains with Vhost-User initialized in a 2-node circular topology
779 | | [Documentation]
780 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
781 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
782 | | ... | with physical inteface.
783 | | ...
784 | | ... | *Arguments:*
785 | | ... | - bd_id1 - Bridge domain ID. Type: integer
786 | | ... | - bd_id2 - Bridge domain ID. Type: integer
787 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
788 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
789 | | ...
790 | | ... | *Example:*
791 | | ...
792 | | ... | \| L2 bridge domains with Vhost-User initialized in a 2-node \
793 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
794 | | ...
795 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
796 | | ...
797 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
798 | | ... | ${sock1} | ${sock2}
799 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
800 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
801 | | Interface is added to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
802 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
803 | | All Vpp Interfaces Ready Wait | ${nodes}
804
805 | L2 bridge domains with Vhost-User and VLAN initialized in a 3-node circular topology
806 | | [Documentation]
807 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
808 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
809 | | ... | with physical inteface.
810 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
811 | | ...
812 | | ... | *Arguments:*
813 | | ... | - bd_id1 - Bridge domain ID. Type: integer
814 | | ... | - bd_id2 - Bridge domain ID. Type: integer
815 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
816 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
817 | | ... | - subid - ID of the sub-interface to be created. Type: string
818 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
819 | | ...
820 | | ... | *Example:*
821 | | ...
822 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
823 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10\
824 | | ... | pop-1 \|
825 | | ...
826 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
827 | | ... | ${tag_rewrite}
828 | | ...
829 | | VPP interfaces in path are up in a 3-node circular topology
830 | | VLAN dot1q subinterfaces initialized on 3-node topology
831 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
832 | | L2 tag rewrite method setup on interfaces
833 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
834 | | ... | ${tag_rewrite}
835 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut1}
836 | | ... | ${sock1} | ${sock2}
837 | | Interface is added to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
838 | | Interface is added to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
839 | | Interface is added to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
840 | | Interface is added to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
841 | | VPP Vhost interfaces for L2BD forwarding are setup | ${dut2}
842 | | ... | ${sock1} | ${sock2}
843 | | Interface is added to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
844 | | Interface is added to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
845 | | Interface is added to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
846 | | Interface is added to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
847 | | All Vpp Interfaces Ready Wait | ${nodes}
848
849 | 2-node Performance Suite Setup with DUT's NIC model
850 | | [Documentation]
851 | | ... | Suite preparation phase that setup default startup configuration of
852 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
853 | | ... | variables used in test cases based on interface model provided as an
854 | | ... | argument. Initializes traffic generator.
855 | | ...
856 | | ... | *Arguments:*
857 | | ... | - topology_type - Topology type. Type: string
858 | | ... | - nic_model - Interface model. Type: string
859 | | ...
860 | | ... | *Example:*
861 | | ...
862 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
863 | | ...
864 | | [Arguments] | ${topology_type} | ${nic_model}
865 | | ...
866 | | Show vpp version on all DUTs
867 | | Setup performance global Variables
868 | | 2-node circular Topology Variables Setup with DUT interface model
869 | | ... | ${nic_model}
870 | | Setup 2-node startup configuration of VPP on all DUTs
871 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
872 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
873
874 | 2-node-switched Performance Suite Setup with DUT's NIC model
875 | | [Documentation]
876 | | ... | Suite preparation phase that setup default startup configuration of
877 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
878 | | ... | variables used in test cases based on interface model provided as an
879 | | ... | argument. Initializes traffic generator.
880 | | ...
881 | | ... | *Arguments:*
882 | | ... | - topology_type - Topology type. Type: string
883 | | ... | - nic_model - Interface model. Type: string
884 | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
885 | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
886 | | ...
887 | | ... | *Example:*
888 | | ...
889 | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
890 | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
891 | | ...
892 | | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
893 | | ... | ${tg_if2_dest_mac}
894 | | ...
895 | | Show vpp version on all DUTs
896 | | Setup performance global Variables
897 | | 2-node circular Topology Variables Setup with DUT interface model
898 | | ... | ${nic_model}
899 | | Setup 2-node startup configuration of VPP on all DUTs
900 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
901 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
902 | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
903
904 | 3-node Performance Suite Setup with DUT's NIC model
905 | | [Documentation]
906 | | ... | Suite preparation phase that setup default startup configuration of
907 | | ... | VPP on all DUTs. Updates interfaces on all nodes and setup global
908 | | ... | variables used in test cases based on interface model provided as an
909 | | ... | argument. Initializes traffic generator.
910 | | ...
911 | | ... | *Arguments:*
912 | | ... | - topology_type - Topology type. Type: string
913 | | ... | - nic_model - Interface model. Type: string
914 | | ...
915 | | ... | *Example:*
916 | | ...
917 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
918 | | [Arguments] | ${topology_type} | ${nic_model}
919 | | Show vpp version on all DUTs
920 | | Setup performance global Variables
921 | | 3-node circular Topology Variables Setup with DUT interface model
922 | | ... | ${nic_model}
923 | | Setup default startup configuration of VPP on all DUTs
924 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
925 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
926
927 | 3-node Performance Suite Teardown
928 | | [Documentation]
929 | | ... | Suite teardown phase with traffic generator teardown.
930 | | ...
931 | | Teardown traffic generator | ${tg}
932
933 | 2-node Performance Suite Teardown
934 | | [Documentation]
935 | | ... | Suite teardown phase with traffic generator teardown.
936 | | ...
937 | | Teardown traffic generator | ${tg}
938
939 | Find NDR using linear search and pps
940 | | [Documentation]
941 | | ... | Find throughput by using RFC2544 linear search with non drop rate.
942 | | ...
943 | | ... | *Arguments:*
944 | | ... | - framesize - L2 Frame Size [B]. Type: integer
945 | | ... | - start_rate - Initial start rate [pps]. Type: float
946 | | ... | - step_rate - Step of linear search [pps]. Type: float
947 | | ... | - topology_type - Topology type. Type: string
948 | | ... | - min_rate - Lower limit of search [pps]. Type: float
949 | | ... | - max_rate - Upper limit of search [pps]. Type: float
950 | | ...
951 | | ... | *Return:*
952 | | ... | - No value returned
953 | | ...
954 | | ... | *Example:*
955 | | ...
956 | | ... | \| Find NDR using linear search and pps \| 64 \| 5000000 \
957 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \|
958 | | ...
959 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
960 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
961 | | ...
962 | | ${duration}= | Set Variable | 10
963 | | Set Duration | ${duration}
964 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
965 | | Set Search Linear Step | ${step_rate}
966 | | Set Search Frame Size | ${framesize}
967 | | Set Search Rate Type pps
968 | | Linear Search | ${start_rate} | ${topology_type}
969 | | ${rate_per_stream} | ${lat}= | Verify Search Result
970 | | ${tmp}= | Create List | 100%NDR | ${lat}
971 | | ${latency}= | Create List | ${tmp}
972 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
973 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
974 | | ... | ${framesize} | ${topology_type}
975 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
976 | | Append To List | ${latency} | ${tmp}
977 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
978 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
979 | | ... | ${framesize} | ${topology_type}
980 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
981 | | Append To List | ${latency} | ${tmp}
982 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
983 | | ... | ${latency}
984 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
985 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
986
987 | Find PDR using linear search and pps
988 | | [Documentation]
989 | | ... | Find throughput by using RFC2544 linear search with partial drop rate
990 | | ... | with PDR threshold and type specified by parameter.
991 | | ...
992 | | ... | *Arguments:*
993 | | ... | - framesize - L2 Frame Size [B]. Type: integer
994 | | ... | - start_rate - Initial start rate [pps]. Type: float
995 | | ... | - step_rate - Step of linear search [pps]. Type: float
996 | | ... | - topology_type - Topology type. Type: string
997 | | ... | - min_rate - Lower limit of search [pps]. Type: float
998 | | ... | - max_rate - Upper limit of search [pps]. Type: float
999 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1000 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1001 | | ...
1002 | | ... | *Example:*
1003 | | ...
1004 | | ... | \| Find PDR using linear search and pps \| 64 \| 5000000 \
1005 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 0.5 \| percentage \|
1006 | | ...
1007 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1008 | | ... | ${topology_type} | ${min_rate} | ${max_rate}
1009 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1010 | | ...
1011 | | ${duration}= | Set Variable | 10
1012 | | Set Duration | ${duration}
1013 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1014 | | Set Search Linear Step | ${step_rate}
1015 | | Set Search Frame Size | ${framesize}
1016 | | Set Search Rate Type pps
1017 | | Set Loss Acceptance | ${loss_acceptance}
1018 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1019 | | ... | Set Loss Acceptance Type Percentage
1020 | | Linear Search | ${start_rate} | ${topology_type}
1021 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1022 | | ${tmp}= | Create List | 100%PDR | ${lat}
1023 | | ${latency}= | Create List | ${tmp}
1024 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1025 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1026 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1027 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1028 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1029
1030 | Find NDR using binary search and pps
1031 | | [Documentation]
1032 | | ... | Find throughput by using RFC2544 binary search with non drop rate.
1033 | | ...
1034 | | ... | *Arguments:*
1035 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1036 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1037 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1038 | | ... | - topology_type - Topology type. Type: string
1039 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1040 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1041 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1042 | | ...
1043 | | ... | *Example:*
1044 | | ...
1045 | | ... | \| Find NDR using binary search and pps \| 64 \| 6000000 \
1046 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \|
1047 | | ...
1048 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1049 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1050 | | ...
1051 | | ${duration}= | Set Variable | 10
1052 | | Set Duration | ${duration}
1053 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1054 | | Set Search Frame Size | ${framesize}
1055 | | Set Search Rate Type pps
1056 | | Set Binary Convergence Threshold | ${threshold}
1057 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1058 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1059 | | ${tmp}= | Create List | 100%NDR | ${lat}
1060 | | ${latency}= | Create List | ${tmp}
1061 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1062 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1063 | | ... | ${framesize} | ${topology_type}
1064 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1065 | | Append To List | ${latency} | ${tmp}
1066 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1067 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1068 | | ... | ${framesize} | ${topology_type}
1069 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1070 | | Append To List | ${latency} | ${tmp}
1071 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1072 | | ... | ${latency}
1073 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1074 | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
1075
1076 | Find PDR using binary search and pps
1077 | | [Documentation]
1078 | | ... | Find throughput by using RFC2544 binary search with partial drop rate
1079 | | ... | with PDR threshold and type specified by parameter.
1080 | | ...
1081 | | ... | *Arguments:*
1082 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1083 | | ... | - binary_min - Lower boundary of search [pps]. Type: float
1084 | | ... | - binary_max - Upper boundary of search [pps]. Type: float
1085 | | ... | - topology_type - Topology type. Type: string
1086 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1087 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1088 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1089 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1090 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1091 | | ...
1092 | | ... | *Example:*
1093 | | ...
1094 | | ... | \| Find PDR using binary search and pps \| 64 \| 6000000 \
1095 | | ... | \| 12000000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 50000 \| 0.5 \
1096 | | ... | \| percentage \|
1097 | | ...
1098 | | [Arguments] | ${framesize} | ${binary_min} | ${binary_max}
1099 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1100 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1101 | | ...
1102 | | ${duration}= | Set Variable | 10
1103 | | Set Duration | ${duration}
1104 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1105 | | Set Search Frame Size | ${framesize}
1106 | | Set Search Rate Type pps
1107 | | Set Loss Acceptance | ${loss_acceptance}
1108 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1109 | | ... | Set Loss Acceptance Type Percentage
1110 | | Set Binary Convergence Threshold | ${threshold}
1111 | | Binary Search | ${binary_min} | ${binary_max} | ${topology_type}
1112 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1113 | | ${tmp}= | Create List | 100%PDR | ${lat}
1114 | | ${latency}= | Create List | ${tmp}
1115 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1116 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1117 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1118 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1119 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1120
1121 | Find NDR using combined search and pps
1122 | | [Documentation]
1123 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1124 | | ... | non drop rate.
1125 | | ...
1126 | | ... | *Arguments:*
1127 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1128 | | ... | - start_rate - Initial start rate [pps]. Type: float
1129 | | ... | - step_rate - Step of linear search [pps]. Type: float
1130 | | ... | - topology_type - Topology type. Type: string
1131 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1132 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1133 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1134 | | ...
1135 | | ... | *Example:*
1136 | | ...
1137 | | ... | \| Find NDR using combined search and pps \| 64 \| 5000000 \
1138 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \|
1139 | | ...
1140 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1141 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1142 | | ...
1143 | | ${duration}= | Set Variable | 10
1144 | | Set Duration | ${duration}
1145 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1146 | | Set Search Linear Step | ${step_rate}
1147 | | Set Search Frame Size | ${framesize}
1148 | | Set Search Rate Type pps
1149 | | Set Binary Convergence Threshold | ${threshold}
1150 | | Combined Search | ${start_rate} | ${topology_type}
1151 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1152 | | ${tmp}= | Create List | 100%NDR | ${lat}
1153 | | ${latency}= | Create List | ${tmp}
1154 | | ${rate_50p}= | Evaluate | int(${rate_per_stream}*0.5)
1155 | | ${lat_50p}= | Measure latency pps | ${duration} | ${rate_50p}
1156 | | ... | ${framesize} | ${topology_type}
1157 | | ${tmp}= | Create List | 50%NDR | ${lat_50p}
1158 | | Append To List | ${latency} | ${tmp}
1159 | | ${rate_10p}= | Evaluate | int(${rate_per_stream}*0.1)
1160 | | ${lat_10p}= | Measure latency pps | ${duration} | ${rate_10p}
1161 | | ... | ${framesize} | ${topology_type}
1162 | | ${tmp}= | Create List | 10%NDR | ${lat_10p}
1163 | | Append To List | ${latency} | ${tmp}
1164 | | Display result of NDR search | ${rate_per_stream} | ${framesize} | 2
1165 | | ... | ${latency}
1166 | | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
1167 | | ... | ${framesize} | ${topology_type}
1168 | | ... | fail_on_loss=${False}
1169
1170 | Find PDR using combined search and pps
1171 | | [Documentation]
1172 | | ... | Find throughput by using RFC2544 combined search (linear+binary) with
1173 | | ... | partial drop rate with PDR threshold and type specified by parameter.
1174 | | ...
1175 | | ... | *Arguments:*
1176 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1177 | | ... | - start_rate - Initial start rate [pps]. Type: float
1178 | | ... | - step_rate - Step of linear search [pps]. Type: float
1179 | | ... | - topology_type - Topology type. Type: string
1180 | | ... | - min_rate - Lower limit of search [pps]. Type: float
1181 | | ... | - max_rate - Upper limit of search [pps]. Type: float
1182 | | ... | - threshold - Threshold to stop search [pps]. Type: integer
1183 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1184 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1185 | | ...
1186 | | ... | *Example:*
1187 | | ...
1188 | | ... | \| Find PDR using combined search and pps \| 64 \| 5000000 \
1189 | | ... | \| 100000 \| 3-node-IPv4 \| 100000 \| 14880952 \| 5000 \| 0.5 \
1190 | | ... | \| percentage \|
1191 | | ...
1192 | | [Arguments] | ${framesize} | ${start_rate} | ${step_rate}
1193 | | ... | ${topology_type} | ${min_rate} | ${max_rate} | ${threshold}
1194 | | ... | ${loss_acceptance}=0 | ${loss_acceptance_type}='frames'
1195 | | ...
1196 | | ${duration}= | Set Variable | 10
1197 | | Set Duration | ${duration}
1198 | | Set Search Rate Boundaries | ${max_rate} | ${min_rate}
1199 | | Set Search Linear Step | ${step_rate}
1200 | | Set Search Frame Size | ${framesize}
1201 | | Set Search Rate Type pps
1202 | | Set Loss Acceptance | ${loss_acceptance}
1203 | | Run Keyword If | '${loss_acceptance_type}' == 'percentage'
1204 | | ... | Set Loss Acceptance Type Percentage
1205 | | Set Binary Convergence Threshold | ${threshold}
1206 | | Combined Search | ${start_rate} | ${topology_type}
1207 | | ${rate_per_stream} | ${lat}= | Verify Search Result
1208 | | ${tmp}= | Create List | 100%PDR | ${lat}
1209 | | ${latency}= | Create List | ${tmp}
1210 | | Display result of PDR search | ${rate_per_stream} | ${framesize} | 2
1211 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1212 | | Traffic should pass with partial loss | ${duration} | ${rate_per_stream}pps
1213 | | ... | ${framesize} | ${topology_type} | ${loss_acceptance}
1214 | | ... | ${loss_acceptance_type} | fail_on_loss=${False}
1215
1216 | Display result of NDR search
1217 | | [Documentation]
1218 | | ... | Display result of NDR search in packet per seconds (total and per
1219 | | ... | stream) and Gbps total bandwidth with untagged packet.
1220 | | ... | Througput is calculated as:
1221 | | ... | Measured rate per stream * Total number of streams
1222 | | ... | Bandwidth is calculated as:
1223 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1224 | | ...
1225 | | ... | *Arguments:*
1226 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1227 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1228 | | ... | - nr_streams - Total number of streams. Type: integer
1229 | | ... | - latency - Latency stats. Type: dictionary
1230 | | ...
1231 | | ... | *Example:*
1232 | | ...
1233 | | ... | \| Display result of NDR search \| 4400000 \| 64 \| 2 \
1234 | | ... | \| [100%NDR, [10/10/10, 1/2/3]] \|
1235 | | ...
1236 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams} | ${latency}
1237 | | ...
1238 | | ${framesize}= | Get Frame Size | ${framesize}
1239 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1240 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1241 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1242 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1243 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1244 | | ... | append=yes
1245 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1246 | | :FOR | ${lat} | IN | @{latency}
1247 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1248
1249 | Display result of PDR search
1250 | | [Documentation]
1251 | | ... | Display result of PDR search in packet per seconds (total and per
1252 | | ... | stream) and Gbps total bandwidth with untagged packet.
1253 | | ... | Througput is calculated as:
1254 | | ... | Measured rate per stream * Total number of streams
1255 | | ... | Bandwidth is calculated as:
1256 | | ... | (Througput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
1257 | | ...
1258 | | ... | *Arguments:*
1259 | | ... | - rate_per_stream - Measured rate per stream [pps]. Type: string
1260 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1261 | | ... | - nr_streams - Total number of streams. Type: integer
1262 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1263 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1264 | | ... | - latency - Latency stats. Type: dictionary
1265 | | ...
1266 | | ... | *Example:*
1267 | | ...
1268 | | ... | \| Display result of PDR search \| 4400000 \| 64 \| 2 \| 0.5 \
1269 | | ... | \| percentage \| [100%NDR, [10/10/10, 1/2/3]] \|
1270 | | ...
1271 | | [Arguments] | ${rate_per_stream} | ${framesize} | ${nr_streams}
1272 | | ... | ${loss_acceptance} | ${loss_acceptance_type} | ${latency}
1273 | | ...
1274 | | ${framesize}= | Get Frame Size | ${framesize}
1275 | | ${rate_total}= | Evaluate | ${rate_per_stream}*${nr_streams}
1276 | | ${bandwidth_total}= | Evaluate | ${rate_total}*(${framesize}+20)*8/(10**9)
1277 | | Set Test Message | FINAL_RATE: ${rate_total} pps
1278 | | Set Test Message | (${nr_streams}x ${rate_per_stream} pps) | append=yes
1279 | | Set Test Message | ${\n}FINAL_BANDWIDTH: ${bandwidth_total} Gbps (untagged)
1280 | | ... | append=yes
1281 | | Set Test Message | ${\n}LATENCY usec [min/avg/max] | append=yes
1282 | | :FOR | ${lat} | IN | @{latency}
1283 | | | Set Test Message | ${\n}LAT_${lat[0]}: ${lat[1]} | append=yes
1284 | | Set Test Message
1285 | | ... | ${\n}LOSS_ACCEPTANCE: ${loss_acceptance} ${loss_acceptance_type}
1286 | | ... | append=yes
1287
1288 | Measure latency pps
1289 | | [Documentation]
1290 | | ... | Send traffic at specified rate. Measure min/avg/max latency
1291 | | ...
1292 | | ... | *Arguments:*
1293 | | ... | - duration - Duration of traffic run [s]. Type: integer
1294 | | ... | - rate - Rate for sending packets. Type: integer
1295 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1296 | | ... | - topology_type - Topology type. Type: string
1297 | | ...
1298 | | ... | *Example:*
1299 | | ...
1300 | | ... | \| Measure latency \| 10 \| 4.0 \| 64 \| 3-node-IPv4 \|
1301 | | ...
1302 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1303 | | ...
1304 | | Return From Keyword If | ${rate} <= 10000 | ${-1}
1305 | | ${ret}= | For DPDK Performance Test
1306 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1307 | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize}
1308 | | ... | ${topology_type} | warmup_time=0
1309 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1310 | | Run keyword and return | Get latency
1311
1312 | Traffic should pass with no loss
1313 | | [Documentation]
1314 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
1315 | | ... | evaluation.
1316 | | ...
1317 | | ... | *Arguments:*
1318 | | ... | - duration - Duration of traffic run [s]. Type: integer
1319 | | ... | - rate - Rate for sending packets. Type: string
1320 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1321 | | ... | - topology_type - Topology type. Type: string
1322 | | ...
1323 | | ... | *Example:*
1324 | | ...
1325 | | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
1326 | | ... | \| 3-node-IPv4 \|
1327 | | ...
1328 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1329 | | ... | ${fail_on_loss}=${True}
1330 | | ...
1331 | | Clear and show runtime counters with running traffic | ${duration}
1332 | | ... | ${rate} | ${framesize} | ${topology_type}
1333 | | ${ret}= | For DPDK Performance Test
1334 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1335 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1336 | | ... | ${topology_type} | warmup_time=0
1337 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1338 | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
1339
1340 | Traffic should pass with partial loss
1341 | | [Documentation]
1342 | | ... | Send traffic at specified rate. Partial packet loss is accepted
1343 | | ... | within loss acceptance value specified as argument.
1344 | | ...
1345 | | ... | *Arguments:*
1346 | | ... | - duration - Duration of traffic run [s]. Type: integer
1347 | | ... | - rate - Rate for sending packets. Type: string
1348 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1349 | | ... | - topology_type - Topology type. Type: string
1350 | | ... | - loss_acceptance - Accepted loss during search. Type: float
1351 | | ... | - loss_acceptance_type - Percentage or frames. Type: string
1352 | | ...
1353 | | ... | *Example:*
1354 | | ...
1355 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1356 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1357 | | ...
1358 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1359 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1360 | | ... | ${fail_on_loss}=${True}
1361 | | ...
1362 | | Clear and show runtime counters with running traffic | ${duration}
1363 | | ... | ${rate} | ${framesize} | ${topology_type}
1364 | | ${ret}= | For DPDK Performance Test
1365 | | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs
1366 | | Send traffic on tg | ${duration} | ${rate} | ${framesize}
1367 | | ... | ${topology_type} | warmup_time=0
1368 | | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs
1369 | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted
1370 | | ... | ${loss_acceptance} | ${loss_acceptance_type}
1371
1372 | Clear and show runtime counters with running traffic
1373 | | [Documentation]
1374 | | ... | Start traffic at specified rate then clear runtime counters on all
1375 | | ... | DUTs. Wait for specified amount of time and capture runtime counters
1376 | | ... | on all DUTs. Finally stop traffic
1377 | | ...
1378 | | ... | *Arguments:*
1379 | | ... | - duration - Duration of traffic run [s]. Type: integer
1380 | | ... | - rate - Rate for sending packets. Type: string
1381 | | ... | - framesize - L2 Frame Size [B]. Type: integer
1382 | | ... | - topology_type - Topology type. Type: string
1383 | | ...
1384 | | ... | *Example:*
1385 | | ...
1386 | | ... | \| Traffic should pass with partial loss \| 10 \| 4.0mpps \| 64 \
1387 | | ... | \| 3-node-IPv4 \| 0.5 \| percentage \|
1388 | | ...
1389 | | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
1390 | | ...
1391 | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type}
1392 | | ... | warmup_time=0 | async_call=${True} | 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 uses by default 5 cores and 2048M. Testpmd
1416 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1417 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1418 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1419 | | ...
1420 | | ... | *Arguments:*
1421 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1422 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1423 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1424 | | ... | - vm_name - QemuUtil instance name. Type: string
1425 | | ... | - skip - number of cpus which will be skipped. Type: int
1426 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1427 | | ...
1428 | | ... | *Example:*
1429 | | ...
1430 | | ... | \| Guest VM with dpdk-testpmd connected via vhost-user is setup \
1431 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1432 | | ... | \| ${5} \|
1433 | | ...
1434 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1435 | | ... | ${count}=${5}
1436 | | ...
1437 | | Import Library | resources.libraries.python.QemuUtils
1438 | | ... | WITH NAME | ${vm_name}
1439 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1440 | | ... | ${dut1_if1} | ${dut1_if2}
1441 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1442 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1443 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1444 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1445 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1446 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1447 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1448 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1449 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1450 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1451 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1452 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1453 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1454 | | Return From Keyword | ${vm}
1455
1456 | Guest VM with dpdk-testpmd using SMT connected via vhost-user is setup
1457 | | [Documentation]
1458 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1459 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1460 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1461 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1462 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1463 | | ...
1464 | | ... | *Arguments:*
1465 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1466 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1467 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1468 | | ... | - vm_name - QemuUtil instance name. Type: string
1469 | | ... | - skip - number of cpus which will be skipped. Type: int
1470 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1471 | | ...
1472 | | ... | *Example:*
1473 | | ...
1474 | | ... | \| Guest VM with dpdk-testpmd using SMT connected via vhost-user is \
1475 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1476 | | ... | \| ${6} \| ${5} \|
1477 | | ...
1478 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1479 | | ... | ${count}=${5}
1480 | | ...
1481 | | Import Library | resources.libraries.python.QemuUtils
1482 | | ... | WITH NAME | ${vm_name}
1483 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1484 | | ... | ${dut1_if1} | ${dut1_if2}
1485 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1486 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1487 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1488 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1489 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1490 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1491 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1492 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1493 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1494 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1495 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1496 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1497 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1498 | | Return From Keyword | ${vm}
1499
1500 | Guest VM with dpdk-testpmd-mac connected via vhost-user is setup
1501 | | [Documentation]
1502 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1503 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1504 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1505 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1506 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1507 | | ...
1508 | | ... | *Arguments:*
1509 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1510 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1511 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1512 | | ... | - vm_name - QemuUtil instance name. Type: string
1513 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1514 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1515 | | ... | - skip - number of cpus which will be skipped. Type: int
1516 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1517 | | ...
1518 | | ... | *Example:*
1519 | | ...
1520 | | ... | \| Guest VM with dpdk-testpmd for Vhost L2BD forwarding is setup \
1521 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1522 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1523 | | ...
1524 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1525 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1526 | | ...
1527 | | Import Library | resources.libraries.python.QemuUtils
1528 | | ... | WITH NAME | ${vm_name}
1529 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1530 | | ... | ${dut1_if1} | ${dut1_if2}
1531 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1532 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1533 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1534 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1535 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1536 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1537 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1538 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1539 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1540 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1541 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1542 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1543 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1544 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1545 | | Return From Keyword | ${vm}
1546
1547 | Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user is setup
1548 | | [Documentation]
1549 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1550 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1551 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1552 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1553 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1554 | | ...
1555 | | ... | *Arguments:*
1556 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1557 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1558 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1559 | | ... | - vm_name - QemuUtil instance name. Type: string
1560 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1561 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1562 | | ... | - skip - number of cpus which will be skipped. Type: int
1563 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1564 | | ...
1565 | | ... | *Example:*
1566 | | ...
1567 | | ... | \| Guest VM with dpdk-testpmd-mac using SMT connected via vhost-user \
1568 | | ... | is setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1569 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1570 | | ...
1571 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1572 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1573 | | ...
1574 | | Import Library | resources.libraries.python.QemuUtils
1575 | | ... | WITH NAME | ${vm_name}
1576 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1577 | | ... | ${dut1_if1} | ${dut1_if2}
1578 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1579 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1580 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1581 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1582 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1583 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1584 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1585 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1586 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1587 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1588 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1589 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1590 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1591 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1592 | | Return From Keyword | ${vm}
1593
1594 | Guest VM with Linux Bridge connected via vhost-user is setup
1595 | | [Documentation]
1596 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1597 | | ... | linux bridge. Qemu Guest uses 2048M.
1598 | | ...
1599 | | ... | *Arguments:*
1600 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1601 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1602 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1603 | | ... | - vm_name - QemuUtil instance name. Type: string
1604 | | ... | - skip - number of cpus which will be skipped. Type: int
1605 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1606 | | ...
1607 | | ... | *Example:*
1608 | | ...
1609 | | ... | \| Guest VM with Linux Bridge connected via vhost-user is setup \
1610 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1611 | | ... | \| ${5} \|
1612 | | ...
1613 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1614 | | ... | ${count}=${5}
1615 | | ...
1616 | | Import Library | resources.libraries.python.QemuUtils
1617 | | ... | WITH NAME | ${vm_name}
1618 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1619 | | ... | ${dut1_if1} | ${dut1_if2}
1620 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1621 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1622 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1623 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1624 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1625 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1626 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1627 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1628 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1629 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1630 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1631 | | ${br}= | Set Variable | br0
1632 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1633 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1634 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1635 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1636 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1637 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1638 | | Return From Keyword | ${vm}
1639
1640 | Guest VM with Linux Bridge using SMT connected via vhost-user is setup
1641 | | [Documentation]
1642 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1643 | | ... | linux bridge. Qemu Guest uses 2048M.
1644 | | ...
1645 | | ... | *Arguments:*
1646 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1647 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1648 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1649 | | ... | - vm_name - QemuUtil instance name. Type: string
1650 | | ... | - skip - number of cpus which will be skipped. Type: int
1651 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1652 | | ...
1653 | | ... | *Example:*
1654 | | ...
1655 | | ... | \| Guest VM with Linux Bridge using SMT connected via vhost-user is \
1656 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1657 | | ... | \| ${6}\| ${5} \|
1658 | | ...
1659 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1660 | | ... | ${count}=${5}
1661 | | ...
1662 | | Import Library | resources.libraries.python.QemuUtils
1663 | | ... | WITH NAME | ${vm_name}
1664 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1665 | | ... | ${dut1_if1} | ${dut1_if2}
1666 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1667 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1668 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1669 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1670 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1671 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1672 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1673 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${glob_vm_image}
1674 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1675 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1676 | | Run keyword | ${vm_name}.Qemu Set Scheduler Policy
1677 | | ${br}= | Set Variable | br0
1678 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1679 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1680 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1681 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1682 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1683 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1684 | | Return From Keyword | ${vm}
1685
1686 | Guest VM with dpdk-testpmd Teardown
1687 | | [Documentation]
1688 | | ... | Stop all qemu processes with dpdk-testpmd running on ${dut_node}.
1689 | | ... | Argument is dictionary of all qemu nodes running with its names.
1690 | | ... | Dpdk-testpmd is stopped gracefully with printing stats.
1691 | | ... |
1692 | | ... | *Arguments:*
1693 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1694 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1695 | | ...
1696 | | ... | *Example:*
1697 | | ...
1698 | | ... | \| Guest VM with dpdk-testpmd Teardown \| ${node['DUT1']} \
1699 | | ... | \| ${dut_vm_refs} \|
1700 | | ...
1701 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1702 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1703 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1704 | | | Dpdk Testpmd Stop | ${vm}
1705 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1706 | | | Run Keyword | ${vm_name}.Qemu Kill
1707 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1708
1709 | Guest VM Teardown
1710 | | [Documentation]
1711 | | ... | Stop all qemu processes running on ${dut_node}.
1712 | | ... | Argument is dictionary of all qemu nodes running with its names.
1713 | | ... |
1714 | | ... | *Arguments:*
1715 | | ... | - dut_node - Node where to clean qemu. Type: dictionary
1716 | | ... | - dut_vm_refs - VM references on node. Type: dictionary
1717 | | ...
1718 | | ... | *Example:*
1719 | | ...
1720 | | ... | \| Guest VM Teardown \| ${node['DUT1']} \
1721 | | ... | \| ${dut_vm_refs} \|
1722 | | ...
1723 | | [Arguments] | ${dut_node} | ${dut_vm_refs}
1724 | | :FOR | ${vm_name} | IN | @{dut_vm_refs}
1725 | | | ${vm}= | Get From Dictionary | ${dut_vm_refs} | ${vm_name}
1726 | | | Run Keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1727 | | | Run Keyword | ${vm_name}.Qemu Kill
1728 | | | Run Keyword | ${vm_name}.Qemu Clear Socks
1729
1730 | Lisp IPv4 forwarding initialized in a 3-node circular topology
1731 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1732 | | ... | Don`t set route.
1733 | | ...
1734 | | ... | *Arguments:*
1735 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1736 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1737 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1738 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1739 | | ... | -${duts_prefix} - ip prefix. Type: int
1740 | | ...
1741 | | ... | *Return:*
1742 | | ... | - No value returned
1743 | | ...
1744 | | ... | *Example:*
1745 | | ... | \| Lisp IPv4 forwarding initialized in a 3-node circular topology \
1746 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1747 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1748 | | ...
1749 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1750 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1751 | | ...
1752 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1753 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1754 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1755 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1756 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1757 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1758 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1759 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1760 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1761 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1762 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1763 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1764 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_address} | ${duts_prefix}
1765 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_address} | ${duts_prefix}
1766 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_address} | ${duts_prefix}
1767 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_address} | ${duts_prefix}
1768 | | All Vpp Interfaces Ready Wait | ${nodes}
1769
1770 | Lisp IPv6 forwarding initialized in a 3-node circular topology
1771 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1772 | | ... | Don`t set route.
1773 | | ...
1774 | | ... | *Arguments:*
1775 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1776 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1777 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1778 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1779 | | ... | -${duts_prefix} - ip prefix. Type: int
1780 | | ...
1781 | | ... | *Return:*
1782 | | ... | - No value returned
1783 | | ...
1784 | | ... | *Example:*
1785 | | ... | \| Lisp IPv6 forwarding initialized in a 3-node circular topology \
1786 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1787 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1788 | | ...
1789 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1790 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1791 | | ...
1792 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1793 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1794 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1795 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1796 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
1797 | | ... | ${prefix}
1798 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
1799 | | ... | ${prefix}
1800 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
1801 | | ... | ${prefix}
1802 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
1803 | | ... | ${prefix}
1804 | | Vpp nodes ra suppress link layer | ${nodes}
1805 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1806 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1807 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
1808 | | ... | ${dut2_if1_mac}
1809 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
1810 | | ... | ${dut1_if2_mac}
1811
1812 | Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular topology
1813 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1814 | | ... | Don`t set route.
1815 | | ...
1816 | | ... | *Arguments:*
1817 | | ... | - ${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
1818 | | ... | Type: string
1819 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1820 | | ... | - ${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
1821 | | ... | Type: string
1822 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1823 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1824 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1825 | | ...
1826 | | ... | *Return:*
1827 | | ... | - No value returned
1828 | | ...
1829 | | ... | *Example:*
1830 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1831 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1832 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1833 | | ... | \| ${prefix4} \| ${prefix6} \|
1834 | | ...
1835 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1836 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1837 | | ... | ${prefix4} | ${prefix6}
1838 | | ...
1839 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1840 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1841 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1842 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1843 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1844 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1845 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1846 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1847 | | dut1_v4.set_ip | ${dut1_if1} | ${dut1_tg_ip4_address} | ${prefix4}
1848 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
1849 | | ... | ${prefix6}
1850 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
1851 | | ... | ${prefix6}
1852 | | dut2_v4.set_ip | ${dut2_if2} | ${dut2_tg_ip4_address} | ${prefix4}
1853 | | Vpp nodes ra suppress link layer | ${nodes}
1854 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1855 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1856 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
1857 | | ... | ${dut2_if1_mac}
1858 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
1859 | | ... | ${dut1_if2_mac}
1860
1861 | Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular topology
1862 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1863 | | ... | Don`t set route.
1864 | | ...
1865 | | ... | *Arguments:*
1866 | | ... | - ${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
1867 | | ... | Type: string
1868 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1869 | | ... | - ${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
1870 | | ... | Type: string
1871 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1872 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1873 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1874 | | ...
1875 | | ... | *Return:*
1876 | | ... | - No value returned
1877 | | ...
1878 | | ... | *Example:*
1879 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1880 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1881 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1882 | | ... | \| ${prefix6} \| ${prefix4} \|
1883 | | ...
1884 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1885 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1886 | | ... | ${prefix6} | ${prefix4}
1887 | | ...
1888 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1889 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1890 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1891 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1892 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1893 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1894 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1895 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1896 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
1897 | | ... | ${prefix6}
1898 | | dut1_v4.set_ip | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1899 | | dut2_v4.set_ip | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1900 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
1901 | | ... | ${prefix6}
1902 | | Vpp nodes ra suppress link layer | ${nodes}
1903 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1904 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1905 | | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1906 | | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1907
1908 | DPDK 2-node Performance Suite Setup with DUT's NIC model
1909 | | [Documentation]
1910 | | ... | Updates interfaces on all nodes and setup global
1911 | | ... | variables used in test cases based on interface model provided as an
1912 | | ... | argument. Initializes traffic generator. Initializes DPDK test
1913 | | ... | environment.
1914 | | ...
1915 | | ... | *Arguments:*
1916 | | ... | - topology_type - Topology type. Type: string
1917 | | ... | - nic_model - Interface model. Type: string
1918 | | ...
1919 | | ... | *Example:*
1920 | | ...
1921 | | ... | \| DPDK 2-node Performance Suite Setup with DUT's NIC model \
1922 | | ... | \| L2 \| Intel-X520-DA2 \|
1923 | | ...
1924 | | [Arguments] | ${topology_type} | ${nic_model}
1925 | | ...
1926 | | Setup performance global Variables
1927 | | 2-node circular Topology Variables Setup with DUT interface model
1928 | | ... | ${nic_model}
1929 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
1930 | | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
1931 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
1932
1933 | DPDK 3-node Performance Suite Setup with DUT's NIC model
1934 | | [Documentation]
1935 | | ... | Updates interfaces on all nodes and setup global
1936 | | ... | variables used in test cases based on interface model provided as an
1937 | | ... | argument. Initializes traffic generator. Initializes DPDK test
1938 | | ... | environment.
1939 | | ...
1940 | | ... | *Arguments:*
1941 | | ... | - topology_type - Topology type. Type: string
1942 | | ... | - nic_model - Interface model. Type: string
1943 | | ...
1944 | | ... | *Example:*
1945 | | ...
1946 | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
1947 | | ...
1948 | | [Arguments] | ${topology_type} | ${nic_model}
1949 | | ...
1950 | | Setup performance global Variables
1951 | | 3-node circular Topology Variables Setup with DUT interface model
1952 | | ... | ${nic_model}
1953 | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
1954 | | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
1955 | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
1956 | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
1957
1958 | DPDK 3-node Performance Suite Teardown
1959 | | [Documentation]
1960 | | ... | Suite teardown phase with traffic generator teardown.
1961 | | ... | Cleanup DPDK test environment.
1962 | | ...
1963 | | Teardown traffic generator | ${tg}
1964 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
1965 | | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
1966
1967 | DPDK 2-node Performance Suite Teardown
1968 | | [Documentation]
1969 | | ... | Suite teardown phase with traffic generator teardown.
1970 | | ... | Cleanup DPDK test environment.
1971 | | ...
1972 | | Teardown traffic generator | ${tg}
1973 | | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
1974
1975 | For DPDK Performance Test
1976 | | [Documentation]
1977 | | ... | Return TRUE if variable DPDK_TEST exist, otherwise FALSE.
1978 | | ${ret} | ${tmp}= | Run Keyword And Ignore Error
1979 | | ... | Variable Should Exist | ${DPDK_TEST}
1980 | | Return From Keyword If | "${ret}" == "PASS" | ${TRUE}
1981 | | Return From Keyword | ${FALSE}