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