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