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