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