f54d1685c496c42c5e1ff2586e297e7a55a791f2
[csit.git] / resources / libraries / robot / l2 / l2_bridge_domain.robot
1 # Copyright (c) 2021 Cisco and/or its affiliates.
2 # Copyright (c) 2021 PANTHEON.tech and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 *** Settings ***
16 | Library | resources.libraries.python.L2Util
17 | Library | resources.libraries.python.InterfaceUtil
18 | Library | resources.libraries.python.NodePath
19 | Library | resources.libraries.python.VhostUser
20 | Library | resources.libraries.python.Memif
21
22 *** Keywords ***
23 | Show Bridge Domain Data On All DUTs
24 | | [Documentation] | Show Bridge Domain data on all DUTs.
25 | |
26 | | FOR | ${dut} | IN | @{duts}
27 | | | VPP Get Bridge Domain Data | ${nodes['${dut}']}
28 | | END
29
30 | Add interface to bridge domain
31 | | [Documentation]
32 | | ... | Set given interface admin state to up and add this
33 | | ... | interface to required L2 bridge domain on defined VPP node.
34 | |
35 | | ... | *Arguments:*
36 | | ... | - ${dut} - DUT node. Type: dictionary
37 | | ... | - ${dut_if} - DUT node interface name. Type: string
38 | | ... | - ${bd_id} - Bridge domain ID. Type: integer
39 | | ... | - ${shg} - Split-horizon group ID. Type: integer, default value: 0
40 | |
41 | | ... | *Example:*
42 | |
43 | | ... | \| Add interface to bridge domain \| ${nodes['DUT2']} \
44 | | ... | \| GigabitEthernet0/8/0 \| 3 \|
45 | |
46 | | [Arguments] | ${dut} | ${dut_if} | ${bd_id} | ${shg}=0
47 | |
48 | | Set Interface State | ${dut} | ${dut_if} | up
49 | | Add Interface To L2 BD | ${dut} | ${dut_if} | ${bd_id} | ${shg}
50
51 | Initialize L2 bridge domain on node
52 | | [Documentation]
53 | | ... | Setup L2 bridge domain topology by adding two interfaces on DUT into
54 | | ... | separate bridge domains that are created automatically starting with
55 | | ... | index 1. Learning is enabled. Interfaces are brought up.
56 | |
57 | | ... | *Arguments:*
58 | | ... | - dut - DUT node. Type: string
59 | | ... | - count - Number of bridge domains interfaces. Type: integer
60 | |
61 | | ... | *Example:*
62 | |
63 | | ... | \| Initialize L2 bridge domain on node \| DUT1 \| 1 \|
64 | |
65 | | [Arguments] | ${dut} | ${count}=${1}
66 | |
67 | | FOR | ${id} | IN RANGE | 1 | ${count} + 1
68 | | | Add Interface To L2 BD
69 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}1_${id}}[0] | ${id}
70 | | | Add Interface To L2 BD
71 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}2_${id}}[0] | ${id}
72 | | END
73
74 | Initialize L2 bridge domain
75 | | [Documentation]
76 | | ... | Setup L2 bridge domain topology by adding two interfaces on each DUT
77 | | ... | into separate bridge domains that are created automatically starting
78 | | ... | with index 1. Learning is enabled. Interfaces are brought up.
79 | |
80 | | ... | *Arguments:*
81 | | ... | - count - Number of bridge domains. Type: integer
82 | |
83 | | ... | *Example:*
84 | |
85 | | ... | \| Initialize L2 bridge domain \| 1 \|
86 | |
87 | | [Arguments] | ${count}=${1}
88 | |
89 | | FOR | ${dut} | IN | @{duts}
90 | | | Initialize L2 bridge domain on node | ${dut} | count=${count}
91 | | END
92
93 | Initialize L2 bridge domains with Vhost-User on node
94 | | [Documentation]
95 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
96 | | ... | defined VPP node. Add each Vhost-User interface into L2 bridge
97 | | ... | domains with learning enabled with physical inteface or Vhost-User
98 | | ... | interface of another VM.
99 | |
100 | | ... | *Arguments:*
101 | | ... | - dut - DUT node. Type: string
102 | | ... | - nf_chain - NF chain. Type: integer
103 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
104 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
105 | | ... | Type: integer
106 | |
107 | | ... | *Note:*
108 | | ... | Socket paths for VM are defined in following format:
109 | | ... | - /var/run/vpp/sock-\${VM_ID}-1
110 | | ... | - /var/run/vpp/sock-\${VM_ID}-2
111 | |
112 | | ... | *Example:*
113 | |
114 | | ... | \| Initialize L2 bridge domains with Vhost-User on node \| DUT1 \
115 | | ... | \| 1 \| 1 \|
116 | |
117 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
118 | | ... | ${virtio_feature_mask}=${None}
119 | |
120 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
121 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
122 | | Add interface to bridge domain
123 | | ... | ${nodes['${dut}']} | ${${dut}_${int}1_${nf_chain}}[0]
124 | | ... | ${bd_id1}
125 | | Add interface to bridge domain
126 | | ... | ${nodes['${dut}']} | ${${dut}_${int}2_${nf_chain}}[0]
127 | | ... | ${bd_id2}
128 | | FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes} + 1
129 | | | ${qemu_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
130 | | | Configure vhost interfaces
131 | | | ... | ${nodes['${dut}']}
132 | | | ... | /var/run/vpp/sock-${qemu_id}-1 | /var/run/vpp/sock-${qemu_id}-2
133 | | | ... | ${dut}-vhost-${qemu_id}-if1 | ${dut}-vhost-${qemu_id}-if2
134 | | | ... | virtio_feature_mask=${virtio_feature_mask}
135 | | | ${bd_id1}= | Evaluate | ${qemu_id} + (${nf_chain} - 1)
136 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
137 | | | Add interface to bridge domain
138 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if1} | ${bd_id1}
139 | | | Add interface to bridge domain
140 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if2} | ${bd_id2}
141 | | END
142
143 | Initialize L2 bridge domains with Vhost-User
144 | | [Documentation]
145 | | ... | Create pairs of Vhost-User interfaces for defined number of VNF nodes
146 | | ... | on all defined VPP nodes. Add each Vhost-User interface into L2 bridge
147 | | ... | domains with learning enabled with physical inteface or Vhost-User
148 | | ... | interface of another VM.
149 | |
150 | | ... | *Arguments:*
151 | | ... | - nf_chain - NF chain. Type: integer
152 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
153 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
154 | | ... | Type: integer
155 | |
156 | | ... | *Example:*
157 | |
158 | | ... | \| Initialize L2 bridge domains with Vhost-User \| 1 \| 1 \|
159 | |
160 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1}
161 | | ... | ${virtio_feature_mask}=${None}
162 | |
163 | | FOR | ${dut} | IN | @{duts}
164 | | | Initialize L2 bridge domains with Vhost-User on node
165 | | | ... | ${dut} | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
166 | | | ... | virtio_feature_mask=${virtio_feature_mask}
167 | | END
168
169 | Initialize L2 bridge domains for multiple chains with Vhost-User
170 | | [Documentation]
171 | | ... | Create pairs of Vhost-User interfaces for defined number of NF chains
172 | | ... | with defined number of VNF nodes on all defined VPP nodes. Add each
173 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
174 | | ... | with physical inteface or Vhost-User interface of another VM.
175 | | ... | Put all interfaces in path up.
176 | |
177 | | ... | *Arguments:*
178 | | ... | - nf_chains - Number of chains of NFs. Type: integer
179 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
180 | | ... | - start - Id of first chain, allows to add chains during test.
181 | | ... |     Type: integer
182 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
183 | | ... | Type: integer
184 | |
185 | | ... | *Example:*
186 | |
187 | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \
188 | | ... | \| 3 \| 1 \| 2 \|
189 | |
190 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${start}=${1}
191 | | ... | ${virtio_feature_mask}=${None}
192 | |
193 | | Set interfaces in path up
194 | | FOR | ${nf_chain} | IN RANGE | ${start} | ${nf_chains} + 1
195 | | | Initialize L2 bridge domains with Vhost-User
196 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
197 | | | ... | virtio_feature_mask=${virtio_feature_mask}
198 | | END
199
200 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
201 | | [Documentation]
202 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
203 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
204 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
205 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
206 | | ... | interfaces.
207 | |
208 | | Set interfaces in path up
209 | | VPP Interface Set IP Address
210 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 172.16.0.1 | 24
211 | | VPP Interface Set IP Address
212 | | ... | ${dut2} | ${DUT2_${int}1}[0] | 172.16.0.2 | 24
213 | | VPP Add IP Neighbor
214 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 172.16.0.2
215 | | ... | ${DUT2_${int}1_mac}[0]
216 | | VPP Add IP Neighbor
217 | | ... | ${dut2} | ${DUT2_${int}1}[0] | 172.16.0.1
218 | | ... | ${DUT1_${int}2_mac}[0]
219 | | ${dut1s_vxlan}= | Create VXLAN interface
220 | | ... | ${dut1} | 24 | 172.16.0.1 | 172.16.0.2
221 | | ${dut2s_vxlan}= | Create VXLAN interface
222 | | ... | ${dut2} | 24 | 172.16.0.2 | 172.16.0.1
223 | | VPP Add L2 Bridge Domain
224 | | ... | ${dut1} | ${1} | ${DUT1_${int}1}[0] | ${dut1s_vxlan}
225 | | Set Interface State
226 | | ... | ${dut1} | ${dut1s_vxlan} | up
227 | | VPP Add L2 Bridge Domain
228 | | ... | ${dut2} | ${1} | ${DUT2_${int}2}[0] | ${dut2s_vxlan}
229 | | Set Interface State
230 | | ... | ${dut2} | ${dut2s_vxlan} | up
231
232 | Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node circular topology
233 | | [Documentation]
234 | | ... | Setup L2 bridge domain topology with VLAN and VXLANoIPv4 by connecting
235 | | ... | pairs of VLAN sub-interface and VXLAN interface to separate L2 bridge
236 | | ... | domain on each DUT. All interfaces are brought up. IPv4 addresses
237 | | ... | with prefix /32 are configured on interfaces between DUTs. VXLAN
238 | | ... | sub-interfaces has same IPv4 address as interfaces.
239 | |
240 | | ... | *Arguments:*
241 | | ... | - vxlan_count - VXLAN count. Type: integer
242 | |
243 | | ... | *Example:*
244 | |
245 | | ... | \| Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node \
246 | | ... | \| circular topology \| ${1} \|
247 | |
248 | | [Arguments] | ${vxlan_count}=${1}
249 | |
250 | | Set interfaces in path up
251 | |
252 | | ${bd_id_start}= | Set Variable | ${1}
253 | | ${vni_start} = | Set Variable | ${20}
254 | |
255 | | ${ip_step} = | Set Variable | ${2}
256 | | ${dut1_ip_start}= | Set Variable | 172.16.0.1
257 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2
258 | |
259 | | Vpp create multiple VXLAN IPv4 tunnels
260 | | ... | node=${dut1}
261 | | ... | node_vxlan_if=${DUT1_${int}2}[0]
262 | | ... | node_vlan_if=${DUT1_${int}1}[0]
263 | | ... | op_node=${dut2}
264 | | ... | op_node_if=${DUT2_${int}1}[0]
265 | | ... | n_tunnels=${vxlan_count}
266 | | ... | vni_start=${vni_start}
267 | | ... | src_ip_start=${dut1_ip_start}
268 | | ... | dst_ip_start=${dut2_ip_start}
269 | | ... | ip_step=${ip_step}
270 | | ... | bd_id_start=${bd_id_start}
271 | | Vpp create multiple VXLAN IPv4 tunnels
272 | | ... | node=${dut2}
273 | | ... | node_vxlan_if=${DUT2_${int}1}[0]
274 | | ... | node_vlan_if=${DUT2_${int}2}[0]
275 | | ... | op_node=${dut1}
276 | | ... | op_node_if=${DUT1_${int}2}[0]
277 | | ... | n_tunnels=${vxlan_count}
278 | | ... | vni_start=${vni_start}
279 | | ... | src_ip_start=${dut2_ip_start}
280 | | ... | dst_ip_start=${dut1_ip_start}
281 | | ... | ip_step=${ip_step}
282 | | ... | bd_id_start=${bd_id_start}
283
284 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
285 | | [Documentation]
286 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
287 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
288 | | ... | with physical inteface.
289 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
290 | | ... | interfaces on each DUT. All interfaces are brought up.
291 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
292 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
293 | |
294 | | ... | *Arguments:*
295 | | ... | - bd_id1 - Bridge domain ID. Type: integer
296 | | ... | - bd_id2 - Bridge domain ID. Type: integer
297 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
298 | | ... | Type: integer
299 | |
300 | | ... | *Example:*
301 | |
302 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
303 | | ... | 3-node circular topology \| 1 \| 2 \|
304 | |
305 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${virtio_feature_mask}=${None}
306 | |
307 | | VPP Interface Set IP Address
308 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 172.16.0.1 | 24
309 | | VPP Interface Set IP Address
310 | | ... | ${dut2} | ${DUT2_${int}1}[0] | 172.16.0.2 | 24
311 | | Set interfaces in path up
312 | | ${dut1s_vxlan}= | Create VXLAN interface
313 | | ... | ${dut1} | 24 | 172.16.0.1 | 172.16.0.2
314 | | ${dut2s_vxlan}= | Create VXLAN interface
315 | | ... | ${dut2} | 24 | 172.16.0.2 | 172.16.0.1
316 | | Configure vhost interfaces | ${dut1}
317 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
318 | | ... | virtio_feature_mask=${virtio_feature_mask}
319 | | Add interface to bridge domain
320 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${bd_id1}
321 | | Add interface to bridge domain
322 | | ... | ${dut1} | ${vhost_if1} | ${bd_id1}
323 | | Add interface to bridge domain
324 | | ... | ${dut1} | ${vhost_if2} | ${bd_id2}
325 | | Add interface to bridge domain
326 | | ... | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
327 | | Configure vhost interfaces | ${dut2}
328 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
329 | | ... | virtio_feature_mask=${virtio_feature_mask}
330 | | Add interface to bridge domain
331 | | ... | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
332 | | Add interface to bridge domain
333 | | ... | ${dut2} | ${vhost_if1} | ${bd_id1}
334 | | Add interface to bridge domain
335 | | ... | ${dut2} | ${vhost_if2} | ${bd_id2}
336 | | Add interface to bridge domain
337 | | ... | ${dut2} | ${DUT2_${int}2}[0] | ${bd_id2}
338
339 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
340 | | [Documentation]
341 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
342 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
343 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
344 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
345 | | ... | interfaces are brought up.
346 | |
347 | | ... | *Arguments:*
348 | | ... | - bd_id1 - Bridge domain ID. Type: integer
349 | | ... | - bd_id2 - Bridge domain ID. Type: integer
350 | | ... | - subid - ID of the sub-interface to be created. Type: string
351 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
352 | |
353 | | ... | _NOTE:_ This KW uses following test case variables:
354 | | ... | - dut1 - DUT1 node.
355 | | ... | - dut2 - DUT2 node.
356 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
357 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
358 | |
359 | | ... | *Example:*
360 | |
361 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
362 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
363 | |
364 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
365 | |
366 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
367 | | ... | Variable Should Exist | ${dut2}
368 | |
369 | | Set interfaces in path up
370 | |
371 | | Run Keyword If | '${dut2_status}' == 'PASS'
372 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
373 | | ... | ${dut1} | ${DUT1_${int}2}[0]
374 | | ... | ${dut2} | ${DUT2_${int}1}[0] | SUB_ID=${subid}
375 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
376 | | ... | ${dut1} | ${DUT1_${int}2}[0] | SUB_ID=${subid}
377 | | Run Keyword If | '${dut2_status}' == 'PASS'
378 | | ... | Configure L2 tag rewrite method on interfaces
379 | | ... | ${dut1} | ${subif_index_1}
380 | | ... | ${dut2} | ${subif_index_2} | TAG_REWRITE_METHOD=${tag_rewrite}
381 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
382 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
383 | | Add interface to bridge domain
384 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${bd_id1}
385 | | Add interface to bridge domain
386 | | ... | ${dut1} | ${subif_index_1} | ${bd_id1}
387 | | Run Keyword If | '${dut2_status}' == 'PASS'
388 | | ... | Add interface to bridge domain
389 | | ... | ${dut2} | ${subif_index_2} | ${bd_id2}
390 | | Run Keyword If | '${dut2_status}' == 'PASS'
391 | | ... | Add interface to bridge domain
392 | | ... | ${dut2} | ${DUT2_${int}2}[0] | ${bd_id2}
393
394 | Initialize L2 bridge domains with Vhost-User and VLAN in circular topology
395 | | [Documentation]
396 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
397 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
398 | | ... | with physical inteface. In case of 3-node topology create VLAN
399 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
400 | | ... | sub-interface on dut1-if2 interface. All interfaces are brought up.
401 | |
402 | | ... | *Arguments:*
403 | | ... | - bd_id1 - Bridge domain ID. Type: integer
404 | | ... | - bd_id2 - Bridge domain ID. Type: integer
405 | | ... | - subid - ID of the sub-interface to be created. Type: string
406 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
407 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
408 | | ... | Type: integer
409 | |
410 | | ... | *Example:*
411 | |
412 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in circular\
413 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
414 | |
415 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
416 | | ... | ${virtio_feature_mask}=${None}
417 | |
418 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
419 | | ... | Variable Should Exist | ${dut2}
420 | |
421 | | Set interfaces in path up
422 | |
423 | | Run Keyword If | '${dut2_status}' == 'PASS'
424 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
425 | | ... | ${dut1} | ${DUT1_${int}2}[0]
426 | | ... | ${dut2} | ${DUT2_${int}1}[0] | SUB_ID=${subid}
427 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
428 | | ... | ${dut1} | ${DUT1_${int}2}[0] | SUB_ID=${subid}
429 | | Run Keyword If | '${dut2_status}' == 'PASS'
430 | | ... | Configure L2 tag rewrite method on interfaces
431 | | ... | ${dut1} | ${subif_index_1}
432 | | ... | ${dut2} | ${subif_index_2} | TAG_REWRITE_METHOD=${tag_rewrite}
433 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
434 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
435 | | Configure vhost interfaces | ${dut1}
436 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
437 | | ... | virtio_feature_mask=${virtio_feature_mask}
438 | | Add interface to bridge domain
439 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${bd_id1}
440 | | Add interface to bridge domain
441 | | ... | ${dut1} | ${vhost_if1} | ${bd_id1}
442 | | Add interface to bridge domain
443 | | ... | ${dut1} | ${vhost_if2} | ${bd_id2}
444 | | Add interface to bridge domain
445 | | ... | ${dut1} | ${subif_index_1} | ${bd_id2}
446 | | Run Keyword If | '${dut2_status}' == 'PASS'
447 | | ... | Configure vhost interfaces | ${dut2}
448 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
449 | | ... | virtio_feature_mask=${virtio_feature_mask}
450 | | Run Keyword If | '${dut2_status}' == 'PASS'
451 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
452 | | ... | ${bd_id1}
453 | | Run Keyword If | '${dut2_status}' == 'PASS'
454 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
455 | | Run Keyword If | '${dut2_status}' == 'PASS'
456 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
457 | | Run Keyword If | '${dut2_status}' == 'PASS'
458 | | ... | Add interface to bridge domain | ${dut2} | ${DUT2_${int}2}[0]
459 | | ... | ${bd_id2}
460
461 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
462 | | [Documentation]
463 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
464 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Add one
465 | | ... | physical interface towards next DUT as a member of BondEthernet
466 | | ... | interface. Setup VLAN on BondEthernet interfaces between DUTs. Add one
467 | | ... | Vhost-User interface into L2 bridge domains with learning enabled with
468 | | ... | physical interface towards TG and other Vhost-User interface into L2
469 | | ... | bridge domains with learning enabled with VLAN sub-interface. All
470 | | ... | interfaces are brought up.
471 | |
472 | | ... | *Arguments:*
473 | | ... | - bd_id1 - Bridge domain ID. Type: integer
474 | | ... | - bd_id2 - Bridge domain ID. Type: integer
475 | | ... | - subid - ID of the sub-interface to be created. Type: string
476 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
477 | | ... | - bond_mode - Link bonding mode. Type: string
478 | | ... | - lb_mode - Load balance mode. Type: string
479 | | ... | - virtio_feature_mask - Enabled Virtio features (Optional).
480 | | ... | Type: integer
481 | |
482 | | ... | *Example:*
483 | |
484 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
485 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \
486 | | ... | \| 10 \| pop-1 \| xor \| l34 \|
487 | |
488 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
489 | | ... | ${bond_mode} | ${lb_mode} | ${virtio_feature_mask}=${None}
490 | |
491 | | Set interfaces in path up
492 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface
493 | | ... | ${dut1} | ${bond_mode} | ${lb_mode}
494 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
495 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
496 | | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
497 | | | ${_even}= | Evaluate | ${pf} % 2
498 | | | Run Keyword Unless | ${even}
499 | | | ... | VPP Add Bond Member
500 | | | ... | ${dut1} | ${DUT1_${int}${pf}}[0] | ${dut1_eth_bond_if1}
501 | | END
502 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface
503 | | ... | ${dut2} | ${bond_mode} | ${lb_mode}
504 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
505 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
506 | | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
507 | | | ${_even}= | Evaluate | ${pf} % 2
508 | | | Run Keyword If | ${even}
509 | | | ... | VPP Add Bond Member
510 | | | ... | ${dut2} | ${DUT2_${int}${pf}}[0] | ${dut2_eth_bond_if1}
511 | | END
512 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
513 | | Initialize VLAN dot1q sub-interfaces in circular topology
514 | | ... | ${dut1} | ${dut1_eth_bond_if1}
515 | | ... | ${dut2} | ${dut2_eth_bond_if1} | ${subid}
516 | | Configure L2 tag rewrite method on interfaces
517 | | ... | ${dut1} | ${subif_index_1}
518 | | ... | ${dut2} | ${subif_index_2} | ${tag_rewrite}
519 | | Configure vhost interfaces | ${dut1}
520 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
521 | | ... | virtio_feature_mask=${virtio_feature_mask}
522 | | Add interface to bridge domain
523 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${bd_id1}
524 | | Add interface to bridge domain
525 | | ... | ${dut1} | ${vhost_if1} | ${bd_id1}
526 | | Add interface to bridge domain
527 | | ... | ${dut1} | ${vhost_if2} | ${bd_id2}
528 | | Add interface to bridge domain
529 | | ... | ${dut1} | ${subif_index_1} | ${bd_id2}
530 | | Configure vhost interfaces | ${dut2}
531 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
532 | | ... | virtio_feature_mask=${virtio_feature_mask}
533 | | Add interface to bridge domain
534 | | ... | ${dut2} | ${subif_index_2} | ${bd_id1}
535 | | Add interface to bridge domain
536 | | ... | ${dut2} | ${vhost_if1} | ${bd_id1}
537 | | Add interface to bridge domain
538 | | ... | ${dut2} | ${vhost_if2} | ${bd_id2}
539 | | Add interface to bridge domain
540 | | ... | ${dut2} | ${DUT2_${int}2}[0] | ${bd_id2}
541
542 | Initialize L2 Bridge Domain with memif pairs on DUT node
543 | | [Documentation]
544 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
545 | | ... | to separate L2 bridge domain with one physical or memif interface
546 | | ... | to create a chain accross DUT node.
547 | |
548 | | ... | *Arguments:*
549 | | ... | - dut - DUT node. Type: dictionary
550 | | ... | - nf_chain - NF chain. Type: integer
551 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
552 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
553 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
554 | |
555 | | ... | *Note:*
556 | | ... | Socket paths for Memif are defined in following format:
557 | | ... | - /tmp/memif-\${dut}_CNF\${nf_id}-\${sid}
558 | |
559 | | ... | *Example:*
560 | |
561 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
562 | | ... | \| ${dut} \| 1 \| 1 \|
563 | |
564 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
565 | | ... | ${auto_scale}=${True}
566 | |
567 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
568 | | ... | Set Variable | ${rxq_count_int}
569 | | ... | ELSE | Set Variable | ${1}
570 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
571 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
572 | | Add interface to bridge domain
573 | | ... | ${nodes['${dut}']} | ${${dut}_${int}1_${nf_chain}}[0]
574 | | ... | ${bd_id1}
575 | | Add interface to bridge domain
576 | | ... | ${nodes['${dut}']} | ${${dut}_${int}2_${nf_chain}}[0]
577 | | ... | ${bd_id2}
578 | | FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
579 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
580 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
581 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
582 | | | ${bd_id1}= | Evaluate | ${nf_id} + (${nf_chain} - 1)
583 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
584 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
585 | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
586 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
587 | | | Add interface to bridge domain
588 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if1} | ${bd_id1}
589 | | | Add interface to bridge domain
590 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
591 | | END
592
593 | Initialize L2 Bridge Domain with memif pairs
594 | | [Documentation]
595 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
596 | | ... | Memif interface to separate L2 bridge domain with one physical or
597 | | ... | virtual interface to create a chain accross DUT node.
598 | |
599 | | ... | This keyword does not wait for memifs to go up.
600 | | ... | Use the "for multiple chains" keyword for that functionality.
601 | |
602 | | ... | *Arguments:*
603 | | ... | - nf_chain - NF chain. Type: integer
604 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
605 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
606 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
607 | |
608 | | ... | *Example:*
609 | |
610 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| 1 \| 1 \|
611 | |
612 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
613 | |
614 | | FOR | ${dut} | IN | @{duts}
615 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
616 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
617 | | | ... | auto_scale=${auto_scale}
618 | | END
619
620 | Initialize L2 Bridge Domain for multiple chains with memif pairs
621 | | [Documentation]
622 | | ... | Create pairs of Memif interfaces for defined number of NF chains
623 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
624 | | ... | Memif interface into L2 bridge domains with learning enabled
625 | | ... | with physical inteface or Memif interface of another NF.
626 | |
627 | | ... | *Arguments:*
628 | | ... | - nf_chains - Number of chains of NFs. Type: integer
629 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
630 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
631 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
632 | |
633 | | ... | *Example:*
634 | |
635 | | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
636 | | ... | \| 1 \| 1 \|
637 | |
638 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
639 | |
640 | | FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
641 | | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
642 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
643 | | END
644 | | Set interfaces in path up
645 | | Show Memif on all DUTs | ${nodes}
646 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
647
648 | Initialize L2 Bridge Domain for pipeline with memif pairs
649 | | [Documentation]
650 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
651 | | ... | Memif interface to separate L2 bridge domain with one physical or
652 | | ... | virtual interface to create a service pipeline on DUT node.
653 | |
654 | | ... | *Arguments:*
655 | | ... | - nf_chain - NF pipe. Type: integer
656 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
657 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
658 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
659 | |
660 | | ... | *Example:*
661 | |
662 | | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
663 | | ... | \| 1 \| 1 \|
664 | |
665 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
666 | |
667 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
668 | | ... | Set Variable | ${rxq_count_int}
669 | | ... | ELSE | Set Variable | ${1}
670 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
671 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
672 | | FOR | ${dut} | IN | @{duts}
673 | | | Add interface to bridge domain
674 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}1_${nf_chain}}[0]
675 | | | ... | ${bd_id1}
676 | | | Add interface to bridge domain
677 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}2_${nf_chain}}[0]
678 | | | ... | ${bd_id2}
679 | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
680 | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
681 | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
682 | | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
683 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
684 | | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
685 | | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
686 | | | ... | rxq=${rxq} | txq=${rxq}
687 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
688 | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
689 | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
690 | | | ... | rxq=${rxq} | txq=${rxq}
691 | | | Add interface to bridge domain
692 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_frst}-if1} | ${bd_id1}
693 | | | Add interface to bridge domain
694 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_last}-if2} | ${bd_id2}
695 | | END
696
697 | Initialize L2 Bridge Domain for multiple pipelines with memif pairs
698 | | [Documentation]
699 | | ... | Create pairs of Memif interfaces for defined number of NF pipelines
700 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
701 | | ... | Memif interface into L2 bridge domains with learning enabled
702 | | ... | with physical inteface or Memif interface of another NF.
703 | |
704 | | ... | *Arguments:*
705 | | ... | - nf_chains - Number of pipelines of NFs. Type: integer
706 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
707 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
708 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
709 | |
710 | | ... | *Example:*
711 | |
712 | | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
713 | | ... | pairs \| 1 \| 1 \|
714 | |
715 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
716 | |
717 | | FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
718 | | | Initialize L2 Bridge Domain for pipeline with memif pairs
719 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
720 | | | ... | auto_scale=${auto_scale}
721 | | END
722 | | Set interfaces in path up
723 | | Show Memif on all DUTs | ${nodes}
724 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
725
726 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
727 | | [Documentation]
728 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
729 | | ... | Memif interface to separate L2 bridge domain with one physical or
730 | | ... | virtual interface to create a chain accross DUT node. In case of
731 | | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
732 | | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
733 | | ... | interfaces are brought up.
734 | |
735 | | ... | *Arguments:*
736 | | ... | - bd_id1 - Bridge domain ID. Type: integer
737 | | ... | - bd_id2 - Bridge domain ID. Type: integer
738 | | ... | - subid - ID of the sub-interface to be created. Type: string
739 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
740 | |
741 | | ... | *Example:*
742 | |
743 | | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
744 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
745 | |
746 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
747 | |
748 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
749 | | ... | Variable Should Exist | ${dut2}
750 | |
751 | | Set interfaces in path up
752 | |
753 | | Run Keyword If | '${dut2_status}' == 'PASS'
754 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
755 | | ... | ${dut1} | ${DUT1_${int}2}[0]
756 | | ... | ${dut2} | ${DUT2_${int}1}[0] | SUB_ID=${subid}
757 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
758 | | ... | ${dut1} | ${DUT1_${int}2}[0] | SUB_ID=${subid}
759 | | Run Keyword If | '${dut2_status}' == 'PASS'
760 | | ... | Configure L2 tag rewrite method on interfaces
761 | | ... | ${dut1} | ${subif_index_1}
762 | | ... | ${dut2} | ${subif_index_2} | TAG_REWRITE_METHOD=${tag_rewrite}
763 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
764 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
765 | |
766 | | ${number}= | Set Variable | ${1}
767 | | ${sock1}= | Set Variable | memif-DUT1_CNF
768 | | ${sock2}= | Set Variable | memif-DUT1_CNF
769 | | ${memif_if1_name}= | Set Variable | DUT1-memif-${number}-if1
770 | | ${memif_if2_name}= | Set Variable | DUT1-memif-${number}-if2
771 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock2}
772 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
773 | | ... | ${rxq_count_int}
774 | | Add interface to bridge domain
775 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${bd_id1}
776 | | Add interface to bridge domain
777 | | ... | ${dut1} | ${${memif_if1_name}} | ${bd_id1}
778 | | Add interface to bridge domain
779 | | ... | ${dut1} | ${${memif_if2_name}} | ${bd_id2}
780 | | Add interface to bridge domain
781 | | ... | ${dut1} | ${subif_index_1} | ${bd_id2}
782 | | ${sock1}= | Run Keyword If | '${dut2_status}' == 'PASS'
783 | | ... | Set Variable | memif-DUT2_CNF
784 | | ${sock2}= | Run Keyword If | '${dut2_status}' == 'PASS'
785 | | ... | Set Variable | memif-DUT2_CNF
786 | | ${memif_if1_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
787 | | ... | Set Variable | DUT2-memif-${number}-if1
788 | | ${memif_if2_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
789 | | ... | Set Variable | DUT2-memif-${number}-if2
790 | | Run Keyword If | '${dut2_status}' == 'PASS'
791 | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock1} | ${sock2}
792 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
793 | | ... | ${rxq_count_int}
794 | | Run Keyword If | '${dut2_status}' == 'PASS'
795 | | ... | Add interface to bridge domain
796 | | ... | ${dut2} | ${subif_index_2} | ${bd_id1}
797 | | Run Keyword If | '${dut2_status}' == 'PASS'
798 | | ... | Add interface to bridge domain
799 | | ... | ${dut2} | ${${memif_if1_name}} | ${bd_id1}
800 | | Run Keyword If | '${dut2_status}' == 'PASS'
801 | | ... | Add interface to bridge domain
802 | | ... | ${dut2} | ${${memif_if2_name}} | ${bd_id2}
803 | | Run Keyword If | '${dut2_status}' == 'PASS'
804 | | ... | Add interface to bridge domain
805 | | ... | ${dut2} | ${DUT2_${int}2}[0] | ${bd_id2}
806 | |
807 | | Set interfaces in path up
808 | | Show Memif on all DUTs | ${nodes}
809 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
810
811 | Initialize L2 Bridge Domain for single memif
812 | | [Documentation]
813 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
814 | | ... | interface to separate L2 bridge domain with one physical interface.
815 | |
816 | | ... | *Arguments:*
817 | | ... | - number - Memif ID. Type: integer
818 | |
819 | | ... | *Note:*
820 | | ... | Socket paths for Memif are defined in following format:
821 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
822 | |
823 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
824 | | ... | and rxqueues to all DUTs
825 | |
826 | | ... | *Example:*
827 | |
828 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
829 | |
830 | | [Arguments] | ${number}=${1}
831 | |
832 | | FOR | ${dut} | IN | @{duts}
833 | | | ${sock}= | Set Variable | memif-${dut}_CNF
834 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
835 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
836 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
837 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
838 | | | Add interface to bridge domain
839 | | | ... | ${nodes['${dut}']} | ${${dut}_${int}1}[]0 | ${number}
840 | | | Add interface to bridge domain | ${nodes['${dut}']}
841 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
842 | | END
843 | | Set single interfaces in path up
844 | | Show Memif on all DUTs | ${nodes}
845
846 | Initialize L2 bridge domain with MACIP ACLs in circular topology
847 | | [Documentation]
848 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
849 | | ... | domain that is created automatically with index 1. Learning is
850 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
851 | | ... | DUT1 interfaces.
852 | |
853 | | Set interfaces in path up
854 | |
855 | | VPP Add L2 Bridge Domain
856 | | ... | ${dut1} | ${1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
857 | | Configure MACIP ACLs
858 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
859 | |
860 | | Run Keyword If | ${duts_count} == 2
861 | | ... | Configure L2XC | ${dut2} | ${DUT2_${int}1}[0] | ${DUT2_${int}2}[0]
862
863 | Initialize L2 bridge domain with IPv4 ACLs in circular topology
864 | | [Documentation]
865 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
866 | | ... | domain that is created automatically with index 1. Learning is
867 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
868 | | ... | interfaces.
869 | |
870 | | Set interfaces in path up
871 | |
872 | | VPP Add L2 Bridge Domain
873 | | ... | ${dut1} | ${1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
874 | | Configure IPv4 ACLs
875 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
876 | |
877 | | Run Keyword If | ${duts_count} == 2
878 | | ... | Configure L2XC | ${dut2} | ${DUT2_${int}1}[0] | ${DUT2_${int}2}[0]