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