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