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