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