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