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