dc13707d0559b8de64a92af19d6bcb1b63e61168
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
1 # Copyright (c) 2018 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | Collections
16 | Library | String
17 | Library | resources.libraries.python.topology.Topology
18 | Library | resources.libraries.python.NodePath
19 | Library | resources.libraries.python.DpdkUtil
20 | Library | resources.libraries.python.InterfaceUtil
21 | Library | resources.libraries.python.VhostUser
22 | Library | resources.libraries.python.TrafficGenerator
23 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
24 | Library | resources.libraries.python.Classify
25 | Library | resources.libraries.python.IPUtil
26 | Library | resources.libraries.python.L2Util
27 | Resource | resources/libraries/robot/shared/default.robot
28 | Resource | resources/libraries/robot/shared/interfaces.robot
29 | Resource | resources/libraries/robot/shared/counters.robot
30 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
31 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
32 | Resource | resources/libraries/robot/l2/l2_patch.robot
33 | Resource | resources/libraries/robot/ip/ip4.robot
34 | Resource | resources/libraries/robot/ip/ip6.robot
35 | Resource | resources/libraries/robot/vm/qemu.robot
36 | Resource | resources/libraries/robot/l2/tagging.robot
37 | Resource | resources/libraries/robot/overlay/srv6.robot
38 | Documentation | Performance suite keywords - configuration.
39
40 *** Keywords ***
41 | Set interfaces in path up
42 | | [Documentation]
43 | | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set
44 | | ... | maximal MTU.*
45 | | ...
46 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
47 # software interfaces. Run KW at the start phase of VPP setup to split
48 # from other "functional" configuration. This will allow modularity of this
49 # library
50 | | ${duts}= | Get Matches | ${nodes} | DUT*
51 | | :FOR | ${dut} | IN | @{duts}
52 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
53 | | | ... | Variable Should Exist | ${${dut}_if1}
54 | | | Run Keyword If | '${if1_status}' == 'PASS'
55 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
56 | | | ... | ELSE
57 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
58 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
59 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
60 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
61 | | | ... | Variable Should Exist | ${${dut}_if2}
62 | | | Run Keyword If | '${if2_status}' == 'PASS'
63 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up
64 | | | ... | ELSE
65 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up
66 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
67 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up
68 | | All VPP Interfaces Ready Wait | ${nodes}
69 | | ${duts}= | Get Matches | ${nodes} | DUT*
70 | | :FOR | ${dut} | IN | @{duts}
71 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
72 | | | ... | Variable Should Exist | ${${dut}_if1}
73 | | | Run Keyword If | '${if1_status}' == 'PASS'
74 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
75 | | | ... | ELSE
76 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
77 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
78 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
79 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
80 | | | ... | Variable Should Exist | ${${dut}_if2}
81 | | | Run Keyword If | '${if2_status}' == 'PASS'
82 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2}
83 | | | ... | ELSE
84 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1}
85 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
86 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2}
87 | | All VPP Interfaces Ready Wait | ${nodes}
88
89 | Set single interfaces in path up
90 | | [Documentation]
91 | | ... | *Set UP state on single VPP interfaces in path on all DUT nodes and set
92 | | ... | maximal MTU.*
93 | | ...
94 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
95 # software interfaces. Run KW at the start phase of VPP setup to split
96 # from other "functional" configuration. This will allow modularity of this
97 # library
98 | | ${duts}= | Get Matches | ${nodes} | DUT*
99 | | :FOR | ${dut} | IN | @{duts}
100 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
101 | | | ... | Variable Should Exist | ${${dut}_if1}
102 | | | Run Keyword If | '${if1_status}' == 'PASS'
103 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
104 | | | ... | ELSE
105 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
106 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
107 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
108 | | All VPP Interfaces Ready Wait | ${nodes}
109 | | ${duts}= | Get Matches | ${nodes} | DUT*
110 | | :FOR | ${dut} | IN | @{duts}
111 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
112 | | | ... | Variable Should Exist | ${${dut}_if1}
113 | | | Run Keyword If | '${if1_status}' == 'PASS'
114 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
115 | | | ... | ELSE
116 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
117 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
118 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
119 | | All VPP Interfaces Ready Wait | ${nodes}
120
121 | Initialize AVF interfaces
122 | | [Documentation]
123 | | ... | Initialize AVF interfaces on each DUT. Interfaces are brought up.
124 | | ...
125 | | ${duts}= | Get Matches | ${nodes} | DUT*
126 | | :FOR | ${dut} | IN | @{duts}
127 | | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']}
128 | | | ... | ${${dut}_if1_vf0}
129 | | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']}
130 | | | ... | ${${dut}_if2_vf0}
131 | | | ${dut_eth_vf_if1}= | VPP Create AVF Interface | ${nodes['${dut}']}
132 | | | ... | ${if1_pci}
133 | | | ${dut_eth_vf_if2}= | VPP Create AVF Interface | ${nodes['${dut}']}
134 | | | ... | ${if2_pci}
135 | | | Set Test Variable | ${${dut}_if1} | ${dut_eth_vf_if1}
136 | | | Set Test Variable | ${${dut}_if2} | ${dut_eth_vf_if2}
137 | | Set interfaces in path up
138
139 | Initialize IPSec in 3-node circular topology
140 | | [Documentation]
141 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
142 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
143 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG and
144 | | ... | DUT1-DUT2 links. Set routing for encrypted traffic on both DUT nodes
145 | | ... | with prefix /8 and next hop of neighbour DUT or TG interface IPv4
146 | | ... | address.
147 | | ...
148 | | Set interfaces in path up
149 | | VPP Show Crypto Device Mapping | ${dut1}
150 | | VPP Show Crypto Device Mapping | ${dut2}
151 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
152 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
153 | | ${dut1_if1_mac}= | Get Interface MAC | ${dut1} | ${dut1_if1}
154 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
155 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
156 | | ${dut2_if2_mac}= | Get Interface MAC | ${dut2} | ${dut2_if2}
157 | | Set Test Variable | ${tg_if1_mac}
158 | | Set Test Variable | ${tg_if2_mac}
159 | | Set Test Variable | ${dut1_if1_mac}
160 | | Set Test Variable | ${dut1_if2_mac}
161 | | Set Test Variable | ${dut2_if1_mac}
162 | | Set Test Variable | ${dut2_if2_mac}
163 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
164 | | ... | ${dut1_if1_ip4} | 24
165 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
166 | | ... | ${dut1_if2_ip4} | 24
167 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
168 | | ... | ${dut2_if1_ip4} | 24
169 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
170 | | ... | ${dut2_if2_ip4} | 24
171 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
172 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_if1_ip4} | ${dut2_if1_mac}
173 | | Add arp on dut | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
174 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_if2_ip4} | ${dut1_if2_mac}
175 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | ${tg_if1_ip4} | ${dut1_if1}
176 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | ${tg_if2_ip4} | ${dut2_if2}
177
178 | Initialize IPv4 forwarding in circular topology
179 | | [Documentation]
180 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
181 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
182 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
183 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
184 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
185 | | ... | and next hop of neighbour DUT interface IPv4 address.
186 | | ...
187 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
188 | | ... | Variable Should Exist | ${dut2}
189 | | ...
190 | | Set interfaces in path up
191 | | ...
192 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
193 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
194 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
195 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
196 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
197 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
198 | | ...
199 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
200 | | Run Keyword If | '${dut2_status}' == 'PASS'
201 | | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
202 | | Run Keyword If | '${dut2_status}' == 'PASS'
203 | | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
204 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
205 | | ... | Set Variable | ${dut2}
206 | | ... | ELSE | Set Variable | ${dut1}
207 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
208 | | ... | Set Variable | ${dut2_if2}
209 | | ... | ELSE | Set Variable | ${dut1_if2}
210 | | Add arp on dut | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg1_if2_mac}
211 | | ...
212 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
213 | | ... | 10.10.10.1 | 24
214 | | Run Keyword If | '${dut2_status}' == 'PASS'
215 | | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
216 | | ... | 1.1.1.1 | 30
217 | | Run Keyword If | '${dut2_status}' == 'PASS'
218 | | ... | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
219 | | ... | 1.1.1.2 | 30
220 | | Configure IP addresses on interfaces | ${dut} | ${dut_if2}
221 | | ... | 20.20.20.1 | 24
222 | | ...
223 | | Run Keyword If | '${dut2_status}' == 'PASS'
224 | | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
225 | | Run Keyword If | '${dut2_status}' == 'PASS'
226 | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
227
228 | Initialize IPv4 forwarding with scaling in circular topology
229 | | [Documentation]
230 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
231 | | ... | DUT nodes in 2-node / 3-node circular topology
232 | | ...
233 | | ... | *Arguments:*
234 | | ... | - count - IP route count. Type: integer
235 | | ...
236 | | ... | *Return:*
237 | | ... | - No value returned
238 | | ...
239 | | ... | *Example:*
240 | | ...
241 | | ... | \| Initialize IPv4 forwarding with scaling in 3-node circular \
242 | | ... | topology \| 100000 \|
243 | | ...
244 | | [Arguments] | ${count}
245 | | ...
246 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
247 | | ... | Variable Should Exist | ${dut2}
248 | | ...
249 | | Set interfaces in path up
250 | | ...
251 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
252 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
253 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
254 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
255 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
256 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
257 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
258 | | Run Keyword If | '${dut2_status}' == 'PASS'
259 | | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
260 | | Run Keyword If | '${dut2_status}' == 'PASS'
261 | | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
262 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
263 | | ... | Set Variable | ${dut2}
264 | | ... | ELSE | Set Variable | ${dut1}
265 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
266 | | ... | Set Variable | ${dut2_if2}
267 | | ... | ELSE | Set Variable | ${dut1_if2}
268 | | Add arp on dut | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
269 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
270 | | Run Keyword If | '${dut2_status}' == 'PASS'
271 | | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1
272 | | ... | 30
273 | | Run Keyword If | '${dut2_status}' == 'PASS'
274 | | ... | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2
275 | | ... | 30
276 | | Configure IP addresses on interfaces | ${dut} | ${dut_if2} | 3.3.3.2 | 30
277 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
278 | | ... | count=${count}
279 | | Run Keyword If | '${dut2_status}' == 'PASS'
280 | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
281 | | ... | count=${count}
282 | | Run Keyword If | '${dut2_status}' == 'PASS'
283 | | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
284 | | ... | count=${count}
285 | | Vpp Route Add | ${dut} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut_if2}
286 | | ... | count=${count}
287
288 | Initialize IPv4 forwarding with vhost in 2-node circular topology
289 | | [Documentation]
290 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
291 | | ... | VPP node. Set UP state of all VPP interfaces in path. Create
292 | | ... | vm_count+1 FIB tables on DUT with multipath routing. Assign each
293 | | ... | Virtual interface to FIB table with Physical interface or Virtual
294 | | ... | interface on both nodes. Setup IPv4 addresses with /30 prefix on
295 | | ... | DUT-TG links. Set routing on DUT nodes in all FIB tables with prefix
296 | | ... | /24 and next hop of neighbour IPv4 address. Setup ARP on all VPP
297 | | ... | interfaces.
298 | | ...
299 | | ... | *Arguments:*
300 | | ... | - vm_count - Number of guest VMs. Type: integer
301 | | ...
302 | | ... | *Note:*
303 | | ... | Socket paths for VM are defined in following format:
304 | | ... | - /tmp/sock-${VM_ID}-1
305 | | ... | - /tmp/sock-${VM_ID}-2
306 | | ...
307 | | ... | *Example:*
308 | | ...
309 | | ... | \| IPv4 forwarding with Vhost-User initialized in a 2-node circular\
310 | | ... | topology \| 1 \|
311 | | ...
312 | | [Arguments] | ${vm_count}=${1}
313 | | ...
314 | | Set interfaces in path up
315 | | ${fib_table_1}= | Set Variable | ${101}
316 | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${vm_count}
317 | | Add Fib Table | ${dut1} | ${fib_table_1}
318 | | And Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | vrf=${fib_table_1}
319 | | ... | gateway=1.1.1.2 | interface=${dut1_if1} | multipath=${TRUE}
320 | | Add Fib Table | ${dut1} | ${fib_table_2}
321 | | And Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | vrf=${fib_table_2}
322 | | ... | gateway=2.2.2.2 | interface=${dut1_if2} | multipath=${TRUE}
323 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
324 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
325 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
326 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
327 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
328 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
329 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
330 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${tg1_if2_mac}
331 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
332 | | ... | vrf=${fib_table_1}
333 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
334 | | ... | vrf=${fib_table_2}
335 | | ${ip_base_start}= | Set Variable | ${4}
336 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
337 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
338 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
339 | | | ${fib_table_1}= | Evaluate | ${100}+${number}
340 | | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
341 | | | ${ip_base_vif1}= | Evaluate | ${ip_base_start}+(${number}-1)*2
342 | | | ${ip_base_vif2}= | Evaluate | ${ip_base_vif1}+1
343 | | | ${ip_net_vif1}= | Set Variable
344 | | | ... | ${ip_base_vif1}.${ip_base_vif1}.${ip_base_vif1}
345 | | | ${ip_net_vif2}= | Set Variable
346 | | | ... | ${ip_base_vif2}.${ip_base_vif2}.${ip_base_vif2}
347 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
348 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
349 | | | ... | dut1-vhost-${number}-if2
350 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
351 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
352 | | | Add Fib Table | ${dut1} | ${fib_table_1}
353 | | | And Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | vrf=${fib_table_1}
354 | | | ... | gateway=${ip_net_vif1}.1 | interface=${dut1-vhost-${number}-if1}
355 | | | ... | multipath=${TRUE}
356 | | | Add Fib Table | ${dut1} | ${fib_table_2}
357 | | | And Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | vrf=${fib_table_2}
358 | | | ... | gateway=${ip_net_vif2}.2 | interface=${dut1-vhost-${number}-if2}
359 | | | ... | multipath=${TRUE}
360 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
361 | | | ... | ${fib_table_1}
362 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
363 | | | ... | ${fib_table_2}
364 | | | Configure IP addresses on interfaces
365 | | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
366 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
367 | | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1}
368 | | | ... | ${dut1-vhost-${number}-if1}
369 | | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1}
370 | | | ... | ${dut1-vhost-${number}-if2}
371 | | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
372 | | | ... | ${dut1_vif1_idx}
373 | | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
374 | | | ... | ${dut1_vif2_idx}
375 | | | Set Test Variable | ${dut1-vhost-${number}-if1_mac}
376 | | | ... | ${dut1_vif1_mac}
377 | | | Set Test Variable | ${dut1-vhost-${number}-if2_mac}
378 | | | ... | ${dut1_vif2_mac}
379 | | | ${qemu_id}= | Set Variable If | ${number} < 10 | 0${number}
380 | | | ... | ${number}
381 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if1}
382 | | | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
383 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if2}
384 | | | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
385 | | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
386 | | | ... | ${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
387 | | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
388 | | | ... | ${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
389
390 | Initialize IPv4 forwarding with vhost in 3-node circular topology
391 | | [Documentation]
392 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
393 | | ... | VPP nodes. Set UP state of all VPP interfaces in path. Create
394 | | ... | vm_count+1 FIB tables on each DUT with multipath routing. Assign
395 | | ... | each Virtual interface to FIB table with Physical interface or Virtual
396 | | ... | interface on both nodes. Setup IPv4 addresses with /30 prefix on
397 | | ... | DUT-TG links and /30 prefix on DUT1-DUT2 link. Set routing on all DUT
398 | | ... | nodes in all FIB tables with prefix /24 and next hop of neighbour IPv4
399 | | ... | address. Setup ARP on all VPP interfaces.
400 | | ...
401 | | ... | *Arguments:*
402 | | ... | - vm_count - Number of guest VMs. Type: integer
403 | | ...
404 | | ... | *Note:*
405 | | ... | Socket paths for VM are defined in following format:
406 | | ... | - /tmp/sock-\${VM_ID}-1
407 | | ... | - /tmp/sock-\${VM_ID}-2
408 | | ...
409 | | ... | *Example:*
410 | | ...
411 | | ... | \| IPv4 forwarding with Vhost-User initialized in a 3-node circular\
412 | | ... | topology \| 1 \|
413 | | ...
414 | | [Arguments] | ${vm_count}=${1}
415 | | ...
416 | | Set interfaces in path up
417 | | ${fib_table_1}= | Set Variable | ${101}
418 | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${vm_count}
419 | | Add Fib Table | ${dut1} | ${fib_table_1}
420 | | And Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | vrf=${fib_table_1}
421 | | ... | gateway=1.1.1.2 | interface=${dut1_if1} | multipath=${TRUE}
422 | | Add Fib Table | ${dut1} | ${fib_table_2}
423 | | And Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | vrf=${fib_table_2}
424 | | ... | gateway=2.2.2.2 | interface=${dut1_if2} | multipath=${TRUE}
425 | | Add Fib Table | ${dut2} | ${fib_table_1}
426 | | And Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | vrf=${fib_table_1}
427 | | ... | gateway=2.2.2.1 | interface=${dut2_if1} | multipath=${TRUE}
428 | | Add Fib Table | ${dut2} | ${fib_table_2}
429 | | And Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | vrf=${fib_table_2}
430 | | ... | gateway=3.3.3.2 | interface=${dut2_if2} | multipath=${TRUE}
431 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
432 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
433 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
434 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
435 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
436 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
437 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
438 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
439 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
440 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
441 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
442 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
443 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
444 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
445 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
446 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
447 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
448 | | ... | vrf=${fib_table_1}
449 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
450 | | ... | vrf=${fib_table_2}
451 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
452 | | ... | vrf=${fib_table_1}
453 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
454 | | ... | vrf=${fib_table_2}
455 | | ${ip_base_start}= | Set Variable | ${4}
456 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
457 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
458 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
459 | | | ${fib_table_1}= | Evaluate | ${100}+${number}
460 | | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
461 | | | ${ip_base_vif1}= | Evaluate | ${ip_base_start}+(${number}-1)*2
462 | | | ${ip_base_vif2}= | Evaluate | ${ip_base_vif1}+1
463 | | | ${ip_net_vif1}= | Set Variable
464 | | | ... | ${ip_base_vif1}.${ip_base_vif1}.${ip_base_vif1}
465 | | | ${ip_net_vif2}= | Set Variable
466 | | | ... | ${ip_base_vif2}.${ip_base_vif2}.${ip_base_vif2}
467 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
468 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
469 | | | ... | dut1-vhost-${number}-if2
470 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
471 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
472 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
473 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
474 | | | ... | dut2-vhost-${number}-if2
475 | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if1} | up
476 | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if2} | up
477 | | | Add Fib Table | ${dut1} | ${fib_table_1}
478 | | | And Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | vrf=${fib_table_1}
479 | | | ... | gateway=${ip_net_vif1}.1 | interface=${dut1-vhost-${number}-if1}
480 | | | ... | multipath=${TRUE}
481 | | | Add Fib Table | ${dut1} | ${fib_table_2}
482 | | | And Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | vrf=${fib_table_2}
483 | | | ... | gateway=${ip_net_vif2}.2 | interface=${dut1-vhost-${number}-if2}
484 | | | ... | multipath=${TRUE}
485 | | | Add Fib Table | ${dut2} | ${fib_table_1}
486 | | | And Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | vrf=${fib_table_1}
487 | | | ... | gateway=${ip_net_vif1}.1 | interface=${dut2-vhost-${number}-if1}
488 | | | ... | multipath=${TRUE}
489 | | | Add Fib Table | ${dut2} | ${fib_table_2}
490 | | | And Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | vrf=${fib_table_2}
491 | | | ... | gateway=${ip_net_vif2}.2 | interface=${dut2-vhost-${number}-if2}
492 | | | ... | multipath=${TRUE}
493 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
494 | | | ... | ${fib_table_1}
495 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
496 | | | ... | ${fib_table_2}
497 | | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if1}
498 | | | ... | ${fib_table_1}
499 | | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if2}
500 | | | ... | ${fib_table_2}
501 | | | Configure IP addresses on interfaces
502 | | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
503 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
504 | | | ... | ${dut2} | ${dut2-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
505 | | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
506 | | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1}
507 | | | ... | ${dut1-vhost-${number}-if1}
508 | | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1}
509 | | | ... | ${dut1-vhost-${number}-if2}
510 | | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2}
511 | | | ... | ${dut2-vhost-${number}-if1}
512 | | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2}
513 | | | ... | ${dut2-vhost-${number}-if2}
514 | | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
515 | | | ... | ${dut1_vif1_idx}
516 | | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
517 | | | ... | ${dut1_vif2_idx}
518 | | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
519 | | | ... | ${dut2_vif1_idx}
520 | | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
521 | | | ... | ${dut2_vif2_idx}
522 | | | Set Test Variable | ${dut1-vhost-${number}-if1_mac}
523 | | | ... | ${dut1_vif1_mac}
524 | | | Set Test Variable | ${dut1-vhost-${number}-if2_mac}
525 | | | ... | ${dut1_vif2_mac}
526 | | | Set Test Variable | ${dut2-vhost-${number}-if1_mac}
527 | | | ... | ${dut2_vif1_mac}
528 | | | Set Test Variable | ${dut2-vhost-${number}-if2_mac}
529 | | | ... | ${dut2_vif2_mac}
530 | | | ${qemu_id}= | Set Variable If | ${number} < 10 | 0${number}
531 | | | ... | ${number}
532 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if1}
533 | | | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
534 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if2}
535 | | | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
536 | | | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if1}
537 | | | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
538 | | | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if2}
539 | | | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
540 | | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
541 | | | ... | ${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
542 | | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
543 | | | ... | ${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
544 | | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
545 | | | ... | ${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
546 | | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
547 | | | ... | ${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
548
549 | Initialize IPv4 forwarding with VLAN dot1q sub-interfaces in circular topology
550 | | [Documentation]
551 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
552 | | ... | circular topology. In case of 3-node topology create VLAN
553 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
554 | | ... | sub-interface on dut1-if2 interface. Get the interface MAC addresses
555 | | ... | and setup ARPs. Setup IPv4 addresses with /30 prefix on DUT-TG links
556 | | ... | and set routing with prefix /30. In case of 3-node set IPv4 adresses
557 | | ... | with /30 prefix on VLAN and set routing on both DUT nodes with prefix
558 | | ... | /30. Set next hop of neighbour DUT interface IPv4 address. All
559 | | ... | interfaces are brought up.
560 | | ...
561 | | ... | *Arguments:*
562 | | ... | - tg_if1_net - TG interface 1 IP subnet used by traffic generator.
563 | | ... | Type: integer
564 | | ... | - tg_if2_net - TG interface 2 IP subnet used by traffic generator.
565 | | ... | Type: integer
566 | | ... | - subid - ID of the sub-interface to be created. Type: string
567 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
568 | | ...
569 | | ... | _NOTE:_ This KW uses following test case variables:
570 | | ... | - dut1 - DUT1 node.
571 | | ... | - dut2 - DUT2 node.
572 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
573 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
574 | | ...
575 | | ... | *Example:*
576 | | ...
577 | | ... | \| Initialize IPv4 forwarding with VLAN dot1q sub-interfaces\
578 | | ... | in circular topology \| 10.10.10.0 \| 20.20.20.0 \| 10 \| pop-1 \|
579 | | ...
580 | | [Arguments] | ${tg_if1_net} | ${tg_if2_net} | ${subid} | ${tag_rewrite}
581 | | ...
582 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
583 | | ... | Variable Should Exist | ${dut2}
584 | | ...
585 | | Set interfaces in path up
586 | | ...
587 | | Run Keyword If | '${dut2_status}' == 'PASS'
588 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
589 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
590 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
591 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
592 | | Run Keyword If | '${dut2_status}' == 'PASS'
593 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
594 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
595 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
596 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
597 | | ...
598 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
599 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
600 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
601 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
602 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
603 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
604 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
605 | | Run Keyword If | '${dut2_status}' == 'PASS'
606 | | ... | Add arp on dut | ${dut1} | ${subif_index_1} | 2.2.2.2
607 | | ... | ${dut2_if1_mac}
608 | | Run Keyword If | '${dut2_status}' == 'PASS'
609 | | ... | Add arp on dut | ${dut2} | ${subif_index_2} | 2.2.2.1
610 | | ... | ${dut1_if2_mac}
611 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
612 | | ... | Set Variable | ${dut2}
613 | | ... | ELSE | Set Variable | ${dut1}
614 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
615 | | ... | Set Variable | ${dut2_if2}
616 | | ... | ELSE | Set Variable | ${subif_index_1}
617 | | Add arp on dut | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg1_if2_mac}
618 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
619 | | Run Keyword If | '${dut2_status}' == 'PASS'
620 | | ... | Configure IP addresses on interfaces | ${dut1} | ${subif_index_1}
621 | | ... | 2.2.2.1 | 30
622 | | Run Keyword If | '${dut2_status}' == 'PASS'
623 | | ... | Configure IP addresses on interfaces | ${dut2} | ${subif_index_2}
624 | | ... | 2.2.2.2 | 30
625 | | Configure IP addresses on interfaces | ${dut} | ${dut_if2} | 3.3.3.2 | 30
626 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | 30 | 1.1.1.1 | ${dut1_if1}
627 | | Run Keyword If | '${dut2_status}' == 'PASS'
628 | | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | 30 | 2.2.2.2
629 | | ... | ${subif_index_1}
630 | | Run Keyword If | '${dut2_status}' == 'PASS'
631 | | ... | Vpp Route Add | ${dut2} | ${tg_if1_net} | 30 | 2.2.2.1
632 | | ... | ${subif_index_2}
633 | | Vpp Route Add | ${dut} | ${tg_if2_net} | 30 | 3.3.3.1 | ${dut_if2}
634
635 | Initialize IPv4 policer 2r3c-${t} in circular topology
636 | | [Documentation]
637 | | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
638 | | ... | on all DUT nodes in 2-node / 3-node circular topology. Policer is
639 | | ... | applied on links TG - DUTx.
640 | | ...
641 | | ${dscp}= | DSCP AF22
642 | | Policer Set Name | policer1
643 | | Policer Set CIR | ${cir}
644 | | Policer Set EIR | ${eir}
645 | | Policer Set CB | ${cb}
646 | | Policer Set EB | ${eb}
647 | | Policer Set Rate Type pps
648 | | Policer Set Round Type Closest
649 | | Policer Set Type 2R3C 2698
650 | | Policer Set Conform Action Transmit
651 | | Policer Set Exceed Action Mark and Transmit | ${dscp}
652 | | Policer Set Violate Action Transmit
653 | | Policer Enable Color Aware
654 | | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
655 | | Policer Classify Set Precolor Exceed
656 | | Policer Set Node | ${dut1}
657 | | Policer Classify Set Interface | ${dut1_if1}
658 | | Policer Classify Set Match IP | 20.20.20.2 | ${False}
659 | | Policer Set Configuration
660 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
661 | | ... | Variable Should Exist | ${dut2}
662 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
663 | | ... | Set Variable | ${dut2}
664 | | ... | ELSE | Set Variable | ${dut1}
665 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
666 | | ... | Set Variable | ${dut2_if2}
667 | | ... | ELSE | Set Variable | ${dut1_if2}
668 | | Run Keyword Unless | '${dut2_status}' == 'PASS'
669 | | ... | Policer Set Name | policer2
670 | | Policer Set Node | ${dut}
671 | | Policer Classify Set Interface | ${dut_if2}
672 | | Policer Classify Set Match IP | 10.10.10.2 | ${False}
673 | | Policer Set Configuration
674
675 | Initialize IPv6 forwarding in 2-node circular topology
676 | | [Documentation]
677 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node circular
678 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
679 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
680 | | ... | interfaces.
681 | | ...
682 | | Set interfaces in path up
683 | | ${prefix}= | Set Variable | 64
684 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
685 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
686 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
687 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:2::1 | ${prefix}
688 | | Suppress ICMPv6 router advertisement message | ${nodes}
689 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
690 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:2::2 | ${tg1_if2_mac}
691
692 | Initialize IPv6 forwarding in 3-node circular topology
693 | | [Documentation]
694 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
695 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
696 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
697 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
698 | | ... | next hop of neighbour DUT interface IPv6 address.
699 | | ...
700 | | Set interfaces in path up
701 | | ${prefix}= | Set Variable | 64
702 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
703 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
704 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
705 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
706 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
707 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
708 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
709 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
710 | | Suppress ICMPv6 router advertisement message | ${nodes}
711 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
712 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
713 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
714 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
715 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
716 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
717
718 | Initialize IPv6 forwarding with scaling in circular topology
719 | | [Documentation]
720 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
721 | | ... | DUT nodes in 2-node / 3-node circular topology
722 | | ...
723 | | ... | *Arguments:*
724 | | ... | - count - IP route count. Type: integer
725 | | ...
726 | | ... | *Return:*
727 | | ... | - No value returned
728 | | ...
729 | | ... | *Example:*
730 | | ...
731 | | ... | \| Initialize IPv6 forwarding with scaling in circular \
732 | | ... | topology \| 100000 \|
733 | | ...
734 | | [Arguments] | ${count}
735 | | ...
736 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
737 | | ... | Variable Should Exist | ${dut2}
738 | | ...
739 | | Set interfaces in path up
740 | | ...
741 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
742 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
743 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
744 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
745 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
746 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
747 | | ${prefix}= | Set Variable | 64
748 | | ${host_prefix}= | Set Variable | 128
749 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${prefix}
750 | | Run Keyword If | '${dut2_status}' == 'PASS'
751 | | ... | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${prefix}
752 | | Run Keyword If | '${dut2_status}' == 'PASS'
753 | | ... | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${prefix}
754 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
755 | | ... | Set Variable | ${dut2}
756 | | ... | ELSE | Set Variable | ${dut1}
757 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
758 | | ... | Set Variable | ${dut2_if2}
759 | | ... | ELSE | Set Variable | ${dut1_if2}
760 | | VPP Set If IPv6 Addr | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
761 | | Suppress ICMPv6 router advertisement message | ${nodes}
762 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
763 | | Run Keyword If | '${dut2_status}' == 'PASS'
764 | | ... | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
765 | | Run Keyword If | '${dut2_status}' == 'PASS'
766 | | ... | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
767 | | Add Ip Neighbor | ${dut} | ${dut_if2} | 2001:5::2 | ${tg1_if2_mac}
768 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
769 | | ... | interface=${dut1_if1} | count=${count}
770 | | Run Keyword If | '${dut2_status}' == 'PASS'
771 | | ... | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
772 | | ... | interface=${dut1_if2} | count=${count}
773 | | Run Keyword If | '${dut2_status}' == 'PASS'
774 | | ... | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
775 | | ... | interface=${dut2_if1} | count=${count}
776 | | Vpp Route Add | ${dut} | 2001:2::0 | ${host_prefix} | 2001:5::2
777 | | ... | interface=${dut_if2} | count=${count}
778
779 | Initialize IPv6 forwarding with VLAN dot1q sub-interfaces in circular topology
780 | | [Documentation]
781 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
782 | | ... | circular topology. In case of 3-node topology create VLAN
783 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
784 | | ... | sub-interface on dut1-if2 interface. Get the interface MAC addresses
785 | | ... | and setup ARPs. Setup IPv6 addresses with /64 prefix on DUT-TG links
786 | | ... | and set routing with prefix /64. In case of 3-node set IPv6 adresses
787 | | ... | with /64 prefix on VLAN and set routing on both DUT nodes with prefix
788 | | ... | /64. Set next hop of neighbour DUT interface IPv6 address. All
789 | | ... | interfaces are brought up.
790 | | ...
791 | | ... | *Arguments:*
792 | | ... | - tg_if1_net - TG interface 1 IPv6 subnet used by traffic generator.
793 | | ... | Type: integer
794 | | ... | - tg_if2_net - TG interface 2 IPv6 subnet used by traffic generator.
795 | | ... | Type: integer
796 | | ... | - subid - ID of the sub-interface to be created. Type: string
797 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
798 | | ...
799 | | ... | _NOTE:_ This KW uses following test case variables:
800 | | ... | - dut1 - DUT1 node.
801 | | ... | - dut2 - DUT2 node.
802 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
803 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
804 | | ...
805 | | ... | *Example:*
806 | | ...
807 | | ... | \| Initialize IPv6 forwarding with VLAN dot1q sub-interfaces\
808 | | ... | in circular topology \| 2001:1::0 \| 2001:2::0 \| 10 \| pop-1 \|
809 | | ...
810 | | [Arguments] | ${tg_if1_net} | ${tg_if2_net} | ${subid} | ${tag_rewrite}
811 | | ...
812 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
813 | | ... | Variable Should Exist | ${dut2}
814 | | ...
815 | | Set interfaces in path up
816 | | ...
817 | | Run Keyword If | '${dut2_status}' == 'PASS'
818 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
819 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
820 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
821 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
822 | | Run Keyword If | '${dut2_status}' == 'PASS'
823 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
824 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
825 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
826 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
827 | | ...
828 | | ${prefix}= | Set Variable | 64
829 | | ${host_prefix}= | Set Variable | 64
830 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
831 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
832 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
833 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
834 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
835 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
836 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg1_if1_mac}
837 | | Run Keyword If | '${dut2_status}' == 'PASS'
838 | | ... | Add Ip Neighbor | ${dut1} | ${subif_index_1} | 2002:2::2
839 | | ... | ${dut2_if1_mac}
840 | | Run Keyword If | '${dut2_status}' == 'PASS'
841 | | ... | Add Ip Neighbor | ${dut2} | ${subif_index_2} | 2002:2::1
842 | | ... | ${dut1_if2_mac}
843 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
844 | | ... | Set Variable | ${dut2}
845 | | ... | ELSE | Set Variable | ${dut1}
846 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
847 | | ... | Set Variable | ${dut2_if2}
848 | | ... | ELSE | Set Variable | ${subif_index_1}
849 | | Add Ip Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg1_if2_mac}
850 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
851 | | Run Keyword If | '${dut2_status}' == 'PASS'
852 | | ... | VPP Set If IPv6 Addr | ${dut1} | ${subif_index_1} | 2002:2::1
853 | | ... | ${prefix}
854 | | Run Keyword If | '${dut2_status}' == 'PASS'
855 | | ... | VPP Set If IPv6 Addr | ${dut2} | ${subif_index_2} | 2002:2::2
856 | | ... | ${prefix}
857 | | VPP Set If IPv6 Addr | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
858 | | Suppress ICMPv6 router advertisement message | ${nodes}
859 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix} | 2002:1::1
860 | | ... | interface=${dut1_if1}
861 | | Run Keyword If | '${dut2_status}' == 'PASS'
862 | | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | ${host_prefix} | 2002:2::2
863 | | ... | interface=${subif_index_1}
864 | | Run Keyword If | '${dut2_status}' == 'PASS'
865 | | ... | Vpp Route Add | ${dut2} | ${tg_if1_net} | ${host_prefix} | 2002:2::1
866 | | ... | interface=${subif_index_2}
867 | | Vpp Route Add | ${dut} | ${tg_if2_net} | ${host_prefix} | 2002:3::1
868 | | ... | interface=${dut_if2}
869
870 | Initialize IPv6 iAcl whitelist in 3-node circular topology
871 | | [Documentation]
872 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
873 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
874 | | ...
875 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
876 | | ... | ${dut1} | ip6 | dst
877 | | And Vpp Configures Classify Session L3
878 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
879 | | ... | ip6 | dst | 2001:2::2
880 | | And Vpp Enable Input Acl Interface
881 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
882 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
883 | | ... | ${dut2} | ip6 | dst
884 | | And Vpp Configures Classify Session L3
885 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
886 | | ... | ip6 | dst | 2001:1::2
887 | | And Vpp Enable Input Acl Interface
888 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
889
890 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
891 | | [Documentation]
892 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
893 | | ... | topology. Get the interface MAC addresses and setup neighbours on all
894 | | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
895 | | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
896 | | ... | on both DUT nodes.
897 | | ...
898 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
899 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
900 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
901 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
902 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
903 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
904 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
905 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
906 | | Suppress ICMPv6 router advertisement message | ${nodes}
907 | | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
908 | | | ${hexa_nr}= | Convert To Hex | ${number}
909 | | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr}
910 | | | ... | ${tg1_if1_mac}
911 | | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr}
912 | | | ... | ${tg1_if2_mac}
913 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
914 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
915 | | ${sid1}= | Set Variable If
916 | | ... | "${n}" == "1" | ${dut2_sid1}
917 | | ... | "${n}" == "2" | ${dut2_sid1_1}
918 | | ${sid2}= | Set Variable If
919 | | ... | "${n}" == "1" | ${dut1_sid2}
920 | | ... | "${n}" == "2" | ${dut1_sid2_1}
921 | | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | ${dut2_if1_ip6}
922 | | ... | ${dut1_if2}
923 | | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | ${dut1_if2_ip6}
924 | | ... | ${dut2_if1}
925 # Configure SRv6 for direction0
926 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
927 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
928 | | ... | Create List | ${dut2_sid1}
929 | | ... | ELSE IF | "${n}" == "2"
930 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
931 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
932 | | ... | @{sid_list_dir0}
933 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
934 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
935 | | Run Keyword If | "${n}" == "1"
936 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
937 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
938 | | Run Keyword If | "${n}" == "2"
939 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
940 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
941 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
942 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
943 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
944 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
945 | | ... | ${tg_if2_ip6_subnet}2 | ${dut2_if2}
946 # Configure SRv6 for direction1
947 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
948 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
949 | | ... | Create List | ${dut1_sid2}
950 | | ... | ELSE IF | "${n}" == "2"
951 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
952 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
953 | | ... | @{sid_list_dir1}
954 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
955 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
956 | | Run Keyword If | "${n}" == "1"
957 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
958 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
959 | | Run Keyword If | "${n}" == "2"
960 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
961 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
962 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
963 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
964 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
965 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
966 | | ... | ${tg_if1_ip6_subnet}2 | ${dut1_if1}
967 | | Set interfaces in path up
968
969 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
970 | | [Documentation]
971 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
972 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
973 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
974 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
975 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
976 | | ... | routes on both DUT nodes.
977 | | ...
978 | | ... | *Note:*
979 | | ... | KW uses test variable rxq_count_int set by KW Add worker threads
980 | | ... | and rxqueues to all DUTs
981 | | ...
982 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
983 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
984 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
985 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
986 | | ${sock1}= | Set Variable | memif-DUT1_VNF
987 | | ${sock2}= | Set Variable | memif-DUT2_VNF
988 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
989 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int}
990 | | ... | ${rxq_count_int}
991 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
992 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
993 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
994 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
995 | | ... | ${rxq_count_int}
996 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
997 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
998 | | ${duts}= | Get Matches | ${nodes} | DUT*
999 | | :FOR | ${dut} | IN | @{duts}
1000 | | | Show Memif | ${nodes['${dut}']}
1001 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
1002 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
1003 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if1}
1004 | | ... | ${dut1-memif-1-if1_ip6} | ${prefix}
1005 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if2}
1006 | | ... | ${dut1-memif-1-if2_ip6} | ${prefix}
1007 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
1008 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
1009 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if1}
1010 | | ... | ${dut2-memif-1-if1_ip6} | ${prefix}
1011 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if2}
1012 | | ... | ${dut2-memif-1-if2_ip6} | ${prefix}
1013 | | Suppress ICMPv6 router advertisement message | ${nodes}
1014 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
1015 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
1016 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2
1017 | | ... | ${tg1_if1_mac}
1018 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2
1019 | | ... | ${tg1_if2_mac}
1020 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
1021 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
1022 | | Add Ip Neighbor | ${dut1} | ${dut1-memif-1-if1} | ${dut1_nh}
1023 | | ... | ${dut1-memif-1-if2_mac}
1024 | | Add Ip Neighbor | ${dut2} | ${dut2-memif-1-if1} | ${dut2_nh}
1025 | | ... | ${dut2-memif-1-if2_mac}
1026 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix} | ${dut2_if1_ip6}
1027 | | ... | ${dut1_if2}
1028 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
1029 | | ... | ${tg_if1_ip6_subnet}2 | ${dut1_if1}
1030 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix} | ${dut1_if2_ip6}
1031 | | ... | ${dut2_if1}
1032 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
1033 | | ... | ${tg_if2_ip6_subnet}2 | ${dut2_if2}
1034 # Configure SRv6 for direction0 on DUT1
1035 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
1036 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
1037 | | ... | ${out_sid1_2}
1038 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
1039 | | ... | @{sid_list_dir0}
1040 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
1041 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
1042 # Configure SRv6 for direction1 on DUT2
1043 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
1044 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
1045 | | ... | ${out_sid2_2}
1046 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
1047 | | ... | @{sid_list_dir1}
1048 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
1049 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
1050 # Configure SRv6 for direction0 on DUT2
1051 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
1052 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
1053 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
1054 | | Run Keyword If | "${behavior}" == "static_proxy"
1055 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
1056 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
1057 | | ... | ${dut1_sid1} | @{sid_list_dir0}
1058 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
1059 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
1060 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
1061 | | ... | ELSE IF | "${behavior}" == "masquerading"
1062 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
1063 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
1064 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
1065 # Configure SRv6 for direction1 on DUT1
1066 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
1067 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
1068 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
1069 | | Run Keyword If | "${behavior}" == "static_proxy"
1070 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
1071 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
1072 | | ... | ${dut2_sid2} | @{sid_list_dir1}
1073 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
1074 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
1075 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
1076 | | ... | ELSE IF | "${behavior}" == "masquerading"
1077 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
1078 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
1079 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
1080 | | Set interfaces in path up
1081
1082 | Initialize L2 patch
1083 | | [Documentation]
1084 | | ... | Setup L2 patch topology by cross connecting two interfaces on
1085 | | ... | each DUT. Interfaces are brought up.
1086 | | ...
1087 | | Set interfaces in path up
1088 | | ${duts}= | Get Matches | ${nodes} | DUT*
1089 | | :FOR | ${dut} | IN | @{duts}
1090 | | | Configure L2patch | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
1091
1092 | Initialize L2 xconnect in 2-node circular topology
1093 | | [Documentation]
1094 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
1095 | | ... | each DUT. Interfaces are brought up.
1096 | | ...
1097 | | Set interfaces in path up
1098 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
1099
1100 | Initialize L2 xconnect in 3-node circular topology
1101 | | [Documentation]
1102 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
1103 | | ... | each DUT. Interfaces are brought up.
1104 | | ... |
1105 | | Set interfaces in path up
1106 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
1107 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1108
1109 | Initialize L2 xconnect with VXLANoIPv4 in 3-node circular topology
1110 | | [Documentation]
1111 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
1112 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
1113 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
1114 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
1115 | | ... | interfaces.
1116 | | ...
1117 | | Set interfaces in path up
1118 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
1119 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
1120 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1121 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1122 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1123 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1124 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1125 | | ... | 172.16.0.1 | 172.16.0.2
1126 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1127 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1128 | | ... | 172.16.0.2 | 172.16.0.1
1129 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1130
1131 | Initialize L2 xconnect with Vhost-User on node
1132 | | [Documentation]
1133 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
1134 | | ... | defined VPP node. Add each Vhost-User interface into L2 cross-connect
1135 | | ... | with with physical inteface or Vhost-User interface of another VM.
1136 | | ...
1137 | | ... | *Arguments:*
1138 | | ... | - dut - DUT node. Type: string
1139 | | ... | - vm_count - VM count. Type: integer
1140 | | ...
1141 | | ... | *Note:*
1142 | | ... | Socket paths for VM are defined in following format:
1143 | | ... | - /tmp/sock-\${VM_ID}-1
1144 | | ... | - /tmp/sock-\${VM_ID}-2
1145 | | ...
1146 | | ... | *Example:*
1147 | | ...
1148 | | ... | \| Initialize L2 xconnect with Vhost-User on node \| DUT1 \| 1 \|
1149 | | ...
1150 | | [Arguments] | ${dut} | ${vm_count}=${1}
1151 | | ...
1152 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
1153 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1154 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1155 | | | ${prev_index}= | Evaluate | ${number}-1
1156 | | | Configure vhost interfaces for L2BD forwarding | ${nodes['${dut}']}
1157 | | | ... | ${sock1} | ${sock2} | ${dut}-vhost-${number}-if1
1158 | | | ... | ${dut}-vhost-${number}-if2
1159 | | | ${dut_xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
1160 | | | ... | ${${dut}-vhost-${prev_index}-if2}
1161 | | | Configure L2XC | ${nodes['${dut}']} | ${dut_xconnect_if1}
1162 | | | ... | ${${dut}-vhost-${number}-if1}
1163 | | | Run Keyword If | ${number}==${vm_count} | Configure L2XC
1164 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${number}-if2} | ${${dut}_if2}
1165 | | All VPP Interfaces Ready Wait | ${nodes}
1166
1167 | Initialize L2 xconnect with Vhost-User
1168 | | [Documentation]
1169 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
1170 | | ... | all VPP nodes. Add each Vhost-User interface into L2 cross-connect
1171 | | ... | with with physical inteface or Vhost-User interface of another VM.
1172 | | ...
1173 | | ... | *Arguments:*
1174 | | ... | - vm_count - VM count. Type: integer
1175 | | ...
1176 | | ... | *Example:*
1177 | | ...
1178 | | ... | \| Initialize L2 xconnect with Vhost-User \| 1 \|
1179 | | ...
1180 | | [Arguments] | ${vm_count}=${1}
1181 | | ...
1182 | | ${duts}= | Get Matches | ${nodes} | DUT*
1183 | | :FOR | ${dut} | IN | @{duts}
1184 | | | Initialize L2 xconnect with Vhost-User on node | ${dut}
1185 | | | ... | vm_count=${vm_count}
1186
1187 | Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology
1188 | | [Documentation]
1189 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
1190 | | ... | connect each Vhost interface with one physical interface.
1191 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
1192 | | ...
1193 | | ... | *Arguments:*
1194 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1195 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1196 | | ... | - subid - ID of the sub-interface to be created. Type: string
1197 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1198 | | ...
1199 | | ... | *Example:*
1200 | | ...
1201 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
1202 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
1203 | | ...
1204 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
1205 | | ...
1206 | | Set interfaces in path up
1207 | | Initialize VLAN dot1q sub-interfaces in circular topology
1208 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1209 | | Configure L2 tag rewrite method on interfaces
1210 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1211 | | ... | ${tag_rewrite}
1212 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1213 | | ... | ${sock1} | ${sock2}
1214 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
1215 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
1216 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1217 | | ... | ${sock1} | ${sock2}
1218 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
1219 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
1220
1221 | Initialize L2 xconnect with Vhost-User and VLAN with DPDK link bonding in 3-node circular topology
1222 | | [Documentation]
1223 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Setup VLAN
1224 | | ... | on BondEthernet interfaces between DUTs. Cross connect one Vhost
1225 | | ... | interface with physical interface towards TG and other Vhost interface
1226 | | ... | with VLAN sub-interface. All interfaces are brought up.
1227 | | ...
1228 | | ... | *Arguments:*
1229 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1230 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1231 | | ... | - subid - ID of the sub-interface to be created. Type: string
1232 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1233 | | ...
1234 | | ... | *Example:*
1235 | | ...
1236 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with DPDK link\
1237 | | ... | bonding in 3-node circular topology \| /tmp/sock1 \| /tmp/sock2 \
1238 | | ... | \| 10 \| pop-1 \|
1239 | | ...
1240 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
1241 | | ...
1242 | | Set interfaces in path up
1243 | | Add DPDK bonded ethernet interfaces to topology file in 3-node single link topology
1244 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1245 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1246 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1247 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
1248 | | Initialize VLAN dot1q sub-interfaces in circular topology
1249 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1250 | | ... | ${subid}
1251 | | Configure L2 tag rewrite method on interfaces
1252 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1253 | | ... | ${tag_rewrite}
1254 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1255 | | ... | ${sock1} | ${sock2}
1256 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
1257 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
1258 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1259 | | ... | ${sock1} | ${sock2}
1260 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
1261 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
1262 | | All VPP Interfaces Ready Wait | ${nodes}
1263
1264 | Initialize L2 xconnect with Vhost-User and VLAN with VPP link bonding in 3-node circular topology
1265 | | [Documentation]
1266 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
1267 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
1268 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
1269 | | ... | VLAN on BondEthernet interfaces between DUTs. Cross connect one Vhost
1270 | | ... | interface with physical interface towards TG and other Vhost interface
1271 | | ... | with VLAN sub-interface. All interfaces are brought up.
1272 | | ...
1273 | | ... | *Arguments:*
1274 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1275 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1276 | | ... | - subid - ID of the sub-interface to be created. Type: string
1277 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1278 | | ... | - bond_mode - Link bonding mode. Type: string
1279 | | ... | - lb_mode - Load balance mode. Type: string
1280 | | ...
1281 | | ... | *Example:*
1282 | | ...
1283 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with VPP link\
1284 | | ... | bonding in 3-node circular topology \| /tmp/sock1 \| /tmp/sock2 \
1285 | | ... | \| 10 \| pop-1 \| \| xor \| l34 \|
1286 | | ...
1287 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite} | ${bond_mode}
1288 | | ... | ${lb_mode}
1289 | | ...
1290 | | Set interfaces in path up
1291 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
1292 | | ... | ${lb_mode}
1293 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1294 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1295 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
1296 | | ... | Variable Should Exist | ${dut1_if2}
1297 | | Run Keyword If | '${if2_status}' == 'PASS'
1298 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1299 | | ... | ${dut1_eth_bond_if1}
1300 | | ... | ELSE
1301 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
1302 | | ... | ${dut1_eth_bond_if1}
1303 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1304 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
1305 | | ... | ${dut1_eth_bond_if1}
1306 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1307 | | ... | ${lb_mode}
1308 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1309 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1310 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
1311 | | ... | Variable Should Exist | ${dut2_if1}
1312 | | Run Keyword If | '${if1_status}' == 'PASS'
1313 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1314 | | ... | ${dut2_eth_bond_if1}
1315 | | ... | ELSE
1316 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
1317 | | ... | ${dut2_eth_bond_if1}
1318 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1319 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
1320 | | ... | ${dut2_eth_bond_if1}
1321 | | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
1322 | | Initialize VLAN dot1q sub-interfaces in circular topology
1323 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1324 | | ... | ${subid}
1325 | | Configure L2 tag rewrite method on interfaces
1326 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1327 | | ... | ${tag_rewrite}
1328 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1329 | | ... | ${sock1} | ${sock2}
1330 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
1331 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
1332 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1333 | | ... | ${sock1} | ${sock2}
1334 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
1335 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
1336
1337 | Initialize L2 bridge domain in circular topology
1338 | | [Documentation]
1339 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
1340 | | ... | that is created automatically with index 1. Learning is enabled.
1341 | | ... | Interfaces are brought up.
1342 | | ...
1343 | | ... | *Arguments:*
1344 | | ... | - bd_id - Bridge domain ID. Type: integer
1345 | | ...
1346 | | ... | *Example:*
1347 | | ...
1348 | | ... | \| Initialize L2 bridge domain in circular topology \| 1 \|
1349 | | ...
1350 | | [Arguments] | ${bd_id}=${1}
1351 | | ...
1352 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1353 | | ... | Variable Should Exist | ${dut2}
1354 | | ...
1355 | | Set interfaces in path up
1356 | | ...
1357 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
1358 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
1359 | | Run Keyword If | '${dut2_status}' == 'PASS'
1360 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
1361 | | Run Keyword If | '${dut2_status}' == 'PASS'
1362 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
1363
1364 | Configure IPv4 ACLs
1365 | | [Documentation]
1366 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
1367 | | ... | hitting ACEs for both traffic directions.
1368 | | ...
1369 | | ... | *Arguments:*
1370 | | ... | - dut_node - DUT node. Type: dictionary
1371 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
1372 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
1373 | | ...
1374 | | ... | *Example:*
1375 | | ...
1376 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
1377 | | ... | \| GigabitEthernet0/8/0 \|
1378 | | ...
1379 | | ... | _NOTE:_ This KW uses following test case variables:
1380 | | ... | - src_ip_start - Source IP address start. Type: string
1381 | | ... | - dst_ip_start - Destination IP address start. Type: string
1382 | | ... | - ip_step - IP address step. Type: string
1383 | | ... | - sport_start - Source port number start. Type: string
1384 | | ... | - dport_start - Destination port number start. Type: string
1385 | | ... | - port_step - Port number step. Type: string
1386 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
1387 | | ... | Type: integer
1388 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
1389 | | ... | Type: string
1390 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
1391 | | ... | Type: string
1392 | | ... | - trex_stream1_subnet - IP subnet used by T-Rex in direction 0->1.
1393 | | ... | Type: string
1394 | | ... | - trex_stream2_subnet - IP subnet used by T-Rex in direction 1->0.
1395 | | ... | Type: string
1396 | | ...
1397 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
1398 | | ${src_ip_int} = | Evaluate
1399 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
1400 | | ... | modules=ipaddress
1401 | | ${dst_ip_int} = | Evaluate
1402 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
1403 | | ... | modules=ipaddress
1404 | | ${ip_limit} = | Set Variable | 255.255.255.255
1405 | | ${ip_limit_int} = | Evaluate
1406 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
1407 | | ${sport}= | Evaluate | $sport_start - $port_step
1408 | | ${dport}= | Evaluate | $dport_start - $port_step
1409 | | ${port_limit}= | Set Variable | ${65535}
1410 | | ${acl}= | Set Variable | ipv4 permit
1411 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
1412 | | | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
1413 | | | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
1414 | | | ${sport}= | Evaluate | $sport + $port_step
1415 | | | ${dport}= | Evaluate | $dport + $port_step
1416 | | | ${ipv4_limit_reached}= | Set Variable If
1417 | | | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
1418 | | | ... | ${TRUE}
1419 | | | ${udp_limit_reached}= | Set Variable If
1420 | | | ... | $sport > $port_limit or $dport > $port_limit | ${TRUE}
1421 | | | Run Keyword If | $ipv4_limit_reached is True | Log
1422 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
1423 | | | ... | WARN
1424 | | | Run Keyword If | $udp_limit_reached is True | Log
1425 | | | ... | Can't do more iterations - UDP port limit has been reached.
1426 | | | ... | WARN
1427 | | | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
1428 | | | ... | Set Variable | ${ip_limit}
1429 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
1430 | | | ... | modules=ipaddress
1431 | | | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
1432 | | | ... | Set Variable | ${ip_limit}
1433 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
1434 | | | ... | modules=ipaddress
1435 | | | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
1436 | | | ... | ${sport}
1437 | | | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
1438 | | | ... | ${dport}
1439 | | | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
1440 | | | ... | sport ${sport} | dport ${dport},
1441 | | | Exit For Loop If
1442 | | | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
1443 | | ${acl}= | Catenate | ${acl}
1444 | | ... | ipv4 ${acl_action} src ${trex_stream1_subnet},
1445 | | ... | ipv4 ${acl_action} src ${trex_stream2_subnet}
1446 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
1447 | | @{acl_list}= | Create List | ${0}
1448 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
1449 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
1450 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
1451 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
1452 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
1453 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
1454 | | ... | ${acl_list}
1455 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
1456 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
1457 | | ... | ${acl_list}
1458
1459 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
1460 | | [Documentation]
1461 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1462 | | ... | domain that is created automatically with index 1. Learning is
1463 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
1464 | | ... | interfaces.
1465 | | ...
1466 | | ... | *Arguments:*
1467 | | ... | _None_
1468 | | ...
1469 | | ... | *Example:*
1470 | | ...
1471 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
1472 | | ... | circular topology \|
1473 | | ...
1474 | | ... | _NOTE:_ This KW uses following test case variables:
1475 | | ... | - dut1 - DUT1 node.
1476 | | ... | - dut2 - DUT2 node.
1477 | | ... | - dut1_if1 - DUT1 interface towards TG.
1478 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1479 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1480 | | ... | - dut2_if2 - DUT2 interface towards TG.
1481 | | ...
1482 | | Set interfaces in path up
1483 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1484 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1485 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1486
1487 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in circular topology
1488 | | [Documentation]
1489 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
1490 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
1491 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
1492 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
1493 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
1494 | | ... | and next hop of neighbour DUT interface IPv4 address.
1495 | | ... | Apply required ACL rules to DUT1 interfaces.
1496 | | ...
1497 | | ... | *Arguments:*
1498 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
1499 | | ...
1500 | | ... | *Example:*
1501 | | ...
1502 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
1503 | | ... | in 3-node circular topology \|
1504 | | ...
1505 | | ... | _NOTE:_ This KW uses following test case variables:
1506 | | ... | - tg - TG node.
1507 | | ... | - dut1 - DUT1 node.
1508 | | ... | - dut2 - DUT2 node.
1509 | | ... | - tg_if1 - TG interface 1 towards DUT1.
1510 | | ... | - tg_if2 - TG interface 2 towards DUT2 (3-node topo) or DUT1
1511 | | ... | (2-node topo).
1512 | | ... | - dut1_if1 - DUT1 interface 1 towards TG.
1513 | | ... | - dut1_if2 - DUT1 interface 2 towards DUT2 (3-node topo) or TG
1514 | | ... | (2-node topo).
1515 | | ... | - dut2_if1 - DUT2 interface 1 towards DUT1.
1516 | | ... | - dut2_if2 - DUT2 interface 2 towards TG.
1517 | | ...
1518 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1519 | | ... | Variable Should Exist | ${dut2}
1520 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
1521 | | ... | Set Variable | ${dut2}
1522 | | ... | ELSE | Set Variable | ${dut1}
1523 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1524 | | ... | Set Variable | ${dut2_if2}
1525 | | ... | ELSE | Set Variable | ${dut1_if2}
1526 | | ...
1527 | | Set interfaces in path up
1528 | | ...
1529 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1530 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1531 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1532 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
1533 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
1534 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
1535 | | ...
1536 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
1537 | | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.${number}
1538 | | | ... | ${tg1_if1_mac}
1539 | | | Add arp on dut | ${dut} | ${dut_if2} | 20.20.20.${number}
1540 | | | ... | ${tg1_if2_mac}
1541 | | Run Keyword If | '${dut2_status}' == 'PASS'
1542 | | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
1543 | | Run Keyword If | '${dut2_status}' == 'PASS'
1544 | | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
1545 | | ...
1546 | | Configure IP addresses on interfaces
1547 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
1548 | | ... | ${dut} | ${dut_if2} | 20.20.20.1 | 24
1549 | | Run Keyword If | '${dut2_status}' == 'PASS'
1550 | | ... | Configure IP addresses on interfaces
1551 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
1552 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
1553 | | ...
1554 | | Run Keyword If | '${dut2_status}' == 'PASS'
1555 | | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
1556 | | Run Keyword If | '${dut2_status}' == 'PASS'
1557 | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
1558 | | ...
1559 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1560
1561 | Configure MACIP ACLs
1562 | | [Documentation]
1563 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
1564 | | ... | plus two hitting ACEs for both traffic directions.
1565 | | ...
1566 | | ... | *Arguments:*
1567 | | ... | - dut_node - DUT node. Type: dictionary
1568 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
1569 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
1570 | | ...
1571 | | ... | *Example:*
1572 | | ...
1573 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
1574 | | ... | \| GigabitEthernet0/8/0 \|
1575 | | ...
1576 | | ... | _NOTE:_ This KW uses following test case variables:
1577 | | ... | - src_ip_start - Source IP address start. Type: string
1578 | | ... | - ip_step - IP address step. Type: string
1579 | | ... | - src_mac_start - Source MAC address start in format with colons.
1580 | | ... | Type: string
1581 | | ... | - src_mac_step - Source MAC address step. Type: string
1582 | | ... | - src_mac_mask - Source MAC address mask. 00:00:00:00:00:00 is a
1583 | | ... | wildcard mask. Type: string
1584 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
1585 | | ... | Type: integer
1586 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
1587 | | ... | Type: string
1588 | | ... | - tg_stream1_subnet - IP subnet used by TG in direction 0->1.
1589 | | ... | Type: string
1590 | | ... | - tg_stream2_subnet - IP subnet used by TG in direction 1->0.
1591 | | ... | Type: string
1592 | | ... | - tg_stream1_mac - Source MAC address of traffic stream 1.
1593 | | ... | Type: string
1594 | | ... | - tg_stream2_mac - Source MAC address of traffic stream 2.
1595 | | ... | Type: string
1596 | | ... | - tg_mac_mask - MAC address mask for traffic streams.
1597 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
1598 | | ...
1599 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
1600 | | ...
1601 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
1602 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
1603 | | ...
1604 | | ${ip_limit} = | Set Variable | 255.255.255.255
1605 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
1606 | | ...
1607 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
1608 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
1609 | | ...
1610 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
1611 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
1612 | | ...
1613 | | ${acl}= | Set Variable | ipv4 permit
1614 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
1615 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
1616 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
1617 | | | ${ipv4_limit_reached}= | Set Variable If
1618 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
1619 | | | ${mac_limit_reached}= | Set Variable If
1620 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
1621 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
1622 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
1623 | | | ... | WARN
1624 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
1625 | | | ... | Can't do more iterations - MAC address limit has been reached.
1626 | | | ... | WARN
1627 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
1628 | | | ... | Set Variable | ${ip_limit}
1629 | | | ... | ELSE | Int To IP | ${src_ip_int}
1630 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
1631 | | | ... | Set Variable | ${mac_limit}
1632 | | | ... | ELSE | Int To Mac | ${src_mac_int}
1633 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
1634 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
1635 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
1636 | | ${acl0}= | Catenate | ${acl}
1637 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
1638 | | ... | mask ${tg_mac_mask}
1639 | | ${acl1}= | Catenate | ${acl}
1640 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
1641 | | ... | mask ${tg_mac_mask}
1642 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
1643 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
1644 | | ${acl_idx}= | Set Variable | 0
1645 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
1646 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
1647 | | ${acl_idx}= | Set Variable | 1
1648 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
1649 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
1650
1651 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
1652 | | [Documentation]
1653 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1654 | | ... | domain that is created automatically with index 1. Learning is
1655 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
1656 | | ... | DUT1 interfaces.
1657 | | ...
1658 | | ... | *Arguments:*
1659 | | ... | _None_
1660 | | ...
1661 | | ... | *Example:*
1662 | | ...
1663 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
1664 | | ... | circular topology \|
1665 | | ...
1666 | | ... | _NOTE 1:_ This KW uses following test case variables:
1667 | | ... | - tg - TG node.
1668 | | ... | - dut1 - DUT1 node.
1669 | | ... | - dut2 - DUT2 node.
1670 | | ... | - tg_if1 - TG interface towards DUT1.
1671 | | ... | - tg_if2 - TG interface towards DUT2.
1672 | | ... | - dut1_if1 - DUT1 interface towards TG.
1673 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1674 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1675 | | ... | - dut2_if2 - DUT2 interface towards TG.
1676 | | ...
1677 | | Set interfaces in path up
1678 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1679 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1680 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1681
1682 | Initialize L2 bridge domains with Vhost-User on node
1683 | | [Documentation]
1684 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
1685 | | ... | defined VPP node. Add each Vhost-User interface into L2 bridge
1686 | | ... | domains with learning enabled with physical inteface or Vhost-User
1687 | | ... | interface of another VM.
1688 | | ...
1689 | | ... | *Arguments:*
1690 | | ... | - dut - DUT node. Type: string
1691 | | ... | - vm_count - VM count. Type: integer
1692 | | ...
1693 | | ... | *Note:*
1694 | | ... | Socket paths for VM are defined in following format:
1695 | | ... | - /tmp/sock-\${VM_ID}-1
1696 | | ... | - /tmp/sock-\${VM_ID}-2
1697 | | ...
1698 | | ... | *Example:*
1699 | | ...
1700 | | ... | \| Initialize L2 bridge domains with Vhost-User on node \| DUT1 \
1701 | | ... | \| 1 \|
1702 | | ...
1703 | | [Arguments] | ${dut} | ${vm_count}=${1}
1704 | | ...
1705 | | ${bd_id2}= | Evaluate | ${vm_count}+1
1706 | | Add interface to bridge domain | ${nodes['${dut}']}
1707 | | ... | ${${dut}_if1} | ${1}
1708 | | Add interface to bridge domain | ${nodes['${dut}']}
1709 | | ... | ${${dut}_if2} | ${bd_id2}
1710 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
1711 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1712 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1713 | | | Configure vhost interfaces for L2BD forwarding | ${nodes['${dut}']}
1714 | | | ... | ${sock1} | ${sock2} | ${dut}-vhost-${number}-if1
1715 | | | ... | ${dut}-vhost-${number}-if2
1716 | | | ${bd_id2}= | Evaluate | ${number}+1
1717 | | | Add interface to bridge domain | ${nodes['${dut}']}
1718 | | | ... | ${${dut}-vhost-${number}-if1} | ${number}
1719 | | | Add interface to bridge domain | ${nodes['${dut}']}
1720 | | | ... | ${${dut}-vhost-${number}-if2} | ${bd_id2}
1721 | | All VPP Interfaces Ready Wait | ${nodes}
1722
1723 | Initialize L2 bridge domains with Vhost-User
1724 | | [Documentation]
1725 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
1726 | | ... | defined VPP nodes. Add each Vhost-User interface into L2 bridge
1727 | | ... | domains with learning enabled with physical inteface or Vhost-User
1728 | | ... | interface of another VM.
1729 | | ...
1730 | | ... | *Arguments:*
1731 | | ... | - vm_count - VM count. Type: integer
1732 | | ...
1733 | | ... | *Example:*
1734 | | ...
1735 | | ... | \| Initialize L2 bridge domains with Vhost-User \| 1 \|
1736 | | ...
1737 | | [Arguments] | ${vm_count}=${1}
1738 | | ...
1739 | | ${duts}= | Get Matches | ${nodes} | DUT*
1740 | | :FOR | ${dut} | IN | @{duts}
1741 | | | Initialize L2 bridge domains with Vhost-User on node | ${dut}
1742 | | | ... | vm_count=${vm_count}
1743
1744 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
1745 | | [Documentation]
1746 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
1747 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
1748 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
1749 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
1750 | | ... | interfaces.
1751 | | ...
1752 | | Set interfaces in path up
1753 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1754 | | ... | 24
1755 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1756 | | ... | 24
1757 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1758 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1759 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1760 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1761 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1762 | | ... | 172.16.0.1 | 172.16.0.2
1763 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1764 | | ... | 172.16.0.2 | 172.16.0.1
1765 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1766 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1767
1768 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
1769 | | [Documentation]
1770 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1771 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1772 | | ... | with physical inteface.
1773 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1774 | | ... | interfaces on each DUT. All interfaces are brought up.
1775 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1776 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1777 | | ...
1778 | | ... | *Arguments:*
1779 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1780 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1781 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1782 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1783 | | ...
1784 | | ... | *Example:*
1785 | | ...
1786 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1787 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1788 | | ...
1789 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1790 | | ...
1791 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1792 | | ... | 24
1793 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1794 | | ... | 24
1795 | | Set interfaces in path up
1796 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1797 | | ... | 172.16.0.1 | 172.16.0.2
1798 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1799 | | ... | 172.16.0.2 | 172.16.0.1
1800 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1801 | | ... | ${sock1} | ${sock2}
1802 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1803 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1804 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1805 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1806 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1807 | | ... | ${sock1} | ${sock2}
1808 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1809 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1810 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1811 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1812
1813 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
1814 | | [Documentation]
1815 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
1816 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1817 | | ... | one connected to physical interface, the other to VXLAN.
1818 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
1819 | | ... | interfaces on the DUT. All interfaces are brought up.
1820 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1821 | | ... | DUT and TG.
1822 | | ...
1823 | | ... | *Arguments:*
1824 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
1825 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
1826 | | ... |                         DUT1. Type: string
1827 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
1828 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
1829 | | ... |                         DUT2. Type: string
1830 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
1831 | | ... |             forwarded on DUT1. Type: string
1832 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
1833 | | ... |             forwarded on DUT2. Type: string
1834 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
1835 | | ... |                 Type: list of dicts, dict params vni, vtep
1836 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
1837 | | ... |                 Type: list of dicts, dict params vni, vtep
1838 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
1839 | | ... |                       Type: string
1840 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
1841 | | ... |                     on DUT1. Type: string
1842 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
1843 | | ... |                       Type: string
1844 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
1845 | | ... |                     on DUT2. Type: string
1846 | | ...
1847 | | ... | *Example:*
1848 | | ...
1849 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
1850 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
1851 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
1852 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
1853 | | ...
1854 | | Set interfaces in path up
1855 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} |
1856 | | ... | ${dut1_address} | ${dut1_address_subnet}
1857 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} |
1858 | | ... | ${dut2_address} | ${dut2_address_subnet}
1859 | | ${dut1_bd_id1}= | Set Variable | 1
1860 | | ${dut1_bd_id2}= | Set Variable | 2
1861 | | ${dut2_bd_id1}= | Set Variable | 1
1862 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
1863 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
1864 | | | ... | ${dut1_address} | ${vxlan.vtep}
1865 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
1866 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
1867 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
1868 | | | ... | ${dut2_address} | ${vxlan.vtep}
1869 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
1870 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1871 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1872 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
1873 | | Add arp on dut | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
1874 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
1875 | | ... | ${dut1_gw} | ${dut1_if1}
1876 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
1877 | | ... | ${dut2_gw} | ${dut2_if2}
1878 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
1879 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
1880 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
1881 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
1882
1883 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
1884 | | [Documentation]
1885 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
1886 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
1887 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
1888 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
1889 | | ... | interfaces are brought up.
1890 | | ...
1891 | | ... | *Arguments:*
1892 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1893 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1894 | | ... | - subid - ID of the sub-interface to be created. Type: string
1895 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1896 | | ...
1897 | | ... | _NOTE:_ This KW uses following test case variables:
1898 | | ... | - dut1 - DUT1 node.
1899 | | ... | - dut2 - DUT2 node.
1900 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1901 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1902 | | ...
1903 | | ... | *Example:*
1904 | | ...
1905 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
1906 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
1907 | | ...
1908 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1909 | | ...
1910 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1911 | | ... | Variable Should Exist | ${dut2}
1912 | | ...
1913 | | Set interfaces in path up
1914 | | ...
1915 | | Run Keyword If | '${dut2_status}' == 'PASS'
1916 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1917 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1918 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1919 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1920 | | Run Keyword If | '${dut2_status}' == 'PASS'
1921 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1922 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1923 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1924 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1925 | | ...
1926 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1927 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
1928 | | Run Keyword If | '${dut2_status}' == 'PASS'
1929 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1930 | | ... | ${bd_id2}
1931 | | Run Keyword If | '${dut2_status}' == 'PASS'
1932 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2}
1933 | | ... | ${bd_id2}
1934
1935 | Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology
1936 | | [Documentation]
1937 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1938 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1939 | | ... | with physical inteface.
1940 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
1941 | | ...
1942 | | ... | *Arguments:*
1943 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1944 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1945 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1946 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1947 | | ... | - subid - ID of the sub-interface to be created. Type: string
1948 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1949 | | ...
1950 | | ... | *Example:*
1951 | | ...
1952 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
1953 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10 \
1954 | | ... | \| pop-1 \|
1955 | | ...
1956 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1957 | | ... | ${tag_rewrite}
1958 | | ...
1959 | | Set interfaces in path up
1960 | | Initialize VLAN dot1q sub-interfaces in circular topology
1961 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1962 | | Configure L2 tag rewrite method on interfaces
1963 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1964 | | ... | ${tag_rewrite}
1965 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1966 | | ... | ${sock1} | ${sock2}
1967 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1968 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1969 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1970 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1971 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1972 | | ... | ${sock1} | ${sock2}
1973 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1974 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1975 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1976 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1977
1978 | Initialize L2 bridge domains with Vhost-User and VLAN with DPDK link bonding in a 3-node circular topology
1979 | | [Documentation]
1980 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Setup VLAN
1981 | | ... | on BondEthernet interfaces between DUTs. Add one Vhost-User interface
1982 | | ... | into L2 bridge domains with learning enabled with physical interface
1983 | | ... | towards TG and other Vhost-User interface into L2 bridge domains with
1984 | | ... | learning enabled with VLAN sub-interface. All interfaces are brought
1985 | | ... | up.
1986 | | ...
1987 | | ... | *Arguments:*
1988 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1989 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1990 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1991 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1992 | | ... | - subid - ID of the sub-interface to be created. Type: string
1993 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1994 | | ...
1995 | | ... | *Example:*
1996 | | ...
1997 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with DPDK\
1998 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \
1999 | | ... | \| /tmp/sock2 \| 10 \| pop-1 \|
2000 | | ...
2001 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
2002 | | ... | ${tag_rewrite}
2003 | | ...
2004 | | Set interfaces in path up
2005 | | Add DPDK bonded ethernet interfaces to topology file in 3-node single link topology
2006 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
2007 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
2008 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
2009 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
2010 | | Initialize VLAN dot1q sub-interfaces in circular topology
2011 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
2012 | | ... | ${subid}
2013 | | Configure L2 tag rewrite method on interfaces
2014 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
2015 | | ... | ${tag_rewrite}
2016 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
2017 | | ... | ${sock1} | ${sock2}
2018 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
2019 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
2020 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
2021 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
2022 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
2023 | | ... | ${sock1} | ${sock2}
2024 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
2025 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
2026 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
2027 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
2028
2029 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
2030 | | [Documentation]
2031 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
2032 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
2033 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
2034 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
2035 | | ... | interface into L2 bridge domains with learning enabled with physical
2036 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
2037 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
2038 | | ... | are brought up.
2039 | | ...
2040 | | ... | *Arguments:*
2041 | | ... | - bd_id1 - Bridge domain ID. Type: integer
2042 | | ... | - bd_id2 - Bridge domain ID. Type: integer
2043 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
2044 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
2045 | | ... | - subid - ID of the sub-interface to be created. Type: string
2046 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
2047 | | ... | - bond_mode - Link bonding mode. Type: string
2048 | | ... | - lb_mode - Load balance mode. Type: string
2049 | | ...
2050 | | ... | *Example:*
2051 | | ...
2052 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
2053 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \
2054 | | ... | \| /tmp/sock2 \| 10 \| pop-1 \| xor \| l34 \|
2055 | | ...
2056 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
2057 | | ... | ${tag_rewrite} | ${bond_mode} | ${lb_mode}
2058 | | ...
2059 | | Set interfaces in path up
2060 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
2061 | | ... | ${lb_mode}
2062 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
2063 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
2064 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
2065 | | ... | Variable Should Exist | ${dut1_if2}
2066 | | Run Keyword If | '${if2_status}' == 'PASS'
2067 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
2068 | | ... | ${dut1_eth_bond_if1}
2069 | | ... | ELSE
2070 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
2071 | | ... | ${dut1_eth_bond_if1}
2072 | | Run Keyword Unless | '${if2_status}' == 'PASS'
2073 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
2074 | | ... | ${dut1_eth_bond_if1}
2075 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
2076 | | ... | ${lb_mode}
2077 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
2078 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
2079 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
2080 | | ... | Variable Should Exist | ${dut2_if1}
2081 | | Run Keyword If | '${if1_status}' == 'PASS'
2082 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
2083 | | ... | ${dut2_eth_bond_if1}
2084 | | ... | ELSE
2085 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
2086 | | ... | ${dut2_eth_bond_if1}
2087 | | Run Keyword Unless | '${if2_status}' == 'PASS'
2088 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
2089 | | ... | ${dut2_eth_bond_if1}
2090 | | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
2091 | | Initialize VLAN dot1q sub-interfaces in circular topology
2092 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
2093 | | ... | ${subid}
2094 | | Configure L2 tag rewrite method on interfaces
2095 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
2096 | | ... | ${tag_rewrite}
2097 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
2098 | | ... | ${sock1} | ${sock2}
2099 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
2100 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
2101 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
2102 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
2103 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
2104 | | ... | ${sock1} | ${sock2}
2105 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
2106 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
2107 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
2108 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
2109
2110 | Add PCI devices to all DUTs
2111 | | [Documentation]
2112 | | ... | Add PCI devices to VPP configuration file.
2113 | | ...
2114 | | ${duts}= | Get Matches | ${nodes} | DUT*
2115 | | :FOR | ${dut} | IN | @{duts}
2116 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
2117 | | | ... | Variable Should Exist | ${${dut}_if1}
2118 | | | ${if1_pci}= | Run Keyword If | '${if1_status}' == 'PASS'
2119 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
2120 | | | ${if1_1_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
2121 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_1}
2122 | | | ${if1_2_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
2123 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_2}
2124 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
2125 | | | ... | Variable Should Exist | ${${dut}_if2}
2126 | | | ${if2_pci}= | Run Keyword If | '${if2_status}' == 'PASS'
2127 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
2128 | | | ${if2_1_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
2129 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_1}
2130 | | | ${if2_2_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
2131 | | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_2}
2132 | | | @{pci_devs}= | Run Keyword If | '${if1_status}' == 'PASS'
2133 | | | ... | Create List | ${if1_pci}
2134 | | | ... | ELSE
2135 | | | ... | Create List | ${if1_1_pci} | ${if1_2_pci}
2136 | | | Run Keyword If | '${if2_status}' == 'PASS'
2137 | | | ... | Append To List | ${pci_devs} | ${if2_pci}
2138 | | | ... | ELSE
2139 | | | ... | Append To List | ${pci_devs} | ${if2_1_pci} | ${if2_2_pci}
2140 | | | Run keyword | ${dut}.Add DPDK Dev | @{pci_devs}
2141 | | | Run Keyword If | '${if1_status}' == 'PASS'
2142 | | | ... | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
2143 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
2144 | | | ... | Set Test Variable | ${${dut}_if1_1_pci} | ${if1_1_pci}
2145 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
2146 | | | ... | Set Test Variable | ${${dut}_if1_2_pci} | ${if1_2_pci}
2147 | | | Run Keyword If | '${if2_status}' == 'PASS'
2148 | | | ... | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
2149 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
2150 | | | ... | Set Test Variable | ${${dut}_if2_1_pci} | ${if2_1_pci}
2151 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
2152 | | | ... | Set Test Variable | ${${dut}_if2_2_pci} | ${if2_2_pci}
2153
2154 | Add single PCI device to all DUTs
2155 | | [Documentation]
2156 | | ... | Add single (first) PCI device on DUT1 and single (last) PCI device on
2157 | | ... | DUT2 to VPP configuration file.
2158 | | ...
2159 | | ${duts}= | Get Matches | ${nodes} | DUT*
2160 | | :FOR | ${dut} | IN | @{duts}
2161 | | | ${if1_pci}= |  Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
2162 | | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
2163 | | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
2164
2165 | Add VLAN strip offload switch off between DUTs in 3-node single link topology
2166 | | [Documentation]
2167 | | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
2168 | | ... | configuration file.
2169 | | ...
2170 | | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_pci}
2171 | | ... | vlan-strip-offload | off
2172 | | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_pci}
2173 | | ... | vlan-strip-offload | off
2174
2175 | Add VLAN strip offload switch off between DUTs in 3-node double link topology
2176 | | [Documentation]
2177 | | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
2178 | | ... | configuration file.
2179 | | ...
2180 | | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_1_pci}
2181 | | ... | vlan-strip-offload | off
2182 | | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_2_pci}
2183 | | ... | vlan-strip-offload | off
2184 | | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_1_pci}
2185 | | ... | vlan-strip-offload | off
2186 | | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_2_pci}
2187 | | ... | vlan-strip-offload | off
2188
2189 | Add DPDK bonded ethernet interfaces to DUTs in 3-node single link topology
2190 | | [Documentation]
2191 | | ... | Add DPDK bonded Ethernet interfaces with mode XOR and transmit policy
2192 | | ... | l34 to VPP configuration file.
2193 | | ...
2194 | | Run keyword | DUT1.Add DPDK Eth Bond Dev | 0 | 2 | l34 | ${dut1_if2_pci}
2195 | | Run keyword | DUT2.Add DPDK Eth Bond Dev | 0 | 2 | l34 | ${dut2_if1_pci}
2196
2197 | Add DPDK bonded ethernet interfaces to topology file in 3-node single link topology
2198 | | Add Eth Interface | ${dut1} | ${dut1_eth_bond_if1_name} | ifc_pfx=eth_bond
2199 | | Add Eth Interface | ${dut2} | ${dut2_eth_bond_if1_name} | ifc_pfx=eth_bond
2200
2201 | Configure guest VM with dpdk-testpmd connected via vhost-user
2202 | | [Documentation]
2203 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting\
2204 | | ... | DPDK testpmd.
2205 | | ...
2206 | | ... | *Arguments:*
2207 | | ... | - dut - DUT node to start guest VM on. Type: dictionary
2208 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2209 | | ... | - sock2 - Socket path for second Vhost-User interface.
2210 | | ... | Type: string
2211 | | ... | - vm_name - QemuUtil instance name. Type: string
2212 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT
2213 | | ... | node. Type: integer
2214 | | ... | - jumbo - Set True if jumbo frames are used in the test.
2215 | | ... | Type: bool
2216 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2217 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2218 | | ... | Type: bool
2219 | | ...
2220 | | ... | *Note:*
2221 | | ... | KW uses test variables \${rxq_count_int}, \${thr_count_int} and
2222 | | ... | \${cpu_count_int} set by "Add worker threads and rxqueues to all DUTs"
2223 | | ...
2224 | | ... | *Example:*
2225 | | ...
2226 | | ... | \| Configure guest VM with dpdk-testpmd connected via vhost-user \
2227 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
2228 | | ... | \| qemu_id=${2} \|
2229 | | ...
2230 | | [Arguments] | ${dut} | ${sock1} | ${sock2} | ${vm_name} | ${qemu_id}=${1}
2231 | | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
2232 | | ... | ${use_tuned_cfs}=${False}
2233 | | ...
2234 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
2235 | | ... | WITH NAME | ${vm_name}
2236 | | Run keyword | ${vm_name}.Qemu Set Node | ${nodes['${dut}']}
2237 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
2238 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
2239 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
2240 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
2241 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
2242 | | ... | Variable Should Exist | ${${dut}_if1}
2243 | | @{if_list}= | Run Keyword If | '${if1_status}' == 'PASS'
2244 | | ... | Create List | ${${dut}_if1}
2245 | | ... | ELSE | Create List | ${${dut}_if1_1} | ${${dut}_if1_2}
2246 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
2247 | | ... | Variable Should Exist | ${${dut}_if2}
2248 | | Run Keyword If | '${if2_status}' == 'PASS'
2249 | | ... | Append To List | ${if_list} | ${${dut}_if2}
2250 | | ... | ELSE | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
2251 | | ${dut_numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
2252 # Compute CPU placement for VM based on expected DUT placement.
2253 | | ${os_cpus}= | Set Variable | ${1}
2254 | | ${dut_main_cpus}= | Set Variable | ${1}
2255 | | ${dut_wk_cpus}= | Set Variable | ${cpu_count_int}
2256 | | ${vm_cpus}= | Evaluate | ${dut_wk_cpus} + ${dut_main_cpus}
2257 | | ${skip_dut}= | Evaluate | ${dut_wk_cpus} + ${dut_main_cpus} + ${os_cpus}
2258 | | ${skip_cpu}= | Evaluate | ${skip_dut} + (${qemu_id} - ${1}) * ${vm_cpus}
2259 | | ${qemu_cpus}= | Cpu slice of list per node | ${nodes['${dut}']}
2260 | | ... | ${dut_numa} | skip_cnt=${skip_cpu} | cpu_cnt=${vm_cpus}
2261 | | ... | smt_used=${smt_used}
2262 | | ${vm_thrs}= | Get Length | ${qemu_cpus}
2263 | | Run keyword | ${vm_name}.Qemu Set Queue Count | ${rxq_count_int}
2264 | | Run keyword | ${vm_name}.Qemu Set Queue Size | ${perf_qemu_qsz}
2265 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2266 | | ... | jumbo_frames=${jumbo}
2267 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2268 | | ... | jumbo_frames=${jumbo}
2269 | | ${apply_patch}= | Set Variable | ${False}
2270 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2271 | | ... | ${perf_qemu_path}-patch/bin/
2272 | | ... | ${perf_qemu_path}-base/bin/
2273 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${nodes['${dut}']}
2274 | | ... | apply_patch=${False}
2275 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2276 | | Run keyword | ${vm_name}.Qemu Set Smp | ${vm_thrs} | ${vm_thrs} | 1 | 1
2277 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2278 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2279 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2280 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2281 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
2282 | | ${max_pkt_len}= | Set Variable If | ${jumbo} | 9000 | ${EMPTY}
2283 | | ${testpmd_cpus}= | Evaluate | ${thr_count_int} + ${1}
2284 | | ${testpmd_cpus}= | Cpu list per node str | ${nodes['${dut}']} | ${0}
2285 | | ... | cpu_cnt=${testpmd_cpus}
2286 | | Dpdk Testpmd Start | ${vm} | eal_corelist=${testpmd_cpus}
2287 | | ... | eal_mem_channels=4 | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE}
2288 | | ... | pmd_rxd=${perf_qemu_qsz} | pmd_txd=${perf_qemu_qsz}
2289 | | ... | pmd_rxq=${rxq_count_int} | pmd_txq=${rxq_count_int}
2290 | | ... | pmd_max_pkt_len=${max_pkt_len}
2291 | | Return From Keyword | ${vm}
2292
2293 | Configure guest VMs with dpdk-testpmd connected via vhost-user on node
2294 | | [Documentation]
2295 | | ... | Start vm_count QEMU guests with two vhost-user interfaces and\
2296 | | ... | interconnecting DPDK testpmd for defined number of VMs on all defined\
2297 | | ... | VPP nodes.
2298 | | ...
2299 | | ... | *Arguments:*
2300 | | ... | - dut - DUT node to start guest VM on. Type: dictionary
2301 | | ... | - vm_count - Number of guest VMs. Type: int
2302 | | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
2303 | | ... | in the test. Type: boolean
2304 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2305 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2306 | | ... | Type: bool
2307 | | ...
2308 | | ... | *Example:*
2309 | | ...
2310 | | ... | \| Configure guest VMs with dpdk-testpmd connected via \
2311 | | ... | vhost-user on node \| DUT1 \| 1 \| False \| 256 \|
2312 | | ...
2313 | | [Arguments] | ${dut} | ${vm_count}=${1} | ${jumbo}=${False} |
2314 | | ... | ${perf_qemu_qsz}=${256} | ${use_tuned_cfs}=${False}
2315 | | ...
2316 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
2317 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
2318 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
2319 | | | ${vm}=
2320 | | | ... | Configure guest VM with dpdk-testpmd connected via vhost-user
2321 | | | ... | ${dut} | ${sock1} | ${sock2} | ${dut}_VM${number}
2322 | | | ... | qemu_id=${number} | jumbo=${jumbo} | perf_qemu_qsz=${perf_qemu_qsz}
2323 | | | ... | use_tuned_cfs=${use_tuned_cfs}
2324 | | | Set To Dictionary | ${${dut}_vm_refs} | ${dut}_VM${number} | ${vm}
2325
2326 | Configure guest VMs with dpdk-testpmd connected via vhost-user
2327 | | [Documentation]
2328 | | ... | Start vm_count QEMU guests with two vhost-user interfaces and\
2329 | | ... | interconnecting DPDK testpmd defined number of VMs on all defined VPP\
2330 | | ... | nodes.
2331 | | ...
2332 | | ... | *Arguments:*
2333 | | ... | - vm_count - Number of guest VMs. Type: int
2334 | | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
2335 | | ... | in the test. Type: boolean
2336 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2337 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2338 | | ... | Type: bool
2339 | | ...
2340 | | ... | *Example:*
2341 | | ...
2342 | | ... | \| Configure guest VMs with dpdk-testpmd connected via vhost-user\
2343 | | ... | \| 1 \| False \| 256 \|
2344 | | ...
2345 | | [Arguments] | ${vm_count}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
2346 | | ... | ${use_tuned_cfs}=${False}
2347 | | ...
2348 | | ${duts}= | Get Matches | ${nodes} | DUT*
2349 | | :FOR | ${dut} | IN | @{duts}
2350 | | | Configure guest VMs with dpdk-testpmd connected via vhost-user on node
2351 | | | ... | ${dut} | vm_count=${vm_count} | jumbo=${jumbo}
2352 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${False}
2353
2354 | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
2355 | | [Documentation]
2356 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting\
2357 | | ... | DPDK testpmd.
2358 | | ...
2359 | | ... | *Arguments:*
2360 | | ... | - dut - DUT node to start guest VM on. Type: dictionary
2361 | | ... | - sock1 - Socket path for first Vhost-User interface.
2362 | | ... | Type: string
2363 | | ... | - sock2 - Socket path for second Vhost-User interface.
2364 | | ... | Type: string
2365 | | ... | - vm_name - QemuUtil instance name. Type: string
2366 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
2367 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
2368 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT
2369 | | ... | node. Type: integer
2370 | | ... | - jumbo - Set True if jumbo frames are used in the test.
2371 | | ... | Type: bool
2372 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2373 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2374 | | ... | Type: bool
2375 | | ...
2376 | | ... | *Note:*
2377 | | ... | KW uses test variables \${rxq_count_int}, \${thr_count_int} and
2378 | | ... | \${cpu_count_int} set by "Add worker threads and rxqueues to all DUTs"
2379 | | ...
2380 | | ... | *Example:*
2381 | | ...
2382 | | ... | \| Configure guest VM with dpdk-testpmd-mac connected via vhost-user \
2383 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
2384 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \|
2385 | | ...
2386 | | [Arguments] | ${dut} | ${sock1} | ${sock2} | ${vm_name}
2387 | | ... | ${eth0_mac} | ${eth1_mac} | ${qemu_id}=${1} | ${jumbo}=${False}
2388 | | ... | ${perf_qemu_qsz}=${256} | ${use_tuned_cfs}=${False}
2389 | | ...
2390 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
2391 | | ... | WITH NAME | ${vm_name}
2392 | | Run keyword | ${vm_name}.Qemu Set Node | ${nodes['${dut}']}
2393 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
2394 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
2395 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
2396 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
2397 | | ${dut_numa}= | Get interfaces numa node | ${nodes['${dut}']}
2398 | | ... | ${${dut}_if1} | ${${dut}_if2}
2399 # Compute CPU placement for VM based on expected DUT placement.
2400 | | ${os_cpus}= | Set Variable | ${1}
2401 | | ${dut_main_cpus}= | Set Variable | ${1}
2402 | | ${dut_wk_cpus}= | Set Variable | ${cpu_count_int}
2403 | | ${vm_cpus}= | Evaluate | ${dut_wk_cpus} + ${dut_main_cpus}
2404 | | ${skip_dut}= | Evaluate | ${dut_wk_cpus} + ${dut_main_cpus} + ${os_cpus}
2405 | | ${skip_cpu}= | Evaluate | ${skip_dut} + (${qemu_id} - ${1}) * ${vm_cpus}
2406 | | ${qemu_cpus}= | Cpu slice of list per node | ${nodes['${dut}']}
2407 | | ... | ${dut_numa} | skip_cnt=${skip_cpu} | cpu_cnt=${vm_cpus}
2408 | | ... | smt_used=${smt_used}
2409 | | ${vm_thrs}= | Get Length | ${qemu_cpus}
2410 | | Run keyword | ${vm_name}.Qemu Set Queue Count | ${rxq_count_int}
2411 | | Run keyword | ${vm_name}.Qemu Set Queue Size | ${perf_qemu_qsz}
2412 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2413 | | ... | jumbo_frames=${jumbo}
2414 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2415 | | ... | jumbo_frames=${jumbo}
2416 | | ${apply_patch}= | Set Variable | ${False}
2417 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2418 | | ... | ${perf_qemu_path}-patch/bin/
2419 | | ... | ${perf_qemu_path}-base/bin/
2420 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${nodes['${dut}']}
2421 | | ... | apply_patch=${False}
2422 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2423 | | Run keyword | ${vm_name}.Qemu Set Smp | ${vm_thrs} | ${vm_thrs} | 1 | 1
2424 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2425 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2426 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2427 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2428 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
2429 | | ${max_pkt_len}= | Set Variable If | ${jumbo} | 9000 | ${EMPTY}
2430 | | ${testpmd_cpus}= | Evaluate | ${thr_count_int} + ${1}
2431 | | ${testpmd_cpus}= | Cpu list per node str | ${nodes['${dut}']} | ${0}
2432 | | ... | cpu_cnt=${testpmd_cpus}
2433 | | Dpdk Testpmd Start | ${vm} | eal_corelist=${testpmd_cpus}
2434 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
2435 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${TRUE}
2436 | | ... | pmd_rxd=${perf_qemu_qsz} | pmd_txd=${perf_qemu_qsz}
2437 | | ... | pmd_rxq=${rxq_count_int} | pmd_txq=${rxq_count_int}
2438 | | ... | pmd_max_pkt_len=${max_pkt_len}
2439 | | Return From Keyword | ${vm}
2440
2441 | Configure guest VMs with dpdk-testpmd-mac connected via vhost-user on node
2442 | | [Documentation]
2443 | | ... | Start vm_count QEMU guests with two vhost-user interfaces and\
2444 | | ... | interconnecting DPDK testpmd with fwd mode set to mac rewrite for\
2445 | | ... | defined number of VMs on all defined VPP nodes.
2446 | | ...
2447 | | ... | *Arguments:*
2448 | | ... | - dut - DUT node to start guest VM on. Type: dictionary
2449 | | ... | - vm_count} - Number of guest VMs. Type: int
2450 | | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
2451 | | ... | in the test. Type: boolean
2452 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2453 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2454 | | ... | Type: bool
2455 | | ...
2456 | | ... | _NOTE:_ This KW expects following test case variables to be set:
2457 | | ... | - cpu_count_int - Number of Physical CPUs allocated for DUT.
2458 | | ...
2459 | | ... | *Example:*
2460 | | ...
2461 | | ... | \| Configure guest VMs with dpdk-testpmd-mac connected via \
2462 | | ... | vhost-user on node \| DUT1 \| 1 \| False \| 256 \|
2463 | | ...
2464 | | [Arguments] | ${dut} | ${vm_count}=${1} | ${jumbo}=${False} |
2465 | | ... | ${perf_qemu_qsz}=${256} | ${use_tuned_cfs}=${False}
2466 | | ...
2467 | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
2468 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
2469 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
2470 | | | ${vm}=
2471 | | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
2472 | | | ... | ${dut} | ${sock1} | ${sock2} | ${dut}_VM${number}
2473 | | | ... | ${${dut}-vhost-${number}-if1_mac}
2474 | | | ... | ${${dut}-vhost-${number}-if2_mac} | qemu_id=${number}
2475 | | | ... | jumbo=${jumbo} | perf_qemu_qsz=${perf_qemu_qsz}
2476 | | | ... | use_tuned_cfs=${use_tuned_cfs}
2477 | | | Set To Dictionary | ${${dut}_vm_refs} | ${dut}_VM${number} | ${vm}
2478
2479 | Configure guest VMs with dpdk-testpmd-mac connected via vhost-user
2480 | | [Documentation]
2481 | | ... | Start vm_count QEMU guests with two vhost-user interfaces and\
2482 | | ... | interconnecting DPDK testpmd with fwd mode set to mac rewrite for\
2483 | | ... | defined number of VMs on all defined VPP nodes.
2484 | | ...
2485 | | ... | *Arguments:*
2486 | | ... | - vm_count - Number of guest VMs. Type: int
2487 | | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
2488 | | ... | in the test. Type: boolean
2489 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
2490 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
2491 | | ... | Type: bool
2492 | | ...
2493 | | ... | *Example:*
2494 | | ...
2495 | | ... | \| Configure guest VMs with dpdk-testpmd-mac connected via vhost-user\
2496 | | ... | \| 1 \| False \| 256 \|
2497 | | ...
2498 | | [Arguments] | ${vm_count}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
2499 | | ... | ${use_tuned_cfs}=${False}
2500 | | ...
2501 | | ${duts}= | Get Matches | ${nodes} | DUT*
2502 | | :FOR | ${dut} | IN | @{duts}
2503 | | | Configure guest VMs with dpdk-testpmd-mac connected via vhost-user on node
2504 | | | ... | ${dut} | vm_count=${vm_count} | jumbo=${jumbo}
2505 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${False}
2506
2507 | Configure guest VM with linux bridge connected via vhost-user
2508 | | [Documentation]
2509 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting\
2510 | | ... | linux bridge.
2511 | | ...
2512 | | ... | *Arguments:*
2513 | | ... | - dut - DUT node to start guest VM on. Type: dictionary
2514 | | ... | - sock1 - Socket path for first Vhost-User interface.
2515 | | ... | Type: string
2516 | | ... | - sock2 - Socket path for second Vhost-User interface.
2517 | | ... | Type: string
2518 | | ... | - vm_name - QemuUtil instance name. Type: string
2519 | | ... | - skip_cnt - number of cpus which will be skipped. Type: int
2520 | | ...
2521 | | ... | _NOTE:_ This KW expects following test case variables to be set:
2522 | | ... | - cpu_count_int - Number of Physical CPUs allocated for DUT.
2523 | | ...
2524 | | ... | *Example:*
2525 | | ...
2526 | | ... | \| Configure guest VM with linux bridge connected via vhost-user \
2527 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \|
2528 | | ...
2529 | | [Arguments] | ${dut} | ${sock1} | ${sock2} | ${vm_name} | ${skip_cnt}=${6}
2530 | | ... | ${count}=${5}
2531 | | ...
2532 | | Import Library | resources.libraries.python.QemuUtils
2533 | | ... | WITH NAME | ${vm_name}
2534 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut}
2535 | | ${dut_numa}= | Get interfaces numa node | ${dut}
2536 | | ... | ${dut1_if1} | ${dut1_if2}
2537 | | ${vm_phy_cpus}= | Evaluate | ${cpu_count_int} + ${1}
2538 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - ${1}) * ${vm_phy_cpus}
2539 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut} | ${dut_numa}
2540 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${vm_phy_cpus} | smt_used=${smt_used}
2541 | | ${vm_thr_cpus}= | Get Length | ${qemu_cpus}
2542 | | Run keyword | ${vm_name}.Qemu Set Queue Size | ${perf_qemu_qsz}
2543 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2544 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2545 | | ${apply_patch}= | Set Variable | ${False}
2546 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2547 | | ... | ${perf_qemu_path}-patch/bin/
2548 | | ... | ${perf_qemu_path}-base/bin/
2549 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut}
2550 | | ... | apply_patch=${apply_patch}
2551 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2552 | | Run keyword | ${vm_name}.Qemu Set Smp | ${vm_thr_cpus} | ${vm_thr_cpus}
2553 | | ... | 1 | 1
2554 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2555 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2556 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2557 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2558 | | ${br}= | Set Variable | br0
2559 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
2560 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
2561 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
2562 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
2563 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
2564 | | Set Interface State | ${vm} | ${br} | up | if_type=name
2565 | | Return From Keyword | ${vm}
2566
2567 | Initialize LISP IPv4 forwarding in 3-node circular topology
2568 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
2569 | | ... | Don`t set route.
2570 | | ...
2571 | | ... | *Arguments:*
2572 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
2573 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
2574 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
2575 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
2576 | | ... | - duts_prefix - ip prefix. Type: int
2577 | | ...
2578 | | ... | *Return:*
2579 | | ... | - No value returned
2580 | | ...
2581 | | ... | *Example:*
2582 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
2583 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2584 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2585 | | ...
2586 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2587 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
2588 | | ...
2589 | | Set interfaces in path up
2590 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2591 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2592 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2593 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2594 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2595 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2596 | | ... | ${dut2_if1_mac}
2597 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2598 | | ... | ${dut1_if2_mac}
2599 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2600 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
2601 | | ... | ${dut1_tg_address} | ${duts_prefix}
2602 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
2603 | | ... | ${dut1_dut2_address} | ${duts_prefix}
2604 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
2605 | | ... | ${dut2_dut1_address} | ${duts_prefix}
2606 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
2607 | | ... | ${dut2_tg_address} | ${duts_prefix}
2608
2609 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
2610 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
2611 | | ...
2612 | | ... | *Arguments:*
2613 | | ... | - encr_alg - Encryption algorithm. Type: string
2614 | | ... | - auth_alg - Authentication algorithm. Type: string
2615 | | ...
2616 | | ... | *Return:*
2617 | | ... | - No value returned
2618 | | ...
2619 | | ... | *Example:*
2620 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
2621 | | ... | \| ${encr_alg} \| ${auth_alg}
2622 | | ...
2623 | | [Arguments] | ${encr_alg} | ${auth_alg}
2624 | | ...
2625 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
2626 | | Initialize LISP IPv4 forwarding in 3-node circular topology
2627 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
2628 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
2629 | | Configure LISP GPE topology in 3-node circular topology
2630 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
2631 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
2632 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
2633 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
2634 | | Configure manual keyed connection for IPSec
2635 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
2636 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
2637 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
2638 | | Configure manual keyed connection for IPSec
2639 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
2640 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
2641 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
2642
2643 | Initialize LISP IPv6 forwarding in 3-node circular topology
2644 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
2645 | | ... | Don`t set route.
2646 | | ...
2647 | | ... | *Arguments:*
2648 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
2649 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
2650 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
2651 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
2652 | | ... | - duts_prefix - ip prefix. Type: int
2653 | | ...
2654 | | ... | *Return:*
2655 | | ... | - No value returned
2656 | | ...
2657 | | ... | *Example:*
2658 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
2659 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2660 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2661 | | ...
2662 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2663 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
2664 | | ...
2665 | | Set interfaces in path up
2666 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2667 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2668 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2669 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2670 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
2671 | | ... | ${prefix}
2672 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
2673 | | ... | ${prefix}
2674 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
2675 | | ... | ${prefix}
2676 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
2677 | | ... | ${prefix}
2678 | | Suppress ICMPv6 router advertisement message | ${nodes}
2679 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2680 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2681 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2682 | | ... | ${dut2_if1_mac}
2683 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2684 | | ... | ${dut1_if2_mac}
2685
2686 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
2687 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2688 | | ... | Don`t set route.
2689 | | ...
2690 | | ... | *Arguments:*
2691 | | ... | - dut1_dut2_ip6_address - IPv6 address from DUT1 to DUT2.
2692 | | ... | Type: string
2693 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
2694 | | ... | - dut2_dut1_ip6_address - IPv6 address from DUT2 to DUT1.
2695 | | ... | Type: string
2696 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
2697 | | ... | - prefix4 - IPv4 prefix. Type: int
2698 | | ... | - prefix6 - IPv6 prefix. Type: int
2699 | | ...
2700 | | ... | *Return:*
2701 | | ... | - No value returned
2702 | | ...
2703 | | ... | *Example:*
2704 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
2705 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
2706 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
2707 | | ... | \| ${prefix4} \| ${prefix6} \|
2708 | | ...
2709 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
2710 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
2711 | | ... | ${prefix4} | ${prefix6}
2712 | | ...
2713 | | Set interfaces in path up
2714 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2715 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2716 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2717 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2718 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
2719 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
2720 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
2721 | | ... | ${prefix6}
2722 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
2723 | | ... | ${prefix6}
2724 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
2725 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
2726 | | Suppress ICMPv6 router advertisement message | ${nodes}
2727 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2728 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2729 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
2730 | | ... | ${dut2_if1_mac}
2731 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
2732 | | ... | ${dut1_if2_mac}
2733
2734 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
2735 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2736 | | ... | Don`t set route.
2737 | | ...
2738 | | ... | *Arguments:*
2739 | | ... | - dut1_dut2_ip4_address - IPv4 address from DUT1 to DUT2.
2740 | | ... | Type: string
2741 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
2742 | | ... | - dut2_dut1_ip4_address - IPv4 address from DUT2 to DUT1.
2743 | | ... | Type: string
2744 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
2745 | | ... | - prefix4 - IPv4 prefix. Type: int
2746 | | ... | - prefix6 - IPv6 prefix. Type: int
2747 | | ...
2748 | | ... | *Return:*
2749 | | ... | - No value returned
2750 | | ...
2751 | | ... | *Example:*
2752 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
2753 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
2754 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
2755 | | ... | \| ${prefix6} \| ${prefix4} \|
2756 | | ...
2757 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
2758 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
2759 | | ... | ${prefix6} | ${prefix4}
2760 | | ...
2761 | | Set interfaces in path up
2762 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2763 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2764 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2765 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2766 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
2767 | | ... | ${prefix6}
2768 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
2769 | | ... | ${dut1_dut2_ip4_address} | ${prefix4}
2770 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
2771 | | ... | ${dut2_dut1_ip4_address} | ${prefix4}
2772 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
2773 | | ... | ${prefix6}
2774 | | Suppress ICMPv6 router advertisement message | ${nodes}
2775 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2776 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2777 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address}
2778 | | ... | ${dut2_if1_mac}
2779 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address}
2780 | | ... | ${dut1_if2_mac}
2781
2782 | Initialize NAT44 in circular topology
2783 | | [Documentation] | Initialization of 2-node / 3-node topology with NAT44
2784 | | ... | between DUTs:
2785 | | ... | - set interfaces up
2786 | | ... | - set IP addresses
2787 | | ... | - set ARP
2788 | | ... | - create routes
2789 | | ... | - set NAT44 - only on DUT1
2790 | | ...
2791 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
2792 | | ... | Variable Should Exist | ${dut2}
2793 | | ...
2794 | | Set interfaces in path up
2795 | | ...
2796 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
2797 | | Run Keyword If | '${dut2_status}' == 'PASS'
2798 | | ... | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
2799 | | Run Keyword If | '${dut2_status}' == 'PASS'
2800 | | ... | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
2801 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
2802 | | ... | Set Variable | ${dut2}
2803 | | ... | ELSE | Set Variable | ${dut1}
2804 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
2805 | | ... | Set Variable | ${dut2_if2}
2806 | | ... | ELSE | Set Variable | ${dut1_if2}
2807 | | Configure IP addresses on interfaces | ${dut} | ${dut_if2} | 12.0.0.1 | 20
2808 | | ...
2809 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2810 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2811 | | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
2812 | | ... | Get Interface MAC | ${dut1} | ${dut1_if2}
2813 | | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS'
2814 | | ... | Get Interface MAC | ${dut2} | ${dut2_if1}
2815 | | ...
2816 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
2817 | | Run Keyword If | '${dut2_status}' == 'PASS'
2818 | | ... | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
2819 | | Run Keyword If | '${dut2_status}' == 'PASS'
2820 | | ... | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
2821 | | Add arp on dut | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
2822 | | ...
2823 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | 10.0.0.2 | ${dut1_if1}
2824 | | Run Keyword If | '${dut2_status}' == 'PASS'
2825 | | ... | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | 11.0.0.2 | ${dut1_if2}
2826 | | Run Keyword If | '${dut2_status}' == 'PASS'
2827 | | ... | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | 12.0.0.2 | ${dut2_if2}
2828 | | Run Keyword If | '${dut2_status}' == 'PASS'
2829 | | ... | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | 11.0.0.1 | ${dut2_if1}
2830 | | ...
2831 | | Configure inside and outside interfaces
2832 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
2833 | | Configure deterministic mode for NAT44
2834 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
2835
2836 | Initialize L2 xconnect with memif pairs on DUT node
2837 | | [Documentation]
2838 | | ... | Create pairs of Memif interfaces on DUT node. Cross connect each Memif
2839 | | ... | interface with one physical interface or virtual interface to create
2840 | | ... | a chain accross DUT node.
2841 | | ...
2842 | | ... | *Arguments:*
2843 | | ... | - dut - DUT node. Type: dictionary
2844 | | ... | - count - Number of memif pairs (containers). Type: integer
2845 | | ...
2846 | | ... | *Note:*
2847 | | ... | Socket paths for Memif are defined in following format:
2848 | | ... | - /tmp/memif-\${dut}_VNF\${number}-\${sid}
2849 | | ...
2850 | | ... | KW uses test variable \${rxq_count_int} set by KW Add worker threads
2851 | | ... | and rxqueues to all DUTs
2852 | | ...
2853 | | ... | *Example:*
2854 | | ...
2855 | | ... | \| Initialize L2 xconnect with memif pairs on DUT node \| ${dut} \
2856 | | ... | \| ${1} \|
2857 | | ...
2858 | | [Arguments] | ${dut} | ${count}
2859 | | ...
2860 | | :FOR | ${number} | IN RANGE | 1 | ${count}+1
2861 | | | ${sock1}= | Set Variable | memif-${dut}_VNF
2862 | | | ${sock2}= | Set Variable | memif-${dut}_VNF
2863 | | | ${prev_index}= | Evaluate | ${number}-1
2864 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
2865 | | | ... | ${sock1} | ${sock2} | ${number} | ${dut}-memif-${number}-if1
2866 | | | ... | ${dut}-memif-${number}-if2 | ${rxq_count_int} | ${rxq_count_int}
2867 | | | ${xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
2868 | | | ... | ${${dut}-memif-${prev_index}-if2}
2869 | | | Configure L2XC | ${nodes['${dut}']} | ${xconnect_if1}
2870 | | | ... | ${${dut}-memif-${number}-if1}
2871 | | | Run Keyword If | ${number}==${count} | Configure L2XC
2872 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${number}-if2} | ${${dut}_if2}
2873
2874 | Initialize L2 xconnect with memif pairs
2875 | | [Documentation]
2876 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Cross
2877 | | ... | connect each Memif interface with one physical interface or virtual
2878 | | ... | interface to create a chain accross DUT node.
2879 | | ...
2880 | | ... | *Arguments:*
2881 | | ... | - count - Number of memif pairs (containers). Type: integer
2882 | | ...
2883 | | ... | *Example:*
2884 | | ...
2885 | | ... | \| Initialize L2 xconnect with memif pairs \| ${1} \|
2886 | | ...
2887 | | [Arguments] | ${count}=${1}
2888 | | ...
2889 | | ${duts}= | Get Matches | ${nodes} | DUT*
2890 | | :FOR | ${dut} | IN | @{duts}
2891 | | | Initialize L2 xconnect with memif pairs on DUT node | ${dut} | ${count}
2892 | | Set interfaces in path up
2893 | | Show Memif on all DUTs | ${nodes}
2894
2895 | Initialize L2 Bridge Domain with memif pairs on DUT node
2896 | | [Documentation]
2897 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
2898 | | ... | to separate L2 bridge domain with one physical or virtual interface
2899 | | ... | to create a chain accross DUT node.
2900 | | ...
2901 | | ... | *Arguments:*
2902 | | ... | - dut - DUT node. Type: dictionary
2903 | | ... | - count - Number of memif pairs (containers). Type: integer
2904 | | ...
2905 | | ... | *Note:*
2906 | | ... | Socket paths for Memif are defined in following format:
2907 | | ... | - /tmp/memif-\${dut}_VNF\${number}-\${sid}
2908 | | ...
2909 | | ... | *Example:*
2910 | | ...
2911 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
2912 | | ... | \| ${dut} \| ${1} \|
2913 | | ...
2914 | | [Arguments] | ${dut} | ${count}
2915 | | ...
2916 | | ${bd_id2}= | Evaluate | ${count}+1
2917 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
2918 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2}
2919 | | ... | ${bd_id2}
2920 | | :FOR | ${number} | IN RANGE | 1 | ${count}+1
2921 | | | ${sock1}= | Set Variable | memif-${dut}_VNF
2922 | | | ${sock2}= | Set Variable | memif-${dut}_VNF
2923 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
2924 | | | ... | ${sock1} | ${sock2} | ${number} | ${dut}-memif-${number}-if1
2925 | | | ... | ${dut}-memif-${number}-if2 | ${rxq_count_int} | ${rxq_count_int}
2926 | | | ${bd_id2}= | Evaluate | ${number}+1
2927 | | | Add interface to bridge domain | ${nodes['${dut}']}
2928 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
2929 | | | Add interface to bridge domain | ${nodes['${dut}']}
2930 | | | ... | ${${dut}-memif-${number}-if2} | ${bd_id2}
2931
2932 | Initialize L2 Bridge Domain with memif pairs
2933 | | [Documentation]
2934 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2935 | | ... | Memif interface to separate L2 bridge domain with one physical or
2936 | | ... | virtual interface to create a chain accross DUT node.
2937 | | ...
2938 | | ... | *Arguments:*
2939 | | ... | - count - Number of memif pairs (containers). Type: integer
2940 | | ...
2941 | | ... | *Example:*
2942 | | ...
2943 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| ${1} \|
2944 | | ...
2945 | | [Arguments] | ${count}=${1}
2946 | | ...
2947 | | ${duts}= | Get Matches | ${nodes} | DUT*
2948 | | :FOR | ${dut} | IN | @{duts}
2949 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
2950 | | | ... | ${count}
2951 | | Set interfaces in path up
2952 | | Show Memif on all DUTs | ${nodes}
2953
2954 | Initialize IPv4 routing with memif pairs on DUT node
2955 | | [Documentation]
2956 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
2957 | | ... | to separate IPv4 VRF with one physical or virtual interface
2958 | | ... | to create a chain accross DUT node.
2959 | | ...
2960 | | ... | *Arguments:*
2961 | | ... | - dut - DUT node. Type: dictionary
2962 | | ... | - count - Number of memif pairs (containers). Type: integer
2963 | | ...
2964 | | ... | *Note:*
2965 | | ... | Socket paths for Memif are defined in following format:
2966 | | ... | - /tmp/memif-\${dut}_VNF\${number}-\${sid}
2967 | | ...
2968 | | ... | *Example:*
2969 | | ...
2970 | | ... | \| Initialize IPv4 routing with memif pairs on DUT node \
2971 | | ... | \| ${dut} \| ${1} \|
2972 | | ...
2973 | | [Arguments] | ${dut} | ${count}
2974 | | ...
2975 | | @{duts}= | Get Matches | ${nodes} | DUT*
2976 | | ${dut_index}= | Get Index From List | ${duts} | ${dut}
2977 | | ${duts_length}= | Get Length | ${duts}
2978 | | ${last_dut_index}= | Evaluate | ${duts_length} - ${1}
2979 | | ...
2980 | | ${tg_if1_net}= | Set Variable | 10.10.10.0
2981 | | ${tg_if2_net}= | Set Variable | 20.20.20.0
2982 | | ...
2983 | | ${fib_table_1}= | Set Variable | ${10}
2984 | | Run Keyword If | ${fib_table_1} > ${0}
2985 | | ... | Add Fib Table | ${nodes['${dut}']} | ${fib_table_1}
2986 | | ${ip_base_if1}= | Evaluate | ${dut_index} + ${1}
2987 | | ${ip_net_if1}= | Set Variable
2988 | | ... | ${ip_base_if1}.${ip_base_if1}.${ip_base_if1}
2989 | | Vpp Route Add | ${nodes['${dut}']} | ${tg_if1_net} | 24 | vrf=${fib_table_1}
2990 | | ... | gateway=${ip_net_if1}.1 | interface=${${dut}_if1} | multipath=${TRUE}
2991 | | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_if1}
2992 | | ... | ${fib_table_1}
2993 | | Configure IP addresses on interfaces | ${nodes['${dut}']} | ${${dut}_if1}
2994 | | ... | ${ip_net_if1}.2 | 30
2995 | | ${prev_node}= | Run Keyword If | ${dut_index} == ${0}
2996 | | ... | Set Variable | TG
2997 | | ... | ELSE | Get From List | ${duts} | ${dut_index-${1}}
2998 | | ${prev_if}= | Run Keyword If | ${dut_index} == ${0}
2999 | | ... | Set Variable | if1
3000 | | ... | ELSE | Set Variable | if2
3001 | | ${prev_if_mac}= | Get Interface MAC | ${nodes['${prev_node}']}
3002 | | ... | ${${prev_node}_${prev_if}}
3003 | | Add ARP on DUT | ${nodes['${dut}']} | ${${dut}_if1} | ${ip_net_if1}.1
3004 | | ... | ${prev_if_mac}
3005 | | ...
3006 | | ${fib_table_2}= | Evaluate | ${fib_table_1} + ${count}
3007 | | Add Fib Table | ${nodes['${dut}']} | ${fib_table_2}
3008 | | ${ip_base_if2}= | Evaluate | ${ip_base_if1} + ${1}
3009 | | ${ip_net_if2}= | Set Variable
3010 | | ... | ${ip_base_if2}.${ip_base_if2}.${ip_base_if2}
3011 | | Vpp Route Add | ${nodes['${dut}']} | ${tg_if2_net} | 24 | vrf=${fib_table_2}
3012 | | ... | gateway=${ip_net_if2}.2 | interface=${${dut}_if2} | multipath=${TRUE}
3013 | | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_if2}
3014 | | ... | ${fib_table_2}
3015 | | Configure IP addresses on interfaces | ${nodes['${dut}']} | ${${dut}_if2}
3016 | | ... | ${ip_net_if2}.1 | 30
3017 | | ${next_node}= | Run Keyword If | ${dut_index} == ${last_dut_index}
3018 | | ... | Set Variable | TG
3019 | | ... | ELSE | Get From List | ${duts} | ${dut_index+${1}}
3020 | | ${next_if}= | Run Keyword If | ${dut_index} == ${last_dut_index}
3021 | | ... | Set Variable | if2
3022 | | ... | ELSE | Set Variable | if1
3023 | | ${next_if_mac}= | Get Interface MAC | ${nodes['${next_node}']}
3024 | | ... | ${${next_node}_${next_if}}
3025 | | Add ARP on DUT | ${nodes['${dut}']} | ${${dut}_if2} | ${ip_net_if2}.2
3026 | | ... | ${next_if_mac}
3027 | | ...
3028 | | ${fib_table_1}= | Evaluate | ${fib_table_1} - ${1}
3029 | | ${ip_base_start}= | Set Variable | ${31}
3030 | | :FOR | ${number} | IN RANGE | 1 | ${count+${1}}
3031 | | | ${sock1}= | Set Variable | memif-${dut}_VNF
3032 | | | ${sock2}= | Set Variable | memif-${dut}_VNF
3033 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
3034 | | | ... | ${sock1} | ${sock2} | ${number} | ${dut}-memif-${number}-if1
3035 | | | ... | ${dut}-memif-${number}-if2 | ${rxq_count_int} | ${rxq_count_int}
3036 | | | ${memif1}= | Set Variable | ${${dut}-memif-${number}-if1}
3037 | | | ${memif2}= | Set Variable | ${${dut}-memif-${number}-if2}
3038 | | | ${fib_table_1}= | Evaluate | ${fib_table_1} + ${1}
3039 | | | ${fib_table_2}= | Evaluate | ${fib_table_1} + ${1}
3040 | | | Run Keyword Unless | ${number} == ${count}
3041 | | | ... | Add Fib Table | ${nodes['${dut}']} | ${fib_table_2}
3042 | | | Assign Interface To Fib Table | ${nodes['${dut}']}
3043 | | | ... | ${memif1} | ${fib_table_1}
3044 | | | Assign Interface To Fib Table | ${nodes['${dut}']}
3045 | | | ... | ${memif2} | ${fib_table_2}
3046 | | | ${ip_base_memif1}= | Evaluate
3047 | | | ... | ${ip_base_start} + (${number} - ${1}) * ${2}
3048 | | | ${ip_base_memif2}= | Evaluate | ${ip_base_memif1} + ${1}
3049 | | | ${ip_net_memif1}= | Set Variable
3050 | | | ... | ${ip_base_memif1}.${ip_base_memif1}.${ip_base_memif1}
3051 | | | ${ip_net_memif2}= | Set Variable
3052 | | | ... | ${ip_base_memif2}.${ip_base_memif2}.${ip_base_memif2}
3053 | | | Configure IP addresses on interfaces
3054 | | | ... | ${nodes['${dut}']} | ${memif1} | ${ip_net_memif1}.1 | 30
3055 | | | ... | ${nodes['${dut}']} | ${memif2} | ${ip_net_memif2}.1 | 30
3056 | | | Vpp Route Add | ${nodes['${dut}']} | ${tg_if2_net} | 24
3057 | | | ... | vrf=${fib_table_1} | gateway=${ip_net_memif2}.1
3058 | | | ... | interface=${memif1}
3059 | | | Vpp Route Add | ${nodes['${dut}']} | ${tg_if1_net} | 24
3060 | | | ... | vrf=${fib_table_2} | gateway=${ip_net_memif1}.1
3061 | | | ... | interface=${memif2}
3062 | | | ${memif_if1_key}= | Get interface by sw index | ${nodes['${dut}']}
3063 | | | ... | ${memif1}
3064 | | | ${memif_if1_mac}= | Get interface mac | ${nodes['${dut}']}
3065 | | | ... | ${memif_if1_key}
3066 | | | ${memif_if2_key}= | Get interface by sw index | ${nodes['${dut}']}
3067 | | | ... | ${memif2}
3068 | | | ${memif_if2_mac}= | Get interface mac | ${nodes['${dut}']}
3069 | | | ... | ${memif_if2_key}
3070 | | | Add arp on dut | ${nodes['${dut}']} | ${memif1} | ${ip_net_memif2}.1
3071 | | | ... | ${memif_if2_mac}
3072 | | | Add arp on dut | ${nodes['${dut}']} | ${memif2} | ${ip_net_memif1}.1
3073 | | | ... | ${memif_if1_mac}
3074
3075 | Initialize IPv4 routing with memif pairs
3076 | | [Documentation]
3077 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
3078 | | ... | Memif interface to separate IPv4 VRF with one physical or
3079 | | ... | virtual interface to create a chain accross DUT node.
3080 | | ...
3081 | | ... | *Arguments:*
3082 | | ... | - count - Number of memif pairs (containers). Type: integer
3083 | | ...
3084 | | ... | *Example:*
3085 | | ...
3086 | | ... | \| Initialize IPv4 routing with memif pairs \| ${1} \|
3087 | | ...
3088 | | [Arguments] | ${count}=${1}
3089 | | ...
3090 | | ${duts}= | Get Matches | ${nodes} | DUT*
3091 | | :FOR | ${dut} | IN | @{duts}
3092 | | | Initialize IPv4 routing with memif pairs on DUT node | ${dut} | ${count}
3093 | | Set interfaces in path up
3094 | | Show Memif on all DUTs | ${nodes}
3095
3096 | Initialize L2 xconnect for single memif
3097 | | [Documentation]
3098 | | ... | Create single Memif interface on all defined VPP nodes. Cross
3099 | | ... | connect Memif interface with one physical interface.
3100 | | ...
3101 | | ... | *Arguments:*
3102 | | ... | - number - Memif ID. Type: integer
3103 | | ...
3104 | | ... | *Note:*
3105 | | ... | Socket paths for Memif are defined in following format:
3106 | | ... | - /tmp/memif-DUT1_VNF\${number}-\${sid}
3107 | | ...
3108 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
3109 | | ... | and rxqueues to all DUTs
3110 | | ...
3111 | | ... | *Example:*
3112 | | ...
3113 | | ... | \| Initialize L2 xconnect for single memif \| 1 \|
3114 | | ...
3115 | | [Arguments] | ${number}=${1}
3116 | | ...
3117 | | ${duts}= | Get Matches | ${nodes} | DUT*
3118 | | :FOR | ${dut} | IN | @{duts}
3119 | | | ${sock}= | Set Variable | memif-${dut}_VNF
3120 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
3121 | | | ... | ${number} | ${dut}-memif-${number}-if1 | ${rxq_count_int}
3122 | | | ... | ${rxq_count_int}
3123 | | | Configure L2XC | ${nodes['${dut}']} | ${${dut}_if1}
3124 | | | ... | ${${dut}-memif-${number}-if1}
3125 | | Set single interfaces in path up
3126 | | Show Memif on all DUTs | ${nodes}
3127
3128 | Initialize L2 Bridge Domain for single memif
3129 | | [Documentation]
3130 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
3131 | | ... | interface to separate L2 bridge domain with one physical interface.
3132 | | ...
3133 | | ... | *Arguments:*
3134 | | ... | - number - Memif ID. Type: integer
3135 | | ...
3136 | | ... | *Note:*
3137 | | ... | Socket paths for Memif are defined in following format:
3138 | | ... | - /tmp/memif-DUT1_VNF\${number}-\${sid}
3139 | | ...
3140 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
3141 | | ... | and rxqueues to all DUTs
3142 | | ...
3143 | | ... | *Example:*
3144 | | ...
3145 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
3146 | | ...
3147 | | [Arguments] | ${number}=${1}
3148 | | ...
3149 | | ${duts}= | Get Matches | ${nodes} | DUT*
3150 | | :FOR | ${dut} | IN | @{duts}
3151 | | | ${sock}= | Set Variable | memif-${dut}_VNF
3152 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
3153 | | | ... | ${number} | ${dut}-memif-${number}-if1 | ${rxq_count_int}
3154 | | | ... | ${rxq_count_int}
3155 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1}
3156 | | | ... | ${number}
3157 | | | Add interface to bridge domain | ${nodes['${dut}']}
3158 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
3159 | | Set single interfaces in path up
3160 | | Show Memif on all DUTs | ${nodes}
3161
3162 | Configure ACLs on a single interface
3163 | | [Documentation]
3164 | | ... | Configure ACL
3165 | | ...
3166 | | ... | *Arguments:*
3167 | | ... | - dut - DUT node. Type: string
3168 | | ... | - dut_if - DUT node interface name. Type: string
3169 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
3170 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
3171 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
3172 | | ...
3173 | | ... | *Example:*
3174 | | ...
3175 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
3176 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
3177 | | ...
3178 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
3179 | | ... | @{subnets}
3180 | | Set Test variable | ${acl} | ${EMPTY}
3181 | | :FOR | ${subnet} | IN | @{subnets}
3182 | | | ${acl} = | Run Keyword If | '${acl}' == '${EMPTY}'
3183 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
3184 | | | ... | ELSE
3185 | | | ... | Catenate | SEPARATOR=, | ${acl}
3186 | | | ... | ipv4 ${acl_action} src ${subnet}
3187 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
3188 | | @{acl_list} = | Create List | ${0}
3189 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
3190 | | ... | ${acl_list}