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