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