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