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