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