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