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