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