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