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