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