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