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