Align NF_denisty tests
[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 | | ...
190 | | ... | *Example:*
191 | | ...
192 | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \
193 | | ... | \| 1 \| 1 \|
194 | | ...
195 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
196 | | ...
197 | | Set interfaces in path up
198 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains} + 1
199 | | | Initialize L2 bridge domains with Vhost-User
200 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
201
202 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
203 | | [Documentation]
204 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
205 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
206 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
207 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
208 | | ... | interfaces.
209 | | ...
210 | | Set interfaces in path up
211 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
212 | | ... | 24
213 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
214 | | ... | 24
215 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
216 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
217 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
218 | | ... | 172.16.0.1 | 172.16.0.2
219 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
220 | | ... | 172.16.0.2 | 172.16.0.1
221 | | VPP Add L2 Bridge Domain | ${dut1} | ${1} | ${dut1_if1} | ${dut1s_vxlan}
222 | | Set Interface State | ${dut1} | ${dut1s_vxlan} | up
223 | | VPP Add L2 Bridge Domain | ${dut2} | ${1} | ${dut2_if2} | ${dut2s_vxlan}
224 | | Set Interface State | ${dut2} | ${dut2s_vxlan} | up
225
226 | Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node circular topology
227 | | [Documentation]
228 | | ... | Setup L2 bridge domain topology with VLAN and VXLANoIPv4 by connecting
229 | | ... | pairs of VLAN sub-interface and VXLAN interface to separate L2 bridge
230 | | ... | domain on each DUT. All interfaces are brought up. IPv4 addresses
231 | | ... | with prefix /32 are configured on interfaces between DUTs. VXLAN
232 | | ... | sub-interfaces has same IPv4 address as interfaces.
233 | | ...
234 | | ... | *Arguments:*
235 | | ... | - vxlan_count - VXLAN count. Type: integer
236 | | ...
237 | | ... | *Example:*
238 | | ...
239 | | ... | \| Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node \
240 | | ... | \| circular topology \| ${1} \|
241 | | ...
242 | | [Arguments] | ${vxlan_count}=${1}
243 | | ...
244 | | Set interfaces in path up
245 | | ...
246 | | ${bd_id_start}= | Set Variable | ${1}
247 | | ${vni_start} = | Set Variable | ${20}
248 | | ...
249 | | ${ip_step} = | Set Variable | ${2}
250 | | ${dut1_ip_start}= | Set Variable | 172.16.0.1
251 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2
252 | | ...
253 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut1}
254 | | ... | node_vxlan_if=${dut1_if2} | node_vlan_if=${dut1_if1}
255 | | ... | op_node=${dut2} | op_node_if=${dut2_if1} | n_tunnels=${vxlan_count}
256 | | ... | vni_start=${vni_start} | src_ip_start=${dut1_ip_start}
257 | | ... | dst_ip_start=${dut2_ip_start} | ip_step=${ip_step}
258 | | ... | bd_id_start=${bd_id_start}
259 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut2}
260 | | ... | node_vxlan_if=${dut2_if1} | node_vlan_if=${dut2_if2}
261 | | ... | op_node=${dut1} | op_node_if=${dut1_if2} | n_tunnels=${vxlan_count}
262 | | ... | vni_start=${vni_start} | src_ip_start=${dut2_ip_start}
263 | | ... | dst_ip_start=${dut1_ip_start} | ip_step=${ip_step}
264 | | ... | bd_id_start=${bd_id_start}
265
266 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
267 | | [Documentation]
268 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
269 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
270 | | ... | with physical inteface.
271 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
272 | | ... | interfaces on each DUT. All interfaces are brought up.
273 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
274 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
275 | | ...
276 | | ... | *Arguments:*
277 | | ... | - bd_id1 - Bridge domain ID. Type: integer
278 | | ... | - bd_id2 - Bridge domain ID. Type: integer
279 | | ...
280 | | ... | *Example:*
281 | | ...
282 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
283 | | ... | 3-node circular topology \| 1 \| 2 \|
284 | | ...
285 | | [Arguments] | ${bd_id1} | ${bd_id2}
286 | | ...
287 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
288 | | ... | 24
289 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
290 | | ... | 24
291 | | Set interfaces in path up
292 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
293 | | ... | 172.16.0.1 | 172.16.0.2
294 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
295 | | ... | 172.16.0.2 | 172.16.0.1
296 | | Configure vhost interfaces | ${dut1}
297 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
298 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
299 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
300 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
301 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
302 | | Configure vhost interfaces | ${dut2}
303 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
304 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
305 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
306 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
307 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
308
309 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
310 | | [Documentation]
311 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
312 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
313 | | ... | one connected to physical interface, the other to VXLAN.
314 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
315 | | ... | interfaces on the DUT. All interfaces are brought up.
316 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
317 | | ... | DUT and TG.
318 | | ...
319 | | ... | *Arguments:*
320 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
321 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
322 | | ... |                         DUT1. Type: string
323 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
324 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
325 | | ... |                         DUT2. Type: string
326 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
327 | | ... |             forwarded on DUT1. Type: string
328 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
329 | | ... |             forwarded on DUT2. Type: string
330 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
331 | | ... |                 Type: list of dicts, dict params vni, vtep
332 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
333 | | ... |                 Type: list of dicts, dict params vni, vtep
334 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
335 | | ... |                       Type: string
336 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
337 | | ... |                     on DUT1. Type: string
338 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
339 | | ... |                       Type: string
340 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
341 | | ... |                     on DUT2. Type: string
342 | | ...
343 | | ... | *Example:*
344 | | ...
345 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
346 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
347 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
348 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
349 | | ...
350 | | Configure vhost interfaces | ${dut1}
351 | | ... | /var/run/vpp/sock-1-${dut1_bd_id1}
352 | | ... | /var/run/vpp/sock-1-${dut1_bd_id2}
353 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} |
354 | | ... | ${dut1_address} | ${dut1_address_subnet}
355 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} |
356 | | ... | ${dut2_address} | ${dut2_address_subnet}
357 | | ${dut1_bd_id1}= | Set Variable | 1
358 | | ${dut1_bd_id2}= | Set Variable | 2
359 | | ${dut2_bd_id1}= | Set Variable | 1
360 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
361 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
362 | | | ... | ${dut1_address} | ${vxlan.vtep}
363 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
364 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
365 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
366 | | | ... | ${dut2_address} | ${vxlan.vtep}
367 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
368 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
369 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
370 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
371 | | ... | gateway=${dut1_gw} | interface=${dut1_if1}
372 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
373 | | ... | gateway=${dut2_gw} | interface=${dut2_if2}
374 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
375 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
376 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
377 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
378
379 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
380 | | [Documentation]
381 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
382 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
383 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
384 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
385 | | ... | interfaces are brought up.
386 | | ...
387 | | ... | *Arguments:*
388 | | ... | - bd_id1 - Bridge domain ID. Type: integer
389 | | ... | - bd_id2 - Bridge domain ID. Type: integer
390 | | ... | - subid - ID of the sub-interface to be created. Type: string
391 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
392 | | ...
393 | | ... | _NOTE:_ This KW uses following test case variables:
394 | | ... | - dut1 - DUT1 node.
395 | | ... | - dut2 - DUT2 node.
396 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
397 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
398 | | ...
399 | | ... | *Example:*
400 | | ...
401 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
402 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
403 | | ...
404 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
405 | | ...
406 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
407 | | ... | Variable Should Exist | ${dut2}
408 | | ...
409 | | Set interfaces in path up
410 | | ...
411 | | Run Keyword If | '${dut2_status}' == 'PASS'
412 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
413 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
414 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
415 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
416 | | Run Keyword If | '${dut2_status}' == 'PASS'
417 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
418 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
419 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
420 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
421 | | ...
422 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
423 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
424 | | Run Keyword If | '${dut2_status}' == 'PASS'
425 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
426 | | ... | ${bd_id2}
427 | | Run Keyword If | '${dut2_status}' == 'PASS'
428 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2}
429 | | ... | ${bd_id2}
430
431 | Initialize L2 bridge domains with Vhost-User and VLAN in circular topology
432 | | [Documentation]
433 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
434 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
435 | | ... | with physical inteface. In case of 3-node topology create VLAN
436 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
437 | | ... | sub-interface on dut1-if2 interface. All interfaces are brought up.
438 | | ...
439 | | ... | *Arguments:*
440 | | ... | - bd_id1 - Bridge domain ID. Type: integer
441 | | ... | - bd_id2 - Bridge domain ID. Type: integer
442 | | ... | - subid - ID of the sub-interface to be created. Type: string
443 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
444 | | ...
445 | | ... | *Example:*
446 | | ...
447 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in circular\
448 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
449 | | ...
450 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
451 | | ...
452 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
453 | | ... | Variable Should Exist | ${dut2}
454 | | ...
455 | | Set interfaces in path up
456 | | ...
457 | | Run Keyword If | '${dut2_status}' == 'PASS'
458 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
459 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
460 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
461 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
462 | | Run Keyword If | '${dut2_status}' == 'PASS'
463 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
464 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
465 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
466 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
467 | | ...
468 | | Configure vhost interfaces | ${dut1}
469 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
470 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
471 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
472 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
473 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
474 | | Run Keyword If | '${dut2_status}' == 'PASS'
475 | | ... | Configure vhost interfaces | ${dut2}
476 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
477 | | Run Keyword If | '${dut2_status}' == 'PASS'
478 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
479 | | ... | ${bd_id1}
480 | | Run Keyword If | '${dut2_status}' == 'PASS'
481 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
482 | | Run Keyword If | '${dut2_status}' == 'PASS'
483 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
484 | | Run Keyword If | '${dut2_status}' == 'PASS'
485 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
486
487 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
488 | | [Documentation]
489 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
490 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
491 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
492 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
493 | | ... | interface into L2 bridge domains with learning enabled with physical
494 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
495 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
496 | | ... | are brought up.
497 | | ...
498 | | ... | *Arguments:*
499 | | ... | - bd_id1 - Bridge domain ID. Type: integer
500 | | ... | - bd_id2 - Bridge domain ID. Type: integer
501 | | ... | - subid - ID of the sub-interface to be created. Type: string
502 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
503 | | ... | - bond_mode - Link bonding mode. Type: string
504 | | ... | - lb_mode - Load balance mode. Type: string
505 | | ...
506 | | ... | *Example:*
507 | | ...
508 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
509 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \
510 | | ... | \| 10 \| pop-1 \| xor \| l34 \|
511 | | ...
512 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
513 | | ... | ${bond_mode} | ${lb_mode}
514 | | ...
515 | | Set interfaces in path up
516 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
517 | | ... | ${lb_mode}
518 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
519 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
520 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
521 | | ... | Variable Should Exist | ${dut1_if2}
522 | | Run Keyword If | '${if2_status}' == 'PASS'
523 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
524 | | ... | ${dut1_eth_bond_if1}
525 | | ... | ELSE
526 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
527 | | ... | ${dut1_eth_bond_if1}
528 | | Run Keyword Unless | '${if2_status}' == 'PASS'
529 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
530 | | ... | ${dut1_eth_bond_if1}
531 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
532 | | ... | ${lb_mode}
533 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
534 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
535 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
536 | | ... | Variable Should Exist | ${dut2_if1}
537 | | Run Keyword If | '${if1_status}' == 'PASS'
538 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
539 | | ... | ${dut2_eth_bond_if1}
540 | | ... | ELSE
541 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
542 | | ... | ${dut2_eth_bond_if1}
543 | | Run Keyword Unless | '${if2_status}' == 'PASS'
544 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
545 | | ... | ${dut2_eth_bond_if1}
546 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
547 | | Initialize VLAN dot1q sub-interfaces in circular topology
548 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
549 | | ... | ${subid}
550 | | Configure L2 tag rewrite method on interfaces
551 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
552 | | ... | ${tag_rewrite}
553 | | Configure vhost interfaces | ${dut1}
554 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
555 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
556 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
557 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
558 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
559 | | Configure vhost interfaces | ${dut2}
560 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
561 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
562 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
563 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
564 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
565
566 | Initialize L2 Bridge Domain with memif pairs on DUT node
567 | | [Documentation]
568 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
569 | | ... | to separate L2 bridge domain with one physical or memif interface
570 | | ... | to create a chain accross DUT node.
571 | | ...
572 | | ... | *Arguments:*
573 | | ... | - dut - DUT node. Type: dictionary
574 | | ... | - nf_chain - NF chain. Type: integer
575 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
576 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
577 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
578 | | ...
579 | | ... | *Note:*
580 | | ... | Socket paths for Memif are defined in following format:
581 | | ... | - /tmp/memif-\${dut}_CNF\${nf_id}-\${sid}
582 | | ...
583 | | ... | *Example:*
584 | | ...
585 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
586 | | ... | \| ${dut} \| 1 \| 1 \|
587 | | ...
588 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
589 | | ... | ${auto_scale}=${True}
590 | | ...
591 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
592 | | ... | Set Variable | ${rxq_count_int}
593 | | ... | ELSE | Set Variable | ${1}
594 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
595 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
596 | | ${dut_str}= | Convert To Lowercase | ${dut}
597 | | Add interface to bridge domain
598 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
599 | | ... | ${bd_id1}
600 | | Add interface to bridge domain
601 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
602 | | ... | ${bd_id2}
603 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
604 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
605 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
606 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
607 | | | ${bd_id1}= | Evaluate | ${nf_id} + (${nf_chain} - 1)
608 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
609 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
610 | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
611 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
612 | | | Add interface to bridge domain
613 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if1} | ${bd_id1}
614 | | | Add interface to bridge domain
615 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
616
617 | Initialize L2 Bridge Domain with memif pairs
618 | | [Documentation]
619 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
620 | | ... | Memif interface to separate L2 bridge domain with one physical or
621 | | ... | virtual interface to create a chain accross DUT node.
622 | | ...
623 | | ... | *Arguments:*
624 | | ... | - nf_chain - NF chain. Type: integer
625 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
626 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
627 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
628 | | ...
629 | | ... | *Example:*
630 | | ...
631 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| 1 \| 1 \|
632 | | ...
633 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
634 | | ...
635 | | :FOR | ${dut} | IN | @{duts}
636 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
637 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
638 | | | ... | auto_scale=${auto_scale}
639
640 | Initialize L2 Bridge Domain for multiple chains with memif pairs
641 | | [Documentation]
642 | | ... | Create pairs of Memif interfaces for defined number of NF chains
643 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
644 | | ... | Memif interface into L2 bridge domains with learning enabled
645 | | ... | with physical inteface or Memif interface of another NF.
646 | | ...
647 | | ... | *Arguments:*
648 | | ... | - nf_chains - Number of chains of NFs. Type: integer
649 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
650 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
651 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
652 | | ...
653 | | ... | *Example:*
654 | | ...
655 | | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
656 | | ... | \| 1 \| 1 \|
657 | | ...
658 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
659 | | ...
660 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
661 | | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
662 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
663 | | Set interfaces in path up
664 | | Show Memif on all DUTs | ${nodes}
665 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
666
667 | Initialize L2 Bridge Domain for pipeline with memif pairs
668 | | [Documentation]
669 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
670 | | ... | Memif interface to separate L2 bridge domain with one physical or
671 | | ... | virtual interface to create a service pipeline on DUT node.
672 | | ...
673 | | ... | *Arguments:*
674 | | ... | - nf_chain - NF pipe. Type: integer
675 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
676 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
677 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
678 | | ...
679 | | ... | *Example:*
680 | | ...
681 | | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
682 | | ... | \| 1 \| 1 \|
683 | | ...
684 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
685 | | ...
686 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
687 | | ... | Set Variable | ${rxq_count_int}
688 | | ... | ELSE | Set Variable | ${1}
689 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
690 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
691 | | :FOR | ${dut} | IN | @{duts}
692 | | | ${dut_str}= | Convert To Lowercase | ${dut}
693 | | | Add interface to bridge domain
694 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
695 | | | ... | ${bd_id1}
696 | | | Add interface to bridge domain
697 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
698 | | | ... | ${bd_id2}
699 | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
700 | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
701 | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
702 | | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
703 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
704 | | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
705 | | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
706 | | | ... | rxq=${rxq} | txq=${rxq}
707 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
708 | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
709 | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
710 | | | ... | rxq=${rxq} | txq=${rxq}
711 | | | Add interface to bridge domain
712 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_frst}-if1} | ${bd_id1}
713 | | | Add interface to bridge domain
714 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_last}-if2} | ${bd_id2}
715
716 | Initialize L2 Bridge Domain for multiple pipelines with memif pairs
717 | | [Documentation]
718 | | ... | Create pairs of Memif interfaces for defined number of NF pipelines
719 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
720 | | ... | Memif interface into L2 bridge domains with learning enabled
721 | | ... | with physical inteface or Memif interface of another NF.
722 | | ...
723 | | ... | *Arguments:*
724 | | ... | - nf_chains - Number of pipelines of NFs. Type: integer
725 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
726 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
727 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
728 | | ...
729 | | ... | *Example:*
730 | | ...
731 | | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
732 | | ... | pairs \| 1 \| 1 \|
733 | | ...
734 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
735 | | ...
736 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
737 | | | Initialize L2 Bridge Domain for pipeline with memif pairs
738 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
739 | | | ... | auto_scale=${auto_scale}
740 | | Set interfaces in path up
741 | | Show Memif on all DUTs | ${nodes}
742 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
743
744 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
745 | | [Documentation]
746 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
747 | | ... | Memif interface to separate L2 bridge domain with one physical or
748 | | ... | virtual interface to create a chain accross DUT node. In case of
749 | | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
750 | | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
751 | | ... | interfaces are brought up.
752 | | ...
753 | | ... | *Arguments:*
754 | | ... | - bd_id1 - Bridge domain ID. Type: integer
755 | | ... | - bd_id2 - Bridge domain ID. Type: integer
756 | | ... | - subid - ID of the sub-interface to be created. Type: string
757 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
758 | | ...
759 | | ... | *Example:*
760 | | ...
761 | | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
762 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
763 | | ...
764 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
765 | | ...
766 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
767 | | ... | Variable Should Exist | ${dut2}
768 | | ...
769 | | Set interfaces in path up
770 | | ...
771 | | Run Keyword If | '${dut2_status}' == 'PASS'
772 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
773 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
774 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
775 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
776 | | Run Keyword If | '${dut2_status}' == 'PASS'
777 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
778 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
779 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
780 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
781 | | ...
782 | | ${number}= | Set Variable | ${1}
783 | | ${sock1}= | Set Variable | memif-DUT1_CNF
784 | | ${sock2}= | Set Variable | memif-DUT1_CNF
785 | | ${memif_if1_name}= | Set Variable | DUT1-memif-${number}-if1
786 | | ${memif_if2_name}= | Set Variable | DUT1-memif-${number}-if2
787 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock2}
788 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
789 | | ... | ${rxq_count_int}
790 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
791 | | Add interface to bridge domain | ${dut1} | ${${memif_if1_name}} | ${bd_id1}
792 | | Add interface to bridge domain | ${dut1} | ${${memif_if2_name}} | ${bd_id2}
793 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
794 | | ${sock1}= | Run Keyword If | '${dut2_status}' == 'PASS'
795 | | ... | Set Variable | memif-DUT2_CNF
796 | | ${sock2}= | Run Keyword If | '${dut2_status}' == 'PASS'
797 | | ... | Set Variable | memif-DUT2_CNF
798 | | ${memif_if1_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
799 | | ... | Set Variable | DUT2-memif-${number}-if1
800 | | ${memif_if2_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
801 | | ... | Set Variable | DUT2-memif-${number}-if2
802 | | Run Keyword If | '${dut2_status}' == 'PASS'
803 | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock1} | ${sock2}
804 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
805 | | ... | ${rxq_count_int}
806 | | Run Keyword If | '${dut2_status}' == 'PASS'
807 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
808 | | ... | ${bd_id1}
809 | | Run Keyword If | '${dut2_status}' == 'PASS'
810 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if1_name}}
811 | | ... | ${bd_id1}
812 | | Run Keyword If | '${dut2_status}' == 'PASS'
813 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if2_name}}
814 | | ... | ${bd_id2}
815 | | Run Keyword If | '${dut2_status}' == 'PASS'
816 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
817 | | ...
818 | | Show Memif on all DUTs | ${nodes}
819 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
820
821 | Initialize L2 Bridge Domain for single memif
822 | | [Documentation]
823 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
824 | | ... | interface to separate L2 bridge domain with one physical interface.
825 | | ...
826 | | ... | *Arguments:*
827 | | ... | - number - Memif ID. Type: integer
828 | | ...
829 | | ... | *Note:*
830 | | ... | Socket paths for Memif are defined in following format:
831 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
832 | | ...
833 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
834 | | ... | and rxqueues to all DUTs
835 | | ...
836 | | ... | *Example:*
837 | | ...
838 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
839 | | ...
840 | | [Arguments] | ${number}=${1}
841 | | ...
842 | | :FOR | ${dut} | IN | @{duts}
843 | | | ${sock}= | Set Variable | memif-${dut}_CNF
844 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
845 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
846 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
847 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
848 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1}
849 | | | ... | ${number}
850 | | | Add interface to bridge domain | ${nodes['${dut}']}
851 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
852 | | Set single interfaces in path up
853 | | Show Memif on all DUTs | ${nodes}
854
855 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
856 | | [Documentation]
857 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
858 | | ... | domain that is created automatically with index 1. Learning is
859 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
860 | | ... | DUT1 interfaces.
861 | | ...
862 | | Set interfaces in path up
863 | | VPP Add L2 Bridge Domain | ${dut1} | ${1} | ${dut1_if1} | ${dut1_if2}
864 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
865 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
866
867 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
868 | | [Documentation]
869 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
870 | | ... | domain that is created automatically with index 1. Learning is
871 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
872 | | ... | interfaces.
873 | | ...
874 | | Set interfaces in path up
875 | | VPP Add L2 Bridge Domain | ${dut1} | ${1} | ${dut1_if1} | ${dut1_if2}
876 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
877 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}