CSIT-778: Add mac-ip binding acl l2bd perf test
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
1 # Copyright (c) 2017 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/ip/ip4.robot
33 | Resource | resources/libraries/robot/ip/ip6.robot
34 | Resource | resources/libraries/robot/vm/qemu.robot
35 | Resource | resources/libraries/robot/l2/tagging.robot
36 | Documentation | Performance suite keywords - configuration.
37
38 *** Keywords ***
39 | Set interfaces in path in 2-node circular topology up
40 | | [Documentation]
41 | | ... | *Set UP state on VPP interfaces in path on nodes in 2-node circular
42 | | ... | topology.*
43 | | ...
44 | | Set Interface State | ${dut1} | ${dut1_if1} | up
45 | | Set Interface State | ${dut1} | ${dut1_if2} | up
46 | | Vpp Node Interfaces Ready Wait | ${dut1}
47
48 | Set interfaces in path in 3-node circular topology up
49 | | [Documentation]
50 | | ... | *Set UP state on VPP interfaces in path on nodes in 3-node circular
51 | | ... | topology.*
52 | | ...
53 | | Set Interface State | ${dut1} | ${dut1_if1} | up
54 | | Set Interface State | ${dut1} | ${dut1_if2} | up
55 | | Set Interface State | ${dut2} | ${dut2_if1} | up
56 | | Set Interface State | ${dut2} | ${dut2_if2} | up
57 | | Vpp Node Interfaces Ready Wait | ${dut1}
58 | | Vpp Node Interfaces Ready Wait | ${dut2}
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 | | VPP Show Crypto Device Mapping | ${dut1}
70 | | VPP Show Crypto Device Mapping | ${dut2}
71 | | Set interfaces in path in 3-node circular topology up
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 Interface State | ${dut1} | ${dut1_if1} | up
79 | | Set Interface State | ${dut1} | ${dut1_if2} | up
80 | | Set Interface State | ${dut2} | ${dut2_if1} | up
81 | | Set Interface State | ${dut2} | ${dut2_if2} | up
82 | | Set Test Variable | ${tg_if1_mac}
83 | | Set Test Variable | ${tg_if2_mac}
84 | | Set Test Variable | ${dut1_if1_mac}
85 | | Set Test Variable | ${dut1_if2_mac}
86 | | Set Test Variable | ${dut2_if1_mac}
87 | | Set Test Variable | ${dut2_if2_mac}
88 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
89 | | ... | ${dut1_if1_ip4} | 24
90 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
91 | | ... | ${dut1_if2_ip4} | 24
92 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
93 | | ... | ${dut2_if1_ip4} | 24
94 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
95 | | ... | ${dut2_if2_ip4} | 24
96 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
97 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_if1_ip4} | ${dut2_if1_mac}
98 | | Add arp on dut | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
99 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_if2_ip4} | ${dut1_if2_mac}
100 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | ${tg_if1_ip4} | ${dut1_if1}
101 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | ${tg_if2_ip4} | ${dut2_if2}
102
103 | Initialize IPv4 forwarding in 3-node circular topology
104 | | [Documentation]
105 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
106 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
107 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
108 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
109 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
110 | | ...
111 | | Set Interface State | ${dut1} | ${dut1_if1} | up
112 | | Set Interface State | ${dut1} | ${dut1_if2} | up
113 | | Set Interface State | ${dut2} | ${dut2_if1} | up
114 | | Set Interface State | ${dut2} | ${dut2_if2} | up
115 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
116 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
117 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
118 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
119 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
120 | | dut1_v4.set_arp | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
121 | | dut2_v4.set_arp | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
122 | | dut2_v4.set_arp | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
123 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.1 | 24
124 | | dut1_v4.set_ip | ${dut1_if2} | 1.1.1.1 | 30
125 | | dut2_v4.set_ip | ${dut2_if1} | 1.1.1.2 | 30
126 | | dut2_v4.set_ip | ${dut2_if2} | 20.20.20.1 | 24
127 | | dut1_v4.set_route | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
128 | | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
129 | | All Vpp Interfaces Ready Wait | ${nodes}
130
131 | Initialize IPv4 forwarding in 2-node circular topology
132 | | [Documentation]
133 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node circular
134 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
135 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
136 | | ... | /30 prefix on DUT1 link. Set routing on DUT node with prefix /24 and
137 | | ... | next hop of neighbour DUT interface IPv4 address.
138 | | ...
139 | | Set Interface State | ${dut1} | ${dut1_if1} | up
140 | | Set Interface State | ${dut1} | ${dut1_if2} | up
141 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
142 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
143 | | dut1_v4.set_arp | ${dut1_if1} | 10.10.10.3 | ${tg1_if1_mac}
144 | | dut1_v4.set_arp | ${dut1_if2} | 20.20.20.3 | ${tg1_if2_mac}
145 | | dut1_v4.set_ip | ${dut1_if1} | 10.10.10.2 | 24
146 | | dut1_v4.set_ip | ${dut1_if2} | 20.20.20.2 | 24
147 | | All Vpp Interfaces Ready Wait | ${nodes}
148
149 | Initialize IPv4 forwarding with scaling in 3-node circular topology
150 | | [Documentation]
151 | | ... | Custom setup of IPv4 topology with scalability of ip routes on all
152 | | ... | DUT nodes in 3-node circular topology
153 | | ...
154 | | ... | *Arguments:*
155 | | ... | - ${count} - IP route count. Type: integer
156 | | ...
157 | | ... | *Return:*
158 | | ... | - No value returned
159 | | ...
160 | | ... | *Example:*
161 | | ...
162 | | ... | \| Initialize IPv4 forwarding with scaling in 3-node circular \
163 | | ... | topology \| 100000 \|
164 | | ...
165 | | [Arguments] | ${count}
166 | | ...
167 | | Set Interface State | ${dut1} | ${dut1_if1} | up
168 | | Set Interface State | ${dut1} | ${dut1_if2} | up
169 | | Set Interface State | ${dut2} | ${dut2_if1} | up
170 | | Set Interface State | ${dut2} | ${dut2_if2} | up
171 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
172 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
173 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
174 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
175 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
176 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
177 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
178 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
179 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
180 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
181 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
182 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
183 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
184 | | ... | count=${count}
185 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
186 | | ... | count=${count}
187 | | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
188 | | ... | count=${count}
189 | | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
190 | | ... | count=${count}
191 | | All Vpp Interfaces Ready Wait | ${nodes}
192
193 | Initialize IPv4 forwarding with vhost in 3-node circular topology
194 | | [Documentation]
195 | | ... | Create vhost-user interfaces in VPP. Set UP state of all VPP
196 | | ... | interfaces in path on nodes in 3-node circular topology. Create 2
197 | | ... | FIB tables on each DUT with multipath routing. Assign pair of
198 | | ... | Physical and Virtual interfaces on both nodes to each FIB table.
199 | | ... | Setup IPv4 addresses with /30 prefix on DUT-TG links and /30 prefix
200 | | ... | on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB tables
201 | | ... | with prefix /24 and next hop of neighbour IPv4 address. Setup
202 | | ... | ARP on all VPP interfaces.
203 | | ...
204 | | ... | *Arguments:*
205 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
206 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
207 | | ...
208 | | ... | _NOTE:_ This KW uses following test case variables:
209 | | ... | - ${dut1} - DUT1 node.
210 | | ... | - ${dut2} - DUT2 node.
211 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
212 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
213 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
214 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
215 | | ...
216 | | ... | *Return:*
217 | | ... | - No value returned
218 | | ...
219 | | ... | *Example:*
220 | | ...
221 | | ... | \| IPv4 forwarding with vhost initialized in a 3-node circular \
222 | | ... | topology \| /tmp/sock1 \| /tmp/sock2 \|
223 | | ...
224 | | [Arguments] | ${sock1} | ${sock2}
225 | | ...
226 | | Set interfaces in path in 3-node circular topology up
227 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
228 | | ... | ${sock1} | ${sock2} | dut1_vhost_if1 | dut1_vhost_if2
229 | | ${dut1_vif1}= | Set Variable | ${dut1_vhost_if1}
230 | | ${dut1_vif2}= | Set Variable | ${dut1_vhost_if2}
231 | | Set Interface State | ${dut1} | ${dut1_vif1} | up
232 | | Set Interface State | ${dut1} | ${dut1_vif2} | up
233 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
234 | | ... | ${sock1} | ${sock2} | dut2_vhost_if1 | dut2_vhost_if2
235 | | ${dut2_vif1}= | Set Variable | ${dut2_vhost_if1}
236 | | ${dut2_vif2}= | Set Variable | ${dut2_vhost_if2}
237 | | Set Interface State | ${dut2} | ${dut2_vif1} | up
238 | | Set Interface State | ${dut2} | ${dut2_vif2} | up
239 | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif1}
240 | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_vif2}
241 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
242 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
243 | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif1}
244 | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_vif2}
245 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
246 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
247 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
248 | | ... | via 4.4.4.2 sw_if_index ${dut1_vif1_idx} multipath
249 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
250 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
251 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
252 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
253 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
254 | | ... | via 5.5.5.2 sw_if_index ${dut1_vif2_idx} multipath
255 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
256 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
257 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
258 | | ... | via 4.4.4.1 sw_if_index ${dut2_vif1_idx} multipath
259 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
260 | | ... | via 5.5.5.2 sw_if_index ${dut2_vif2_idx} multipath
261 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
262 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
263 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
264 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif1} | ${fib_table_1}
265 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
266 | | Assign Interface To Fib Table | ${dut1} | ${dut1_vif2} | ${fib_table_2}
267 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
268 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif1} | ${fib_table_1}
269 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
270 | | Assign Interface To Fib Table | ${dut2} | ${dut2_vif2} | ${fib_table_2}
271 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
272 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
273 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_vif1} | 4.4.4.1 | 30
274 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_vif2} | 5.5.5.1 | 30
275 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
276 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
277 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_vif1} | 4.4.4.1 | 30
278 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_vif2} | 5.5.5.1 | 30
279 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
280 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
281 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
282 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
283 | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
284 | | ... | ${dut1_vif1_idx}
285 | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
286 | | ... | ${dut1_vif2_idx}
287 | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
288 | | ... | ${dut2_vif1_idx}
289 | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
290 | | ... | ${dut2_vif2_idx}
291 | | Set Test Variable | ${dut1_vif1_mac}
292 | | Set Test Variable | ${dut1_vif2_mac}
293 | | Set Test Variable | ${dut2_vif1_mac}
294 | | Set Test Variable | ${dut2_vif2_mac}
295 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
296 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
297 | | Add arp on dut | ${dut1} | ${dut1_vif1} | 4.4.4.2 | 52:54:00:00:04:01
298 | | Add arp on dut | ${dut1} | ${dut1_vif2} | 5.5.5.2 | 52:54:00:00:04:02
299 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
300 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
301 | | Add arp on dut | ${dut2} | ${dut2_vif1} | 4.4.4.2 | 52:54:00:00:04:01
302 | | Add arp on dut | ${dut2} | ${dut2_vif2} | 5.5.5.2 | 52:54:00:00:04:02
303 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut1_vif1}
304 | | ... | vrf=${fib_table_1}
305 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
306 | | ... | vrf=${fib_table_1}
307 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
308 | | ... | vrf=${fib_table_2}
309 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut1_vif2}
310 | | ... | vrf=${fib_table_2}
311 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 4.4.4.2 | ${dut2_vif1}
312 | | ... | vrf=${fib_table_1}
313 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
314 | | ... | vrf=${fib_table_1}
315 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
316 | | ... | vrf=${fib_table_2}
317 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 5.5.5.2 | ${dut2_vif2}
318 | | ... | vrf=${fib_table_2}
319
320 | Initialize IPv4 forwarding with vhost for '${nr}' VMs in 3-node circular topology
321 | | [Documentation]
322 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
323 | | ... | VPP nodes. Set UP state of all VPP interfaces in path. Create ${nr}+1
324 | | ... | FIB tables on each DUT with multipath routing. Assign each Virtual
325 | | ... | interface to FIB table with Physical interface or Virtual interface on
326 | | ... | both nodes. Setup IPv4 addresses with /30 prefix on DUT-TG links and
327 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on all DUT nodes in all FIB
328 | | ... | tables with prefix /24 and next hop of neighbour IPv4 address. Setup
329 | | ... | ARP on all VPP interfaces.
330 | | ...
331 | | ... | *Arguments:*
332 | | ... | _None_
333 | | ...
334 | | ... | *Note:*
335 | | ... | Socket paths for VM are defined in following format:
336 | | ... | - /tmp/sock-${VM_ID}-1
337 | | ... | - /tmp/sock-${VM_ID}-2
338 | | ...
339 | | ... | *Return:*
340 | | ... | - No value returned
341 | | ...
342 | | ... | *Example:*
343 | | ...
344 | | ... | \| IPv4 forwarding with Vhost-User for '2' VMs initialized in \
345 | | ... | a 3-node circular topology \|
346 | | ...
347 | | Set interfaces in path in 3-node circular topology up
348 | | ${fib_table_1}= | Set Variable | ${101}
349 | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nr}
350 | | ${dut1_if1_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if1}
351 | | ${dut1_if2_idx}= | Get Interface SW Index | ${dut1} | ${dut1_if2}
352 | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_1}
353 | | ... | via 1.1.1.2 sw_if_index ${dut1_if1_idx} multipath
354 | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_2}
355 | | ... | via 2.2.2.2 sw_if_index ${dut1_if2_idx} multipath
356 | | ${dut2_if1_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if1}
357 | | ${dut2_if2_idx}= | Get Interface SW Index | ${dut2} | ${dut2_if2}
358 | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_1}
359 | | ... | via 2.2.2.1 sw_if_index ${dut2_if1_idx} multipath
360 | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_2}
361 | | ... | via 3.3.3.2 sw_if_index ${dut2_if2_idx} multipath
362 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
363 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
364 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
365 | | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
366 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
367 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
368 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
369 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.1 | 30
370 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
371 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
372 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
373 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
374 | | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
375 | | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
376 | | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
377 | | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.2 | ${tg1_if2_mac}
378 | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut1_if1}
379 | | ... | vrf=${fib_table_1}
380 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 2.2.2.2 | ${dut1_if2}
381 | | ... | vrf=${fib_table_2}
382 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 2.2.2.1 | ${dut2_if1}
383 | | ... | vrf=${fib_table_1}
384 | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | 3.3.3.2 | ${dut2_if2}
385 | | ... | vrf=${fib_table_2}
386 | | ${ip_base_start}= | Set Variable | ${4}
387 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
388 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
389 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
390 | | | ${fib_table_1}= | Evaluate | ${100}+${number}
391 | | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
392 | | | ${ip_base_vif1}= | Evaluate | ${ip_base_start}+(${number}-1)*2
393 | | | ${ip_base_vif2}= | Evaluate | ${ip_base_vif1}+1
394 | | | ${ip_net_vif1}= | Set Variable
395 | | | ... | ${ip_base_vif1}.${ip_base_vif1}.${ip_base_vif1}
396 | | | ${ip_net_vif2}= | Set Variable
397 | | | ... | ${ip_base_vif2}.${ip_base_vif2}.${ip_base_vif2}
398 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
399 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
400 | | | ... | dut1-vhost-${number}-if2
401 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
402 | | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
403 | | | ${dut1_vif1_idx}= | Get Interface SW Index | ${dut1}
404 | | | ... | ${dut1-vhost-${number}-if1}
405 | | | ${dut1_vif2_idx}= | Get Interface SW Index | ${dut1}
406 | | | ... | ${dut1-vhost-${number}-if2}
407 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
408 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
409 | | | ... | dut2-vhost-${number}-if2
410 | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if1} | up
411 | | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if2} | up
412 | | | ${dut2_vif1_idx}= | Get Interface SW Index | ${dut2}
413 | | | ... | ${dut2-vhost-${number}-if1}
414 | | | ${dut2_vif2_idx}= | Get Interface SW Index | ${dut2}
415 | | | ... | ${dut2-vhost-${number}-if2}
416 | | | Add fib table | ${dut1} | 20.20.20.0 | 24 | ${fib_table_1}
417 | | | ... | via ${ip_net_vif1}.1 sw_if_index ${dut1_vif1_idx} multipath
418 | | | Add fib table | ${dut1} | 10.10.10.0 | 24 | ${fib_table_2}
419 | | | ... | via ${ip_net_vif2}.2 sw_if_index ${dut1_vif2_idx} multipath
420 | | | Add fib table | ${dut2} | 20.20.20.0 | 24 | ${fib_table_1}
421 | | | ... | via ${ip_net_vif1}.1 sw_if_index ${dut2_vif1_idx} multipath
422 | | | Add fib table | ${dut2} | 10.10.10.0 | 24 | ${fib_table_2}
423 | | | ... | via ${ip_net_vif2}.2 sw_if_index ${dut2_vif2_idx} multipath
424 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
425 | | | ... | ${fib_table_1}
426 | | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
427 | | | ... | ${fib_table_2}
428 | | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if1}
429 | | | ... | ${fib_table_1}
430 | | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if2}
431 | | | ... | ${fib_table_2}
432 | | | Configure IP addresses on interfaces
433 | | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
434 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
435 | | | ... | ${dut2} | ${dut2-vhost-${number}-if1} | ${ip_net_vif1}.1 | 30
436 | | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${ip_net_vif2}.1 | 30
437 | | | ${dut1_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
438 | | | ... | ${dut1_vif1_idx}
439 | | | ${dut1_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut1}
440 | | | ... | ${dut1_vif2_idx}
441 | | | ${dut2_vif1_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
442 | | | ... | ${dut2_vif1_idx}
443 | | | ${dut2_vif2_mac}= | Get Vhost User Mac By Sw Index | ${dut2}
444 | | | ... | ${dut2_vif2_idx}
445 | | | Set Test Variable | ${dut1-vhost-${number}-if1_mac}
446 | | | ... | ${dut1_vif1_mac}
447 | | | Set Test Variable | ${dut1-vhost-${number}-if2_mac}
448 | | | ... | ${dut1_vif2_mac}
449 | | | Set Test Variable | ${dut2-vhost-${number}-if1_mac}
450 | | | ... | ${dut2_vif1_mac}
451 | | | Set Test Variable | ${dut2-vhost-${number}-if2_mac}
452 | | | ... | ${dut2_vif2_mac}
453 | | | ${qemu_id}= | Set Variable If | ${number} < 10 | 0${number}
454 | | | ... | ${number}
455 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if1}
456 | | | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
457 | | | Add arp on dut | ${dut1} | ${dut1-vhost-${number}-if2}
458 | | | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
459 | | | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if1}
460 | | | ... | ${ip_net_vif1}.2 | 52:54:00:00:${qemu_id}:01
461 | | | Add arp on dut | ${dut2} | ${dut2-vhost-${number}-if2}
462 | | | ... | ${ip_net_vif2}.2 | 52:54:00:00:${qemu_id}:02
463 | | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
464 | | | ... | ${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
465 | | | Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
466 | | | ... | ${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
467 | | | Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | ${ip_net_vif1}.2
468 | | | ... | ${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
469 | | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | ${ip_net_vif2}.2
470 | | | ... | ${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
471
472 | Initialize IPv4 policer 2r3c-${t} in 3-node circular topology
473 | | [Documentation]
474 | | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
475 | | ... | on all DUT nodes in 3-node circular topology. Policer is applied on
476 | | ... | links TG - DUT1 and DUT2 - TG.
477 | | ...
478 | | ${dscp}= | DSCP AF22
479 | | Policer Set Name | policer1
480 | | Policer Set CIR | ${cir}
481 | | Policer Set EIR | ${eir}
482 | | Policer Set CB | ${cb}
483 | | Policer Set EB | ${eb}
484 | | Policer Set Rate Type pps
485 | | Policer Set Round Type Closest
486 | | Policer Set Type 2R3C 2698
487 | | Policer Set Conform Action Transmit
488 | | Policer Set Exceed Action Mark and Transmit | ${dscp}
489 | | Policer Set Violate Action Transmit
490 | | Policer Enable Color Aware
491 | | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
492 | | Policer Classify Set Precolor Exceed
493 | | Policer Set Node | ${dut1}
494 | | Policer Classify Set Interface | ${dut1_if1}
495 | | Policer Classify Set Match IP | 20.20.20.2 | ${False}
496 | | Policer Set Configuration
497 | | Policer Set Node | ${dut2}
498 | | Policer Classify Set Interface | ${dut2_if2}
499 | | Policer Classify Set Match IP | 10.10.10.2 | ${False}
500 | | Policer Set Configuration
501
502 | Initialize IPv6 forwarding in 3-node circular topology
503 | | [Documentation]
504 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
505 | | ... | topology. Get the interface MAC addresses and setup neighbour on all
506 | | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all
507 | | ... | interfaces. Set routing on both DUT nodes with prefix /64 and
508 | | ... | next hop of neighbour DUT interface IPv6 address.
509 | | ...
510 | | ${prefix}= | Set Variable | 64
511 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
512 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
513 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
514 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
515 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix}
516 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix}
517 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix}
518 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix}
519 | | Suppress ICMPv6 router advertisement message | ${nodes}
520 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
521 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
522 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac}
523 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac}
524 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
525 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
526
527 | Initialize IPv6 forwarding with scaling in 3-node circular topology
528 | | [Documentation]
529 | | ... | Custom setup of IPv6 topology with scalability of ip routes on all
530 | | ... | DUT nodes in 3-node circular topology
531 | | ...
532 | | ... | *Arguments:*
533 | | ... | - ${count} - IP route count. Type: integer
534 | | ...
535 | | ... | *Return:*
536 | | ... | - No value returned
537 | | ...
538 | | ... | *Example:*
539 | | ...
540 | | ... | \| Initialize IPv6 forwarding with scaling in 3-node circular \
541 | | ... | topology \| 100000 \|
542 | | ...
543 | | [Arguments] | ${count}
544 | | ...
545 | | ${subn_prefix}= | Set Variable | 64
546 | | ${host_prefix}= | Set Variable | 128
547 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
548 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
549 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
550 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
551 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
552 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
553 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
554 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
555 | | Suppress ICMPv6 router advertisement message | ${nodes}
556 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
557 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
558 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
559 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
560 | | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
561 | | ... | interface=${dut1_if2} | count=${count}
562 | | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
563 | | ... | interface=${dut1_if1} | count=${count}
564 | | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
565 | | ... | interface=${dut2_if1} | count=${count}
566 | | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
567 | | ... | interface=${dut2_if2} | count=${count}
568
569 | Initialize IPv6 iAcl whitelist in 3-node circular topology
570 | | [Documentation]
571 | | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
572 | | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
573 | | ...
574 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
575 | | ... | ${dut1} | ip6 | dst
576 | | And Vpp Configures Classify Session L3
577 | | ... | ${dut1} | permit | ${table_idx} | ${skip_n} | ${match_n}
578 | | ... | ip6 | dst | 2001:2::2
579 | | And Vpp Enable Input Acl Interface
580 | | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
581 | | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
582 | | ... | ${dut2} | ip6 | dst
583 | | And Vpp Configures Classify Session L3
584 | | ... | ${dut2} | permit | ${table_idx} | ${skip_n} | ${match_n}
585 | | ... | ip6 | dst | 2001:1::2
586 | | And Vpp Enable Input Acl Interface
587 | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
588
589 | Initialize L2 xconnect in 3-node circular topology
590 | | [Documentation]
591 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
592 | | ... | each DUT. Interfaces are brought up.
593 | | ... |
594 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
595 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
596 | | All Vpp Interfaces Ready Wait | ${nodes}
597
598 | Initialize L2 xconnect with VXLANoIPv4 in 3-node circular topology
599 | | [Documentation]
600 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
601 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
602 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
603 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
604 | | ... | interfaces.
605 | | ...
606 | | Set interfaces in path in 3-node circular topology up
607 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
608 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
609 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
610 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
611 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
612 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
613 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
614 | | ... | 172.16.0.1 | 172.16.0.2
615 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
616 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
617 | | ... | 172.16.0.2 | 172.16.0.1
618 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
619
620 | Initialize L2 xconnect with Vhost-User in 3-node circular topology
621 | | [Documentation]
622 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
623 | | ... | connect each Vhost interface with one physical interface.
624 | | ...
625 | | ... | *Arguments:*
626 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
627 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
628 | | ...
629 | | ... | _NOTE:_ This KW uses following test case variables:
630 | | ... | - ${dut1} - DUT1 node.
631 | | ... | - ${dut2} - DUT2 node.
632 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
633 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
634 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
635 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
636 | | ...
637 | | ... | *Example:*
638 | | ...
639 | | ... | \| L2 xconnect with Vhost-User initialized in a 3-node \
640 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \|
641 | | ...
642 | | [Arguments] | ${sock1} | ${sock2}
643 | | ...
644 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
645 | | ... | ${sock1} | ${sock2} | dut1_vhost_if1 | dut1_vhost_if2
646 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_vhost_if1}
647 | | Configure L2XC | ${dut1} | ${dut1_if2} | ${dut1_vhost_if2}
648 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
649 | | ... | ${sock1} | ${sock2} | dut2_vhost_if1 | dut2_vhost_if2
650 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_vhost_if1}
651 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2_vhost_if2}
652
653 | Initialize L2 xconnect with Vhost-User for '${nr}' in 3-node circular topology
654 | | [Documentation]
655 | | ... | Create pairs of Vhost-User interfaces on all defined VPP nodes. Cross
656 | | ... | connect each Vhost interface with one physical interface or virtual
657 | | ... | interface to create a chain accross DUT node.
658 | | ...
659 | | ... | *Arguments:*
660 | | ... | _None_
661 | | ...
662 | | ... | *Note:*
663 | | ... | Socket paths for VM are defined in following format:
664 | | ... | - /tmp/sock-${VM_ID}-1
665 | | ... | - /tmp/sock-${VM_ID}-2
666 | | ...
667 | | ... | *Example:*
668 | | ...
669 | | ... | \| L2 xconnect with Vhost-User for '2' initialized in a 3-node \
670 | | ... | circular topology \|
671 | | ...
672 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
673 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
674 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
675 | | | ${prev_index}= | Evaluate | ${number}-1
676 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
677 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
678 | | | ... | dut1-vhost-${number}-if2
679 | | | ${dut1_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut1_if1}
680 | | | ... | ${dut1-vhost-${prev_index}-if2}
681 | | | Configure L2XC | ${dut1} | ${dut1_xconnect_if1}
682 | | | ... | ${dut1-vhost-${number}-if1}
683 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
684 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
685 | | | ... | dut2-vhost-${number}-if2
686 | | | ${dut2_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut2_if1}
687 | | | ... | ${dut2-vhost-${prev_index}-if2}
688 | | | Configure L2XC | ${dut2} | ${dut2_xconnect_if1}
689 | | | ... | ${dut2-vhost-${number}-if1}
690 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
691 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${dut1_if2}
692 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
693 | | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${dut2_if2}
694
695 | Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology
696 | | [Documentation]
697 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
698 | | ... | connect each Vhost interface with one physical interface.
699 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
700 | | ...
701 | | ... | *Arguments:*
702 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
703 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
704 | | ... | - subid - ID of the sub-interface to be created. Type: string
705 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
706 | | ...
707 | | ... | *Example:*
708 | | ...
709 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
710 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
711 | | ...
712 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
713 | | ...
714 | | Set interfaces in path in 3-node circular topology up
715 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
716 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
717 | | Configure L2 tag rewrite method on interfaces
718 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
719 | | ... | ${tag_rewrite}
720 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
721 | | ... | ${sock1} | ${sock2}
722 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
723 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
724 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
725 | | ... | ${sock1} | ${sock2}
726 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
727 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
728
729 | Initialize L2 bridge domain in 3-node circular topology
730 | | [Documentation]
731 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
732 | | ... | that is created automatically with index 1. Learning is enabled.
733 | | ... | Interfaces are brought up.
734 | | ...
735 | | ... | *Arguments:*
736 | | ... | - bd_id - Bridge domain ID. Type: integer
737 | | ...
738 | | ... | *Example:*
739 | | ...
740 | | ... | \| Initialize L2 bridge domain in 3-node circular topology \| 1 \|
741 | | ...
742 | | [Arguments] | ${bd_id}=${1}
743 | | ...
744 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
745 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
746 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
747 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
748 | | All Vpp Interfaces Ready Wait | ${nodes}
749
750 | Configure IPv4 ACLs
751 | | [Documentation]
752 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
753 | | ... | hitting ACEs for both traffic directions.
754 | | ...
755 | | ... | *Arguments:*
756 | | ... | - dut_node - DUT node. Type: dictionary
757 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
758 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
759 | | ...
760 | | ... | *Example:*
761 | | ...
762 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
763 | | ... | \| GigabitEthernet0/8/0 \|
764 | | ...
765 | | ... | _NOTE:_ This KW uses following test case variables:
766 | | ... | - ${src_ip_start} - Source IP address start. Type: string
767 | | ... | - ${dst_ip_start} - Destination IP address start. Type: string
768 | | ... | - ${ip_step} - IP address step. Type: string
769 | | ... | - ${sport_start} - Source port number start. Type: string
770 | | ... | - ${dport_start} - Destination port number start. Type: string
771 | | ... | - ${port_step} - Port number step. Type: string
772 | | ... | - ${no_hit_aces_number} - Number of not-hitting ACEs to be configured.
773 | | ... | Type: integer
774 | | ... | - ${acl_apply_type} - To what path apply the ACL - input or output.
775 | | ... | Type: string
776 | | ... | - ${acl_action} - Action for the rule - deny, permit, permit+reflect.
777 | | ... | Type: string
778 | | ... | - ${trex_stream1_subnet} - IP subnet used by T-Rex in direction 0->1.
779 | | ... | Type: string
780 | | ... | - ${trex_stream2_subnet} - IP subnet used by T-Rex in direction 1->0.
781 | | ... | Type: string
782 | | ...
783 | | [Arguments] | ${dut} | ${dut_if1}=${None} | ${dut_if2}=${None}
784 | | ${src_ip_int} = | Evaluate
785 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
786 | | ... | modules=ipaddress
787 | | ${dst_ip_int} = | Evaluate
788 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
789 | | ... | modules=ipaddress
790 | | ${ip_limit} = | Set Variable | 255.255.255.255
791 | | ${ip_limit_int} = | Evaluate
792 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
793 | | ${sport}= | Evaluate | $sport_start - $port_step
794 | | ${dport}= | Evaluate | $dport_start - $port_step
795 | | ${port_limit}= | Set Variable | ${65535}
796 | | ${acl}= | Set Variable | ipv4 permit
797 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
798 | |      | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
799 | |      | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
800 | |      | ${sport}= | Evaluate | $sport + $port_step
801 | |      | ${dport}= | Evaluate | $dport + $port_step
802 | |      | ${ipv4_limit_reached}= | Set Variable If
803 | |      | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
804 | |      | ... | ${True}
805 | |      | ${udp_limit_reached}= | Set Variable If
806 | |      | ... | $sport > $port_limit or $dport > $port_limit | ${True}
807 | |      | Run Keyword If | $ipv4_limit_reached is True | Log
808 | |      | ... | Can't do more iterations - IPv4 address limit has been reached.
809 | |      | ... | WARN
810 | |      | Run Keyword If | $udp_limit_reached is True | Log
811 | |      | ... | Can't do more iterations - UDP port limit has been reached.
812 | |      | ... | WARN
813 | |      | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
814 | |      | ... | Set Variable | ${ip_limit}
815 | |      | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
816 | |      | ... | modules=ipaddress
817 | |      | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
818 | |      | ... | Set Variable | ${ip_limit}
819 | |      | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
820 | |      | ... | modules=ipaddress
821 | |      | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
822 | |      | ... | ${sport}
823 | |      | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
824 | |      | ... | ${dport}
825 | |      | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
826 | |      | ... | sport ${sport} | dport ${dport},
827 | |      | Exit For Loop If
828 | |      | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
829 | | ${acl}= | Catenate | ${acl}
830 | | ...     | ipv4 ${acl_action} src ${trex_stream1_subnet},
831 | | ...     | ipv4 ${acl_action} src ${trex_stream2_subnet}
832 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
833 | | @{acl_list}= | Create List | ${0}
834 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
835 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
836 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
837 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
838 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
839 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
840 | | ... | ${acl_list}
841 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
842 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
843 | | ... | ${acl_list}
844
845 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
846 | | [Documentation]
847 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
848 | | ... | domain that is created automatically with index 1. Learning is
849 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
850 | | ... | interfaces.
851 | | ...
852 | | ... | *Arguments:*
853 | | ... | _None_
854 | | ...
855 | | ... | *Example:*
856 | | ...
857 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
858 | | ... | circular topology \|
859 | | ...
860 | | ... | _NOTE:_ This KW uses following test case variables:
861 | | ... | - ${dut1} - DUT1 node.
862 | | ... | - ${dut2} - DUT2 node.
863 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
864 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
865 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
866 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
867 | | ...
868 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
869 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
870 | | All Vpp Interfaces Ready Wait | ${nodes}
871 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
872
873 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in 3-node circular topology
874 | | [Documentation]
875 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
876 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
877 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
878 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
879 | | ... | prefix /24 and next hops of neighbour DUT interface IPv4 address.
880 | | ... | Apply required ACL rules to DUT1 interfaces.
881 | | ...
882 | | ... | *Arguments:*
883 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
884 | | ...
885 | | ... | *Example:*
886 | | ...
887 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
888 | | ... | in 3-node circular topology \|
889 | | ...
890 | | ... | _NOTE:_ This KW uses following test case variables:
891 | | ... | - ${dut1} - DUT1 node.
892 | | ... | - ${dut2} - DUT2 node.
893 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
894 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
895 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
896 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
897 | | ...
898 | | Set Interface State | ${dut1} | ${dut1_if1} | up
899 | | Set Interface State | ${dut1} | ${dut1_if2} | up
900 | | Set Interface State | ${dut2} | ${dut2_if1} | up
901 | | Set Interface State | ${dut2} | ${dut2_if2} | up
902 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
903 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
904 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
905 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
906 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
907 | | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.${number}
908 | | | ... | ${tg1_if1_mac}
909 | | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.${number}
910 | | | ... | ${tg1_if2_mac}
911 | | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
912 | | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
913 | | Configure IP addresses on interfaces
914 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
915 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
916 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
917 | | ... | ${dut2} | ${dut2_if2} | 20.20.20.1 | 24
918 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
919 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
920 | | All Vpp Interfaces Ready Wait | ${nodes}
921 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
922
923 | Configure MACIP ACLs
924 | | [Documentation]
925 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
926 | | ... | plus two hitting ACEs for both traffic directions.
927 | | ...
928 | | ... | *Arguments:*
929 | | ... | - dut_node - DUT node. Type: dictionary
930 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
931 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
932 | | ...
933 | | ... | *Example:*
934 | | ...
935 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
936 | | ... | \| GigabitEthernet0/8/0 \|
937 | | ...
938 | | ... | _NOTE:_ This KW uses following test case variables:
939 | | ... | - ${src_ip_start} - Source IP address start. Type: string
940 | | ... | - ${ip_step} - IP address step. Type: string
941 | | ... | - ${src_mac_start} - Source MAC address start in format with colons.
942 | | ... | Type: string
943 | | ... | - ${src_mac_step} - Source MAC address step. Type: string
944 | | ... | - ${src_mac_mask} - Source MAC address mask. 00:00:00:00:00:00 is a
945 | | ... | wildcard mask. Type: string
946 | | ... | - ${no_hit_aces_number} - Number of not-hitting ACEs to be configured.
947 | | ... | Type: integer
948 | | ... | - ${acl_action} - Action for the rule - deny, permit, permit+reflect.
949 | | ... | Type: string
950 | | ... | - ${tg_stream1_subnet} - IP subnet used by TG in direction 0->1.
951 | | ... | Type: string
952 | | ... | - ${tg_stream2_subnet} - IP subnet used by TG in direction 1->0.
953 | | ... | Type: string
954 | | ... | - ${tg_stream1_mac} - Source MAC address of traffic stream 1.
955 | | ... | Type: string
956 | | ... | - ${tg_stream2_mac} - Source MAC address of traffic stream 2.
957 | | ... | Type: string
958 | | ... | - ${tg_mac_mask} - MAC address mask for traffic streams.
959 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
960 | | ...
961 | | [Arguments] | ${dut} | ${dut_if1}=${None} | ${dut_if2}=${None}
962 | | ...
963 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
964 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
965 | | ...
966 | | ${ip_limit} = | Set Variable | 255.255.255.255
967 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
968 | | ...
969 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
970 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
971 | | ...
972 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
973 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
974 | | ...
975 | | ${acl}= | Set Variable | ipv4 permit
976 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
977 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
978 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
979 | | | ${ipv4_limit_reached}= | Set Variable If
980 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
981 | | | ${mac_limit_reached}= | Set Variable If
982 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
983 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
984 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
985 | | | ... | WARN
986 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
987 | | | ... | Can't do more iterations - MAC address limit has been reached.
988 | | | ... | WARN
989 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
990 | | | ... | Set Variable | ${ip_limit}
991 | | | ... | ELSE | Int To IP | ${src_ip_int}
992 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
993 | | | ... | Set Variable | ${mac_limit}
994 | | | ... | ELSE | Int To Mac | ${src_mac_int}
995 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
996 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
997 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
998 | | ${acl0}= | Catenate | ${acl}
999 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
1000 | | ... | mask ${tg_mac_mask}
1001 | | ${acl1}= | Catenate | ${acl}
1002 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
1003 | | ... | mask ${tg_mac_mask}
1004 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
1005 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
1006 | | ${acl_idx}= | Set Variable | 0
1007 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
1008 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
1009 | | ${acl_idx}= | Set Variable | 1
1010 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
1011 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
1012
1013 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
1014 | | [Documentation]
1015 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1016 | | ... | domain that is created automatically with index 1. Learning is
1017 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
1018 | | ... | DUT1 interfaces.
1019 | | ...
1020 | | ... | *Arguments:*
1021 | | ... | _None_
1022 | | ...
1023 | | ... | *Example:*
1024 | | ...
1025 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
1026 | | ... | circular topology \|
1027 | | ...
1028 | | ... | _NOTE 1:_ This KW uses following test case variables:
1029 | | ... | - ${tg} - TG node.
1030 | | ... | - ${dut1} - DUT1 node.
1031 | | ... | - ${dut2} - DUT2 node.
1032 | | ... | - ${tg_if1} - TG interface towards DUT1.
1033 | | ... | - ${tg_if2} - TG interface towards DUT2.
1034 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1035 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1036 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1037 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1038 | | ...
1039 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1040 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1041 | | All Vpp Interfaces Ready Wait | ${nodes}
1042 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1043
1044 | Initialize L2 bridge domains with Vhost-User in 3-node circular topology
1045 | | [Documentation]
1046 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1047 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1048 | | ... | with physical inteface.
1049 | | ...
1050 | | ... | *Arguments:*
1051 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1052 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1053 | | ... | - sock1 - Sock path for the first Vhost-User interface. Type: string
1054 | | ... | - sock2 - Sock path for the second Vhost-User interface. Type: string
1055 | | ...
1056 | | ... | _NOTE:_ This KW uses following test case variables:
1057 | | ... | - ${dut1} - DUT1 node.
1058 | | ... | - ${dut2} - DUT2 node.
1059 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1060 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1061 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1062 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1063 | | ...
1064 | | ... | *Example:*
1065 | | ...
1066 | | ... | \| L2 bridge domains with Vhost-User initialized in a 3-node \
1067 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1068 | | ...
1069 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1070 | | ...
1071 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1072 | | ... | ${sock1} | ${sock2} | dut1_vhost_if1 | dut1_vhost_if2
1073 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1074 | | Add interface to bridge domain | ${dut1} | ${dut1_vhost_if1} | ${bd_id1}
1075 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1076 | | Add interface to bridge domain | ${dut1} | ${dut1_vhost_if2} | ${bd_id2}
1077 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1078 | | ... | ${sock1} | ${sock2} | dut2_vhost_if1 | dut2_vhost_if2
1079 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id1}
1080 | | Add interface to bridge domain | ${dut2} | ${dut2_vhost_if1} | ${bd_id1}
1081 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1082 | | Add interface to bridge domain | ${dut2} | ${dut2_vhost_if2} | ${bd_id2}
1083
1084 | Initialize L2 bridge domains with Vhost-User for '${nr}' VMs in 3-node circular topology
1085 | | [Documentation]
1086 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
1087 | | ... | defined VPP nodes. Add each Vhost-User interface into L2 bridge
1088 | | ... | domains with learning enabled with physical inteface or Vhost-User
1089 | | ... | interface of another VM.
1090 | | ...
1091 | | ... | *Arguments:*
1092 | | ... | _None_
1093 | | ...
1094 | | ... | *Note:*
1095 | | ... | Socket paths for VM are defined in following format:
1096 | | ... | - /tmp/sock-${VM_ID}-1
1097 | | ... | - /tmp/sock-${VM_ID}-2
1098 | | ...
1099 | | ... | *Example:*
1100 | | ...
1101 | | ... | \| L2 bridge domains with Vhost-User for '2' VMs initialized in \
1102 | | ... | a 3-node circular topology \|
1103 | | ...
1104 | | ${bd_id2}= | Evaluate | ${nr}+1
1105 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${1}
1106 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1107 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${1}
1108 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1109 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1110 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1111 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1112 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1113 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
1114 | | | ... | dut1-vhost-${number}-if2
1115 | | | ${bd_id2}= | Evaluate | ${number}+1
1116 | | | Add interface to bridge domain | ${dut1}
1117 | | | ... | ${dut1-vhost-${number}-if1} | ${number}
1118 | | | Add interface to bridge domain | ${dut1}
1119 | | | ... | ${dut1-vhost-${number}-if2} | ${bd_id2}
1120 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1121 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
1122 | | | ... | dut2-vhost-${number}-if2
1123 | | | Add interface to bridge domain | ${dut2}
1124 | | | ... | ${dut2-vhost-${number}-if1} | ${number}
1125 | | | Add interface to bridge domain | ${dut2}
1126 | | | ... | ${dut2-vhost-${number}-if2} | ${bd_id2}
1127
1128 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
1129 | | [Documentation]
1130 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
1131 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
1132 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
1133 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
1134 | | ... | interfaces.
1135 | | ...
1136 | | Set interfaces in path in 3-node circular topology up
1137 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1138 | | ... | 24
1139 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1140 | | ... | 24
1141 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1142 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1143 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1144 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1145 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1146 | | ... | 172.16.0.1 | 172.16.0.2
1147 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1148 | | ... | 172.16.0.2 | 172.16.0.1
1149 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1150 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1151 | | All Vpp Interfaces Ready Wait | ${nodes}
1152
1153 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
1154 | | [Documentation]
1155 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1156 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1157 | | ... | with physical inteface.
1158 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1159 | | ... | interfaces on each DUT. All interfaces are brought up.
1160 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1161 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1162 | | ...
1163 | | ... | *Arguments:*
1164 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1165 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1166 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1167 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1168 | | ...
1169 | | ... | *Example:*
1170 | | ...
1171 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1172 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1173 | | ...
1174 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1175 | | ...
1176 | | Set interfaces in path in 3-node circular topology up
1177 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1178 | | ... | 24
1179 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1180 | | ... | 24
1181 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1182 | | ... | 172.16.0.1 | 172.16.0.2
1183 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1184 | | ... | 172.16.0.2 | 172.16.0.1
1185 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1186 | | ... | ${sock1} | ${sock2}
1187 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1188 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1189 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1190 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1191 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1192 | | ... | ${sock1} | ${sock2}
1193 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1194 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1195 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1196 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1197
1198 | Initialize L2 bridge domains with Vhost-User in 2-node circular topology
1199 | | [Documentation]
1200 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1201 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1202 | | ... | with physical inteface.
1203 | | ...
1204 | | ... | *Arguments:*
1205 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1206 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1207 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1208 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1209 | | ...
1210 | | ... | *Example:*
1211 | | ...
1212 | | ... | \| L2 bridge domains with Vhost-User initialized in a 2-node \
1213 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1214 | | ...
1215 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1216 | | ...
1217 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1218 | | ... | ${sock1} | ${sock2}
1219 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1220 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1221 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1222 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1223
1224 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in a 3-node circular topology
1225 | | [Documentation]
1226 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN
1227 | | ... | between DUTs by connecting physical and vlan interfaces on each DUT.
1228 | | ... | All interfaces are brought up.
1229 | | ...
1230 | | ... | *Arguments:*
1231 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1232 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1233 | | ... | - subid - ID of the sub-interface to be created. Type: string
1234 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1235 | | ...
1236 | | ... | _NOTE:_ This KW uses following test case variables:
1237 | | ... | - ${dut1} - DUT1 node.
1238 | | ... | - ${dut2} - DUT2 node.
1239 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1240 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1241 | | ...
1242 | | ... | *Example:*
1243 | | ...
1244 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
1245 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
1246 | | ...
1247 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1248 | | ...
1249 | | Set interfaces in path in 3-node circular topology up
1250 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1251 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1252 | | Configure L2 tag rewrite method on interfaces
1253 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1254 | | ... | ${tag_rewrite}
1255 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1256 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
1257 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id2}
1258 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1259 | | All Vpp Interfaces Ready Wait | ${nodes}
1260
1261 | Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology
1262 | | [Documentation]
1263 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1264 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1265 | | ... | with physical inteface.
1266 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
1267 | | ...
1268 | | ... | *Arguments:*
1269 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1270 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1271 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1272 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1273 | | ... | - subid - ID of the sub-interface to be created. Type: string
1274 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1275 | | ...
1276 | | ... | *Example:*
1277 | | ...
1278 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
1279 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10\
1280 | | ... | pop-1 \|
1281 | | ...
1282 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1283 | | ... | ${tag_rewrite}
1284 | | ...
1285 | | Set interfaces in path in 3-node circular topology up
1286 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1287 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1288 | | Configure L2 tag rewrite method on interfaces
1289 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1290 | | ... | ${tag_rewrite}
1291 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1292 | | ... | ${sock1} | ${sock2}
1293 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1294 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1295 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1296 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1297 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1298 | | ... | ${sock1} | ${sock2}
1299 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1300 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1301 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1302 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1303
1304 | Add PCI devices to DUTs in 3-node single link topology
1305 | | [Documentation]
1306 | | ... | Add PCI devices to VPP configuration file.
1307 | | ...
1308 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1309 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1310 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
1311 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
1312 | | Run keyword | DUT1.Add DPDK Dev | ${dut1_if1_pci} | ${dut1_if2_pci}
1313 | | Run keyword | DUT2.Add DPDK Dev | ${dut2_if1_pci} | ${dut2_if2_pci}
1314
1315 | Add PCI devices to DUTs in 2-node single link topology
1316 | | [Documentation]
1317 | | ... | Add PCI devices to VPP configuration file.
1318 | | ...
1319 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
1320 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
1321 | | Run keyword | DUT1.Add DPDK Dev | ${dut1_if1_pci} | ${dut1_if2_pci}
1322
1323 | Configure guest VM with dpdk-testpmd connected via vhost-user
1324 | | [Documentation]
1325 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1326 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1327 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1328 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1329 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1330 | | ...
1331 | | ... | *Arguments:*
1332 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1333 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1334 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1335 | | ... | - vm_name - QemuUtil instance name. Type: string
1336 | | ... | - skip - Number of cpus which will be skipped. Type: integer
1337 | | ... | - count - Number of cpus which will be allocated for qemu.
1338 | | ... | Type: integer
1339 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1340 | | ... | Type: integer
1341 | | ...
1342 | | ... | *Example:*
1343 | | ...
1344 | | ... | \| Configure guest VM with dpdk-testpmd connected via vhost-user \
1345 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1346 | | ... | \| ${5} \|
1347 | | ... | \| Configure guest VM with dpdk-testpmd connected via vhost-user \
1348 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1349 | | ... | \| qemu_id=${2} \|
1350 | | ...
1351 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1352 | | ... | ${count}=${5} | ${qemu_id}=${1}
1353 | | ...
1354 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1355 | | ... | WITH NAME | ${vm_name}
1356 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1357 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1358 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1359 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1360 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1361 | | ... | ${dut1_if1} | ${dut1_if2}
1362 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1363 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1364 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1365 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1366 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1367 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1368 | | ... | ${True}
1369 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1370 | | ... | force_install=${True} | apply_patch=${apply_patch}
1371 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1372 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1373 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1374 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1375 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1376 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1377 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1378 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
1379 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1380 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1381 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1382 | | Return From Keyword | ${vm}
1383
1384 | Configure '${nr}' guest VMs with dpdk-testpmd connected via vhost-user in 3-node circular topology
1385 | | [Documentation]
1386 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1387 | | ... | DPDK testpmd for defined number of VMs on all defined VPP nodes.
1388 | | ...
1389 | | ... | *Arguments:*
1390 | | ... | _None_
1391 | | ...
1392 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1393 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1394 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1395 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1396 | | ...
1397 | | ... | *Example:*
1398 | | ...
1399 | | ... | \| Configure '2' guest VMs with dpdk-testpmd connected via vhost-user \
1400 | | ... | in 3-node circular topology \|
1401 | | ...
1402 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1403 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1404 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1405 | | | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1406 | | | ${vm1}= | Configure guest VM with dpdk-testpmd connected via vhost-user
1407 | | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1408 | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1409 | | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1410 | | | ${vm2}= | Configure guest VM with dpdk-testpmd connected via vhost-user
1411 | | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1412 | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1413 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1414 | | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
1415 | | | ... | ${True}
1416
1417 | Configure guest VM with dpdk-testpmd using SMT connected via vhost-user
1418 | | [Documentation]
1419 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1420 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1421 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1422 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1423 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1424 | | ...
1425 | | ... | *Arguments:*
1426 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1427 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1428 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1429 | | ... | - vm_name - QemuUtil instance name. Type: string
1430 | | ... | - skip - number of cpus which will be skipped. Type: int
1431 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1432 | | ...
1433 | | ... | *Example:*
1434 | | ...
1435 | | ... | \| Configure guest VM with dpdk-testpmd using SMT connected via \
1436 | | ... | vhost-user \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1437 | | ... | \| ${6} \| ${5} \|
1438 | | ...
1439 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1440 | | ... | ${count}=${5}
1441 | | ...
1442 | | Import Library | resources.libraries.python.QemuUtils
1443 | | ... | WITH NAME | ${vm_name}
1444 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1445 | | ... | ${dut1_if1} | ${dut1_if2}
1446 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1447 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1448 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1449 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1450 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1451 | | ... | ${True}
1452 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1453 | | ... | force_install=${True} | apply_patch=${apply_patch}
1454 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1455 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1456 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1457 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1458 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1459 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1460 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1461 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
1462 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1463 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${True}
1464 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1465 | | Return From Keyword | ${vm}
1466
1467 | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
1468 | | [Documentation]
1469 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1470 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1471 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1472 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1473 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1474 | | ...
1475 | | ... | *Arguments:*
1476 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1477 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1478 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1479 | | ... | - vm_name - QemuUtil instance name. Type: string
1480 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1481 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1482 | | ... | - skip - number of cpus which will be skipped. Type: integer
1483 | | ... | - count - number of cpus which will be allocated for qemu.
1484 | | ... | Type: integer
1485 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1486 | | ... | Type: integer
1487 | | ...
1488 | | ... | *Example:*
1489 | | ...
1490 | | ... | \| Configure guest VM with dpdk-testpmd-mac connected via vhost-user \
1491 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1492 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1493 | | ... | \| Configure guest VM with dpdk-testpmd-mac connected via vhost-user \
1494 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1495 | | ... | \| 00:00:00:00:02:01 \| 00:00:00:00:02:02 \| ${6} \| ${5} \
1496 | | ... | \| qemu_id=${2} \|
1497 | | ...
1498 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1499 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1500 | | ... | ${qemu_id}=${1}
1501 | | ...
1502 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1503 | | ... | WITH NAME | ${vm_name}
1504 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1505 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1506 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1507 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1508 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1509 | | ... | ${dut1_if1} | ${dut1_if2}
1510 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1511 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1512 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1513 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1514 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1515 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1516 | | ... | ${True}
1517 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1518 | | ... | force_install=${True} | apply_patch=${apply_patch}
1519 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1520 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1521 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1522 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1523 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1524 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1525 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1526 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
1527 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1528 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1529 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1530 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1531 | | Return From Keyword | ${vm}
1532
1533 | Configure '${nr}' guest VMs with dpdk-testpmd-mac connected via vhost-user in 3-node circular topology
1534 | | [Documentation]
1535 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1536 | | ... | DPDK testpmd with fwd mode set to mac rewrite for defined number of
1537 | | ... | VMs on all defined VPP nodes.
1538 | | ...
1539 | | ... | *Arguments:*
1540 | | ... | _None_
1541 | | ...
1542 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1543 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1544 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1545 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1546 | | ...
1547 | | ... | *Example:*
1548 | | ...
1549 | | ... | \| Configure '2' guest VMs with dpdk-testpmd-mac connected via vhost-user \
1550 | | ... | in 3-node circular topology \|
1551 | | ...
1552 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1553 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1554 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1555 | | | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1556 | | | ${vm1}=
1557 | | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
1558 | | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1559 | | | ... | ${dut1-vhost-${number}-if1_mac}
1560 | | | ... | ${dut1-vhost-${number}-if2_mac} | skip=${skip_cpus}
1561 | | | ... | count=${vm_cpus} | qemu_id=${number}
1562 | | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1563 | | | ${vm2}=
1564 | | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
1565 | | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1566 | | | ... | ${dut2-vhost-${number}-if1_mac}
1567 | | | ... | ${dut2-vhost-${number}-if2_mac} | skip=${skip_cpus}
1568 | | | ... | count=${vm_cpus} | qemu_id=${number}
1569 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1570 | | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
1571 | | | ... | ${True}
1572
1573 | Configure guest VM with dpdk-testpmd-mac using SMT connected via vhost-user
1574 | | [Documentation]
1575 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1576 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1577 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1578 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1579 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
1580 | | ...
1581 | | ... | *Arguments:*
1582 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1583 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1584 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1585 | | ... | - vm_name - QemuUtil instance name. Type: string
1586 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
1587 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
1588 | | ... | - skip - number of cpus which will be skipped. Type: int
1589 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1590 | | ...
1591 | | ... | *Example:*
1592 | | ...
1593 | | ... | \| Configure guest VM with dpdk-testpmd-mac using SMT connected via \
1594 | | ... | vhost-user \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM\
1595 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
1596 | | ...
1597 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
1598 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
1599 | | ...
1600 | | Import Library | resources.libraries.python.QemuUtils
1601 | | ... | WITH NAME | ${vm_name}
1602 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1603 | | ... | ${dut1_if1} | ${dut1_if2}
1604 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1605 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1606 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1607 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1608 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1609 | | ... | ${True}
1610 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1611 | | ... | force_install=${True} | apply_patch=${apply_patch}
1612 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1613 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1614 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1615 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1616 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1617 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1618 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1619 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
1620 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
1621 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
1622 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${True}
1623 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1624 | | Return From Keyword | ${vm}
1625
1626 | Configure guest VM with linux bridge connected via vhost-user
1627 | | [Documentation]
1628 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1629 | | ... | linux bridge. Qemu Guest uses 2048M.
1630 | | ...
1631 | | ... | *Arguments:*
1632 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1633 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1634 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1635 | | ... | - vm_name - QemuUtil instance name. Type: string
1636 | | ... | - skip - number of cpus which will be skipped. Type: int
1637 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1638 | | ...
1639 | | ... | *Example:*
1640 | | ...
1641 | | ... | \| Configure guest VM with linux bridge connected via vhost-user \
1642 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1643 | | ... | \| ${5} \|
1644 | | ...
1645 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1646 | | ... | ${count}=${5}
1647 | | ...
1648 | | Import Library | resources.libraries.python.QemuUtils
1649 | | ... | WITH NAME | ${vm_name}
1650 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1651 | | ... | ${dut1_if1} | ${dut1_if2}
1652 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1653 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
1654 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1655 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1656 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1657 | | ... | ${True}
1658 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1659 | | ... | force_install=${True} | apply_patch=${apply_patch}
1660 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1661 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1662 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1663 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1664 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1665 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1666 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1667 | | ${br}= | Set Variable | br0
1668 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1669 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1670 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1671 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1672 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1673 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1674 | | Return From Keyword | ${vm}
1675
1676 | Configure guest VM with linux bridge using SMT connected via vhost-user
1677 | | [Documentation]
1678 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1679 | | ... | linux bridge. Qemu Guest uses 2048M.
1680 | | ...
1681 | | ... | *Arguments:*
1682 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1683 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1684 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1685 | | ... | - vm_name - QemuUtil instance name. Type: string
1686 | | ... | - skip - number of cpus which will be skipped. Type: int
1687 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1688 | | ...
1689 | | ... | *Example:*
1690 | | ...
1691 | | ... | \| Guest VM with Linux Bridge using SMT connected via vhost-user is \
1692 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1693 | | ... | \| ${6}\| ${5} \|
1694 | | ...
1695 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1696 | | ... | ${count}=${5}
1697 | | ...
1698 | | Import Library | resources.libraries.python.QemuUtils
1699 | | ... | WITH NAME | ${vm_name}
1700 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1701 | | ... | ${dut1_if1} | ${dut1_if2}
1702 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1703 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True}
1704 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1705 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1706 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1707 | | ... | ${True}
1708 | | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node}
1709 | | ... | force_install=${True} | apply_patch=${apply_patch}
1710 | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin}
1711 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1712 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1713 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1714 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1715 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1716 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1717 | | ${br}= | Set Variable | br0
1718 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
1719 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
1720 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
1721 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
1722 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
1723 | | Set Interface State | ${vm} | ${br} | up | if_type=name
1724 | | Return From Keyword | ${vm}
1725
1726 | Initialize LISP IPv4 forwarding in 3-node circular topology
1727 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1728 | | ... | Don`t set route.
1729 | | ...
1730 | | ... | *Arguments:*
1731 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1732 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1733 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1734 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1735 | | ... | -${duts_prefix} - ip prefix. Type: int
1736 | | ...
1737 | | ... | *Return:*
1738 | | ... | - No value returned
1739 | | ...
1740 | | ... | *Example:*
1741 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
1742 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1743 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1744 | | ...
1745 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1746 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1747 | | ...
1748 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1749 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1750 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1751 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1752 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1753 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1754 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1755 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1756 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1757 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
1758 | | ... | ${dut2_if1_mac}
1759 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
1760 | | ... | ${dut1_if2_mac}
1761 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1762 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
1763 | | ... | ${dut1_tg_address} | ${duts_prefix}
1764 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
1765 | | ... | ${dut1_dut2_address} | ${duts_prefix}
1766 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
1767 | | ... | ${dut2_dut1_address} | ${duts_prefix}
1768 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
1769 | | ... | ${dut2_tg_address} | ${duts_prefix}
1770 | | All Vpp Interfaces Ready Wait | ${nodes}
1771
1772 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
1773 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
1774 | | ...
1775 | | ... | *Arguments:*
1776 | | ... | -${encr_alg} - Encryption algorithm. Type: string
1777 | | ... | -${auth_alg} - Authentication algorithm. Type: string
1778 | | ...
1779 | | ... | *Return:*
1780 | | ... | - No value returned
1781 | | ...
1782 | | ... | *Example:*
1783 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
1784 | | ... | \| ${encr_alg} \| ${auth_alg}
1785 | | ...
1786 | | [Arguments] | ${encr_alg} | ${auth_alg}
1787 | | ...
1788 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
1789 | | Initialize LISP IPv4 forwarding in 3-node circular topology
1790 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
1791 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
1792 | | Configure LISP GPE topology in 3-node circular topology
1793 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
1794 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
1795 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
1796 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
1797 | | Configure manual keyed connection for IPSec
1798 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
1799 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
1800 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
1801 | | Configure manual keyed connection for IPSec
1802 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
1803 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
1804 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
1805
1806 | Initialize LISP IPv6 forwarding in 3-node circular topology
1807 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1808 | | ... | Don`t set route.
1809 | | ...
1810 | | ... | *Arguments:*
1811 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
1812 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1813 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
1814 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
1815 | | ... | -${duts_prefix} - ip prefix. Type: int
1816 | | ...
1817 | | ... | *Return:*
1818 | | ... | - No value returned
1819 | | ...
1820 | | ... | *Example:*
1821 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
1822 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1823 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1824 | | ...
1825 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1826 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1827 | | ...
1828 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1829 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1830 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1831 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1832 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
1833 | | ... | ${prefix}
1834 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
1835 | | ... | ${prefix}
1836 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
1837 | | ... | ${prefix}
1838 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
1839 | | ... | ${prefix}
1840 | | Suppress ICMPv6 router advertisement message | ${nodes}
1841 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1842 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1843 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
1844 | | ... | ${dut2_if1_mac}
1845 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
1846 | | ... | ${dut1_if2_mac}
1847
1848 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
1849 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1850 | | ... | Don`t set route.
1851 | | ...
1852 | | ... | *Arguments:*
1853 | | ... | - ${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
1854 | | ... | Type: string
1855 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1856 | | ... | - ${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
1857 | | ... | Type: string
1858 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
1859 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1860 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1861 | | ...
1862 | | ... | *Return:*
1863 | | ... | - No value returned
1864 | | ...
1865 | | ... | *Example:*
1866 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1867 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1868 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1869 | | ... | \| ${prefix4} \| ${prefix6} \|
1870 | | ...
1871 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1872 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1873 | | ... | ${prefix4} | ${prefix6}
1874 | | ...
1875 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1876 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1877 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1878 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1879 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1880 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1881 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1882 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1883 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
1884 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
1885 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
1886 | | ... | ${prefix6}
1887 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
1888 | | ... | ${prefix6}
1889 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
1890 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
1891 | | Suppress ICMPv6 router advertisement message | ${nodes}
1892 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
1893 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
1894 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
1895 | | ... | ${dut2_if1_mac}
1896 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
1897 | | ... | ${dut1_if2_mac}
1898
1899 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
1900 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1901 | | ... | Don`t set route.
1902 | | ...
1903 | | ... | *Arguments:*
1904 | | ... | - ${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
1905 | | ... | Type: string
1906 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1907 | | ... | - ${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
1908 | | ... | Type: string
1909 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
1910 | | ... | - ${prefix4} - IPv4 prefix. Type: int
1911 | | ... | - ${prefix6} - IPv6 prefix. Type: int
1912 | | ...
1913 | | ... | *Return:*
1914 | | ... | - No value returned
1915 | | ...
1916 | | ... | *Example:*
1917 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1918 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1919 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1920 | | ... | \| ${prefix6} \| ${prefix4} \|
1921 | | ...
1922 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1923 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1924 | | ... | ${prefix6} | ${prefix4}
1925 | | ...
1926 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1927 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1928 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1929 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1930 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1931 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1932 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1933 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1934 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
1935 | | ... | ${prefix6}
1936 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
1937 | | ... | ${dut1_dut2_ip4_address} | ${prefix4}
1938 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
1939 | | ... | ${dut2_dut1_ip4_address} | ${prefix4}
1940 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
1941 | | ... | ${prefix6}
1942 | | Suppress ICMPv6 router advertisement message | ${nodes}
1943 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
1944 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
1945 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address}
1946 | | ... | ${dut2_if1_mac}
1947 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address}
1948 | | ... | ${dut1_if2_mac}
1949
1950 | Initialize NAT44 in 3-node circular topology
1951 | | [Documentation] | Initialization of 3-node topology with NAT44 between DUTs:
1952 | | ... | - set interfaces up
1953 | | ... | - set IP addresses
1954 | | ... | - set ARP
1955 | | ... | - create routes
1956 | | ... | - set NAT44 - only on DUT1
1957 | | ...
1958 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1959 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1960 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1961 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1962 | | All Vpp Interfaces Ready Wait | ${nodes}
1963 | | ...
1964 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
1965 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
1966 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
1967 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 12.0.0.1 | 20
1968 | | ...
1969 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1970 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1971 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1972 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1973 | | ...
1974 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
1975 | | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
1976 | | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
1977 | | Add arp on dut | ${dut2} | ${dut2_if2} | 12.0.0.2 | ${tg_if2_mac}
1978 | | ...
1979 | | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | 11.0.0.2 | ${dut1_if2}
1980 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | 10.0.0.2 | ${dut1_if1}
1981 | | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | 12.0.0.2 | ${dut2_if2}
1982 | | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | 11.0.0.1 | ${dut2_if1}
1983 | | ...
1984 | | Configure inside and outside interfaces
1985 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
1986 | | Configure deterministic mode for NAT44
1987 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
1988
1989 | Initialize L2 xconnect for '${nr}' memif pairs in 3-node circular topology
1990 | | [Documentation]
1991 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Cross
1992 | | ... | connect each Memif interface with one physical interface or virtual
1993 | | ... | interface to create a chain accross DUT node.
1994 | | ...
1995 | | ... | *Arguments:*
1996 | | ... | _None_
1997 | | ...
1998 | | ... | *Note:*
1999 | | ... | Socket paths for Memif are defined in following format:
2000 | | ... | - /tmp/memif-${number}-1
2001 | | ... | - /tmp/memif-${number}-2
2002 | | ...
2003 | | ... | *Example:*
2004 | | ...
2005 | | ... | \| Initialize L2 xconnect for 1 Memif in 3-node circular topology \|
2006 | | ...
2007 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2008 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2009 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2010 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2011 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
2012 | |      | ${sock1}= | Set Variable | /tmp/memif-DUT1_VNF${number}-1
2013 | |      | ${sock2}= | Set Variable | /tmp/memif-DUT1_VNF${number}-2
2014 | |      | ${prev_index}= | Evaluate | ${number}-1
2015 | |      | Set up memif interfaces on DUT node | ${dut1}
2016 | |      | ... | ${sock1} | ${sock2} | ${number} | dut1-memif-${number}-if1
2017 | |      | ... | dut1-memif-${number}-if2
2018 | |      | ${dut1_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut1_if1}
2019 | |      | ... | ${dut1-memif-${prev_index}-if2}
2020 | |      | Configure L2XC | ${dut1} | ${dut1_xconnect_if1}
2021 | |      | ... | ${dut1-memif-${number}-if1}
2022 | |      | ${sock1}= | Set Variable | /tmp/memif-DUT2_VNF${number}-1
2023 | |      | ${sock2}= | Set Variable | /tmp/memif-DUT2_VNF${number}-2
2024 | |      | Set up memif interfaces on DUT node | ${dut2}
2025 | |      | ... | ${sock1} | ${sock2} | ${number} | dut2-memif-${number}-if1
2026 | |      | ... | dut2-memif-${number}-if2
2027 | |      | ${dut2_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut2_if1}
2028 | |      | ... | ${dut2-memif-${prev_index}-if2}
2029 | |      | Configure L2XC | ${dut2} | ${dut2_xconnect_if1}
2030 | |      | ... | ${dut2-memif-${number}-if1}
2031 | |      | Run Keyword If | ${number}==${nr} | Configure L2XC
2032 | |      | ... | ${dut1} | ${dut1-memif-${number}-if2} | ${dut1_if2}
2033 | |      | Run Keyword If | ${number}==${nr} | Configure L2XC
2034 | |      | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2}
2035
2036 | Initialize L2 Bridge Domain for '${nr}' memif pairs in 3-node circular topology
2037 | | [Documentation]
2038 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2039 | | ... | Memif interface to separate L2 bridge domain with one physical or
2040 | | ... | virtual interface to create a chain accross DUT node.
2041 | | ...
2042 | | ... | *Arguments:*
2043 | | ... | _None_
2044 | | ...
2045 | | ... | *Note:*
2046 | | ... | Socket paths for Memif are defined in following format:
2047 | | ... | - /tmp/memif-${number}-1
2048 | | ... | - /tmp/memif-${number}-2
2049 | | ...
2050 | | ... | *Example:*
2051 | | ...
2052 | | ... | \| Initialize L2 Bridge Domain for '1' memif pairs in 3-node circular\
2053 | | ... | topology \|
2054 | | ...
2055 | | ${bd_id2}= | Evaluate | ${nr}+1
2056 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${1}
2057 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
2058 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${1}
2059 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
2060 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
2061 | | | ${sock1}= | Set Variable | /tmp/memif-DUT1_VNF${number}-1
2062 | | | ${sock2}= | Set Variable | /tmp/memif-DUT1_VNF${number}-2
2063 | | | Set up memif interfaces on DUT node | ${dut1}
2064 | | | ... | ${sock1} | ${sock2} | ${number} | dut1-memif-${number}-if1
2065 | | | ... | dut1-memif-${number}-if2
2066 | | | ${bd_id2}= | Evaluate | ${number}+1
2067 | | | Add interface to bridge domain | ${dut1}
2068 | | | ... | ${dut1-memif-${number}-if1} | ${number}
2069 | | | Add interface to bridge domain | ${dut1}
2070 | | | ... | ${dut1-memif-${number}-if2} | ${bd_id2}
2071 | | | ${sock1}= | Set Variable | /tmp/memif-DUT2_VNF${number}-1
2072 | | | ${sock2}= | Set Variable | /tmp/memif-DUT2_VNF${number}-2
2073 | | | Set up memif interfaces on DUT node | ${dut2}
2074 | | | ... | ${sock1} | ${sock2} | ${number} | dut2-memif-${number}-if1
2075 | | | ... | dut2-memif-${number}-if2
2076 | | | Add interface to bridge domain | ${dut2}
2077 | | | ... | ${dut2-memif-${number}-if1} | ${number}
2078 | | | Add interface to bridge domain | ${dut2}
2079 | | | ... | ${dut2-memif-${number}-if2} | ${bd_id2}