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