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