CSIT-1142 2-node topology - keywords
[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 2-node circular topology
100 | | [Documentation]
101 | | ... | Set UP state on VPP interfaces in path on nodes in 2-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 link. Set routing on DUT node with prefix /24 and
105 | | ... | 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 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
110 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
111 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
112 | | Add arp on dut | ${dut1} | ${dut1_if2} | 20.20.20.2 | ${tg1_if2_mac}
113 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
114 | | ... | 10.10.10.1 | 24
115 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
116 | | ... | 20.20.20.1 | 24
117 | | All Vpp Interfaces Ready Wait | ${nodes}
118
119 | Initialize IPv4 forwarding in 3-node circular topology
120 | | [Documentation]
121 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
122 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
123 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
124 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
125 | | ... | prefix /24 and next hop of neighbour DUT interface IPv4 address.
126 | | ...
127 | | Set Interface State | ${dut1} | ${dut1_if1} | up
128 | | Set Interface State | ${dut1} | ${dut1_if2} | up
129 | | Set Interface State | ${dut2} | ${dut2_if1} | up
130 | | Set Interface State | ${dut2} | ${dut2_if2} | up
131 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
132 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
133 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
134 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
135 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
136 | | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
137 | | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
138 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
139 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
140 | | ... | 10.10.10.1 | 24
141 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
142 | | ... | 1.1.1.1 | 30
143 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
144 | | ... | 1.1.1.2 | 30
145 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
146 | | ... | 20.20.20.1 | 24
147 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
148 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
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 # Configure SRv6 for direction0
639 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
640 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
641 | | ... | Create List | ${dut2_sid1}
642 | | ... | ELSE IF | "${n}" == "2"
643 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
644 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
645 | | ... | @{sid_list_dir0}
646 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
647 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
648 | | Run Keyword If | "${n}" == "1"
649 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
650 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
651 | | Run Keyword If | "${n}" == "2"
652 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
653 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
654 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
655 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
656 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
657 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
658 | | ... | ${tg_if2_ip6_subnet}2 | ${dut2_if2}
659 # Configure SRv6 for direction1
660 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
661 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
662 | | ... | Create List | ${dut1_sid2}
663 | | ... | ELSE IF | "${n}" == "2"
664 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
665 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
666 | | ... | @{sid_list_dir1}
667 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
668 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
669 | | Run Keyword If | "${n}" == "1"
670 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
671 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
672 | | Run Keyword If | "${n}" == "2"
673 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
674 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
675 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
676 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
677 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
678 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
679 | | ... | ${tg_if1_ip6_subnet}2 | ${dut1_if1}
680
681 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
682 | | [Documentation]
683 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
684 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
685 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
686 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
687 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
688 | | ... | routes on both DUT nodes.
689 | | ...
690 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
691 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
692 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
693 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
694 | | ${sock1}= | Set Variable | memif-DUT1_VNF
695 | | ${sock2}= | Set Variable | memif-DUT2_VNF
696 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
697 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq} | ${rxq}
698 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
699 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq} | ${rxq}
700 | | ${duts}= | Get Matches | ${nodes} | DUT*
701 | | :FOR | ${dut} | IN | @{duts}
702 | | | Show Memif | ${nodes['${dut}']}
703 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
704 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
705 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if1}
706 | | ... | ${dut1-memif-1-if1_ip6} | ${prefix}
707 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1-memif-1-if2}
708 | | ... | ${dut1-memif-1-if2_ip6} | ${prefix}
709 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
710 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
711 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if1}
712 | | ... | ${dut2-memif-1-if1_ip6} | ${prefix}
713 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2-memif-1-if2}
714 | | ... | ${dut2-memif-1-if2_ip6} | ${prefix}
715 | | Suppress ICMPv6 router advertisement message | ${nodes}
716 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
717 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
718 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2
719 | | ... | ${tg1_if1_mac}
720 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2
721 | | ... | ${tg1_if2_mac}
722 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
723 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
724 | | Add Ip Neighbor | ${dut1} | ${dut1-memif-1-if1} | ${dut1_nh}
725 | | ... | ${dut1-memif-1-if2_mac}
726 | | Add Ip Neighbor | ${dut2} | ${dut2-memif-1-if1} | ${dut2_nh}
727 | | ... | ${dut2-memif-1-if2_mac}
728 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix} | ${dut2_if1_ip6}
729 | | ... | ${dut1_if2}
730 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
731 | | ... | ${tg_if1_ip6_subnet}2 | ${dut1_if1}
732 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix} | ${dut1_if2_ip6}
733 | | ... | ${dut2_if1}
734 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
735 | | ... | ${tg_if2_ip6_subnet}2 | ${dut2_if2}
736 # Configure SRv6 for direction0 on DUT1
737 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
738 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
739 | | ... | ${out_sid1_2}
740 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
741 | | ... | @{sid_list_dir0}
742 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
743 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
744 # Configure SRv6 for direction1 on DUT2
745 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
746 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
747 | | ... | ${out_sid2_2}
748 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
749 | | ... | @{sid_list_dir1}
750 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
751 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
752 # Configure SRv6 for direction0 on DUT2
753 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
754 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
755 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
756 | | Run Keyword If | "${behavior}" == "static_proxy"
757 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
758 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
759 | | ... | ${dut1_sid1} | @{sid_list_dir0}
760 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
761 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
762 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
763 | | ... | ELSE IF | "${behavior}" == "masquerading"
764 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
765 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
766 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
767 # Configure SRv6 for direction1 on DUT1
768 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
769 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
770 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
771 | | Run Keyword If | "${behavior}" == "static_proxy"
772 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
773 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
774 | | ... | ${dut2_sid2} | @{sid_list_dir1}
775 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
776 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
777 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
778 | | ... | ELSE IF | "${behavior}" == "masquerading"
779 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
780 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
781 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
782 | | All Vpp Interfaces Ready Wait | ${nodes}
783
784 | Initialize L2 xconnect in 2-node circular topology
785 | | [Documentation]
786 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
787 | | ... | each DUT. Interfaces are brought up.
788 | | ...
789 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
790 | | All Vpp Interfaces Ready Wait | ${nodes}
791
792 | Initialize L2 xconnect in 3-node circular topology
793 | | [Documentation]
794 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
795 | | ... | each DUT. Interfaces are brought up.
796 | | ... |
797 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
798 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
799 | | All Vpp Interfaces Ready Wait | ${nodes}
800
801 | Initialize L2 xconnect with VXLANoIPv4 in 3-node circular topology
802 | | [Documentation]
803 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
804 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
805 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
806 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
807 | | ... | interfaces.
808 | | ...
809 | | Set interfaces in path in 3-node circular topology up
810 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
811 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
812 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
813 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
814 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
815 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
816 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
817 | | ... | 172.16.0.1 | 172.16.0.2
818 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
819 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
820 | | ... | 172.16.0.2 | 172.16.0.1
821 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
822
823 | Initialize L2 xconnect with Vhost-User in 3-node circular topology
824 | | [Documentation]
825 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
826 | | ... | connect each Vhost interface with one physical interface.
827 | | ...
828 | | ... | *Arguments:*
829 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
830 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
831 | | ...
832 | | ... | _NOTE:_ This KW uses following test case variables:
833 | | ... | - ${dut1} - DUT1 node.
834 | | ... | - ${dut2} - DUT2 node.
835 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
836 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
837 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
838 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
839 | | ...
840 | | ... | *Example:*
841 | | ...
842 | | ... | \| L2 xconnect with Vhost-User initialized in a 3-node \
843 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \|
844 | | ...
845 | | [Arguments] | ${sock1} | ${sock2}
846 | | ...
847 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
848 | | ... | ${sock1} | ${sock2} | dut1_vhost_if1 | dut1_vhost_if2
849 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_vhost_if1}
850 | | Configure L2XC | ${dut1} | ${dut1_if2} | ${dut1_vhost_if2}
851 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
852 | | ... | ${sock1} | ${sock2} | dut2_vhost_if1 | dut2_vhost_if2
853 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_vhost_if1}
854 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2_vhost_if2}
855
856 | Initialize L2 xconnect with Vhost-User for '${nr}' in 3-node circular topology
857 | | [Documentation]
858 | | ... | Create pairs of Vhost-User interfaces on all defined VPP nodes. Cross
859 | | ... | connect each Vhost interface with one physical interface or virtual
860 | | ... | interface to create a chain accross DUT node.
861 | | ...
862 | | ... | *Arguments:*
863 | | ... | _None_
864 | | ...
865 | | ... | *Note:*
866 | | ... | Socket paths for VM are defined in following format:
867 | | ... | - /tmp/sock-${VM_ID}-1
868 | | ... | - /tmp/sock-${VM_ID}-2
869 | | ...
870 | | ... | *Example:*
871 | | ...
872 | | ... | \| L2 xconnect with Vhost-User for '2' initialized in a 3-node \
873 | | ... | circular topology \|
874 | | ...
875 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
876 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
877 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
878 | | | ${prev_index}= | Evaluate | ${number}-1
879 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
880 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
881 | | | ... | dut1-vhost-${number}-if2
882 | | | ${dut1_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut1_if1}
883 | | | ... | ${dut1-vhost-${prev_index}-if2}
884 | | | Configure L2XC | ${dut1} | ${dut1_xconnect_if1}
885 | | | ... | ${dut1-vhost-${number}-if1}
886 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
887 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
888 | | | ... | dut2-vhost-${number}-if2
889 | | | ${dut2_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut2_if1}
890 | | | ... | ${dut2-vhost-${prev_index}-if2}
891 | | | Configure L2XC | ${dut2} | ${dut2_xconnect_if1}
892 | | | ... | ${dut2-vhost-${number}-if1}
893 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
894 | | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | ${dut1_if2}
895 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
896 | | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | ${dut2_if2}
897
898 | Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology
899 | | [Documentation]
900 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
901 | | ... | connect each Vhost interface with one physical interface.
902 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
903 | | ...
904 | | ... | *Arguments:*
905 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
906 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
907 | | ... | - subid - ID of the sub-interface to be created. Type: string
908 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
909 | | ...
910 | | ... | *Example:*
911 | | ...
912 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
913 | | ... | circular topology \| /tmp/sock1 \| /tmp/sock2 \| 10 \| pop-1 \|
914 | | ...
915 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
916 | | ...
917 | | Set interfaces in path in 3-node circular topology up
918 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
919 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
920 | | Configure L2 tag rewrite method on interfaces
921 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
922 | | ... | ${tag_rewrite}
923 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
924 | | ... | ${sock1} | ${sock2}
925 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
926 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
927 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
928 | | ... | ${sock1} | ${sock2}
929 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
930 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
931
932 | Initialize L2 xconnect with Vhost-User and VLAN with DPDK link bonding in 3-node circular topology
933 | | [Documentation]
934 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Setup VLAN
935 | | ... | on BondEthernet interfaces between DUTs. Cross connect one Vhost
936 | | ... | interface with physical interface towards TG and other Vhost interface
937 | | ... | with VLAN sub-interface. All interfaces are brought up.
938 | | ...
939 | | ... | *Arguments:*
940 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
941 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
942 | | ... | - subid - ID of the sub-interface to be created. Type: string
943 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
944 | | ...
945 | | ... | *Example:*
946 | | ...
947 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with DPDK link\
948 | | ... | bonding in 3-node circular topology \| /tmp/sock1 \| /tmp/sock2 \
949 | | ... | \| 10 \| pop-1 \|
950 | | ...
951 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite}
952 | | ...
953 | | Set interfaces in path in 3-node circular topology up
954 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
955 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
956 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
957 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
958 | | ... | ${subid}
959 | | Configure L2 tag rewrite method on interfaces
960 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
961 | | ... | ${tag_rewrite}
962 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
963 | | ... | ${sock1} | ${sock2}
964 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
965 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
966 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
967 | | ... | ${sock1} | ${sock2}
968 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
969 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
970
971 | Initialize L2 xconnect with Vhost-User and VLAN with VPP link bonding in 3-node circular topology
972 | | [Documentation]
973 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
974 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
975 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
976 | | ... | VLAN on BondEthernet interfaces between DUTs. Cross connect one Vhost
977 | | ... | interface with physical interface towards TG and other Vhost interface
978 | | ... | with VLAN sub-interface. All interfaces are brought up.
979 | | ...
980 | | ... | *Arguments:*
981 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
982 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
983 | | ... | - subid - ID of the sub-interface to be created. Type: string
984 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
985 | | ... | - bond_mode - Link bonding mode. Type: string
986 | | ... | - lb_mode - Load balance mode. Type: string
987 | | ...
988 | | ... | *Example:*
989 | | ...
990 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with VPP link\
991 | | ... | bonding in 3-node circular topology \| /tmp/sock1 \| /tmp/sock2 \
992 | | ... | \| 10 \| pop-1 \| \| xor \| l34 \|
993 | | ...
994 | | [Arguments] | ${sock1} | ${sock2} | ${subid} | ${tag_rewrite} | ${bond_mode}
995 | | ... | ${lb_mode}
996 | | ...
997 | | Set interfaces in path in 3-node circular topology up
998 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
999 | | ... | ${lb_mode}
1000 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1001 | | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1002 | | ... | ${dut1_eth_bond_if1}
1003 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1004 | | ... | ${lb_mode}
1005 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1006 | | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1007 | | ... | ${dut2_eth_bond_if1}
1008 | | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
1009 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1010 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1011 | | ... | ${subid}
1012 | | Configure L2 tag rewrite method on interfaces
1013 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1014 | | ... | ${tag_rewrite}
1015 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1016 | | ... | ${sock1} | ${sock2}
1017 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
1018 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
1019 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1020 | | ... | ${sock1} | ${sock2}
1021 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
1022 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
1023
1024 | Initialize L2 bridge domain in 2-node circular topology
1025 | | [Documentation]
1026 | | ... | Setup L2 DB topology by adding two interfaces on DUT into BD
1027 | | ... | that is created automatically with index 1. Learning is enabled.
1028 | | ... | Interfaces are brought up.
1029 | | ...
1030 | | ... | *Arguments:*
1031 | | ... | - bd_id - Bridge domain ID. Type: integer
1032 | | ...
1033 | | ... | *Example:*
1034 | | ...
1035 | | ... | \| Initialize L2 bridge domain in 2-node circular topology \| 1 \|
1036 | | ...
1037 | | [Arguments] | ${bd_id}=${1}
1038 | | ...
1039 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
1040 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
1041 | | All Vpp Interfaces Ready Wait | ${nodes}
1042
1043 | Initialize L2 bridge domain in 3-node circular topology
1044 | | [Documentation]
1045 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
1046 | | ... | that is created automatically with index 1. Learning is enabled.
1047 | | ... | Interfaces are brought up.
1048 | | ...
1049 | | ... | *Arguments:*
1050 | | ... | - bd_id - Bridge domain ID. Type: integer
1051 | | ...
1052 | | ... | *Example:*
1053 | | ...
1054 | | ... | \| Initialize L2 bridge domain in 3-node circular topology \| 1 \|
1055 | | ...
1056 | | [Arguments] | ${bd_id}=${1}
1057 | | ...
1058 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
1059 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
1060 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
1061 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
1062 | | All Vpp Interfaces Ready Wait | ${nodes}
1063
1064 | Configure IPv4 ACLs
1065 | | [Documentation]
1066 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
1067 | | ... | hitting ACEs for both traffic directions.
1068 | | ...
1069 | | ... | *Arguments:*
1070 | | ... | - dut_node - DUT node. Type: dictionary
1071 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
1072 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
1073 | | ...
1074 | | ... | *Example:*
1075 | | ...
1076 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
1077 | | ... | \| GigabitEthernet0/8/0 \|
1078 | | ...
1079 | | ... | _NOTE:_ This KW uses following test case variables:
1080 | | ... | - ${src_ip_start} - Source IP address start. Type: string
1081 | | ... | - ${dst_ip_start} - Destination IP address start. Type: string
1082 | | ... | - ${ip_step} - IP address step. Type: string
1083 | | ... | - ${sport_start} - Source port number start. Type: string
1084 | | ... | - ${dport_start} - Destination port number start. Type: string
1085 | | ... | - ${port_step} - Port number step. Type: string
1086 | | ... | - ${no_hit_aces_number} - Number of not-hitting ACEs to be configured.
1087 | | ... | Type: integer
1088 | | ... | - ${acl_apply_type} - To what path apply the ACL - input or output.
1089 | | ... | Type: string
1090 | | ... | - ${acl_action} - Action for the rule - deny, permit, permit+reflect.
1091 | | ... | Type: string
1092 | | ... | - ${trex_stream1_subnet} - IP subnet used by T-Rex in direction 0->1.
1093 | | ... | Type: string
1094 | | ... | - ${trex_stream2_subnet} - IP subnet used by T-Rex in direction 1->0.
1095 | | ... | Type: string
1096 | | ...
1097 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
1098 | | ${src_ip_int} = | Evaluate
1099 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
1100 | | ... | modules=ipaddress
1101 | | ${dst_ip_int} = | Evaluate
1102 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
1103 | | ... | modules=ipaddress
1104 | | ${ip_limit} = | Set Variable | 255.255.255.255
1105 | | ${ip_limit_int} = | Evaluate
1106 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
1107 | | ${sport}= | Evaluate | $sport_start - $port_step
1108 | | ${dport}= | Evaluate | $dport_start - $port_step
1109 | | ${port_limit}= | Set Variable | ${65535}
1110 | | ${acl}= | Set Variable | ipv4 permit
1111 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
1112 | | | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
1113 | | | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
1114 | | | ${sport}= | Evaluate | $sport + $port_step
1115 | | | ${dport}= | Evaluate | $dport + $port_step
1116 | | | ${ipv4_limit_reached}= | Set Variable If
1117 | | | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
1118 | | | ... | ${TRUE}
1119 | | | ${udp_limit_reached}= | Set Variable If
1120 | | | ... | $sport > $port_limit or $dport > $port_limit | ${TRUE}
1121 | | | Run Keyword If | $ipv4_limit_reached is True | Log
1122 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
1123 | | | ... | WARN
1124 | | | Run Keyword If | $udp_limit_reached is True | Log
1125 | | | ... | Can't do more iterations - UDP port limit has been reached.
1126 | | | ... | WARN
1127 | | | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
1128 | | | ... | Set Variable | ${ip_limit}
1129 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
1130 | | | ... | modules=ipaddress
1131 | | | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
1132 | | | ... | Set Variable | ${ip_limit}
1133 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
1134 | | | ... | modules=ipaddress
1135 | | | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
1136 | | | ... | ${sport}
1137 | | | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
1138 | | | ... | ${dport}
1139 | | | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
1140 | | | ... | sport ${sport} | dport ${dport},
1141 | | | Exit For Loop If
1142 | | | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
1143 | | ${acl}= | Catenate | ${acl}
1144 | | ... | ipv4 ${acl_action} src ${trex_stream1_subnet},
1145 | | ... | ipv4 ${acl_action} src ${trex_stream2_subnet}
1146 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
1147 | | @{acl_list}= | Create List | ${0}
1148 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
1149 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
1150 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
1151 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
1152 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
1153 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
1154 | | ... | ${acl_list}
1155 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
1156 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
1157 | | ... | ${acl_list}
1158
1159 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
1160 | | [Documentation]
1161 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1162 | | ... | domain that is created automatically with index 1. Learning is
1163 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
1164 | | ... | interfaces.
1165 | | ...
1166 | | ... | *Arguments:*
1167 | | ... | _None_
1168 | | ...
1169 | | ... | *Example:*
1170 | | ...
1171 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
1172 | | ... | circular topology \|
1173 | | ...
1174 | | ... | _NOTE:_ This KW uses following test case variables:
1175 | | ... | - ${dut1} - DUT1 node.
1176 | | ... | - ${dut2} - DUT2 node.
1177 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1178 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1179 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1180 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1181 | | ...
1182 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1183 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1184 | | All Vpp Interfaces Ready Wait | ${nodes}
1185 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1186
1187 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in 3-node circular topology
1188 | | [Documentation]
1189 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
1190 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
1191 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and
1192 | | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with
1193 | | ... | prefix /24 and next hops of neighbour DUT interface IPv4 address.
1194 | | ... | Apply required ACL rules to DUT1 interfaces.
1195 | | ...
1196 | | ... | *Arguments:*
1197 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
1198 | | ...
1199 | | ... | *Example:*
1200 | | ...
1201 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
1202 | | ... | in 3-node circular topology \|
1203 | | ...
1204 | | ... | _NOTE:_ This KW uses following test case variables:
1205 | | ... | - ${dut1} - DUT1 node.
1206 | | ... | - ${dut2} - DUT2 node.
1207 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1208 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1209 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1210 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1211 | | ...
1212 | | Set Interface State | ${dut1} | ${dut1_if1} | up
1213 | | Set Interface State | ${dut1} | ${dut1_if2} | up
1214 | | Set Interface State | ${dut2} | ${dut2_if1} | up
1215 | | Set Interface State | ${dut2} | ${dut2_if2} | up
1216 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1217 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1218 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1219 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1220 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
1221 | | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.${number}
1222 | | | ... | ${tg1_if1_mac}
1223 | | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.${number}
1224 | | | ... | ${tg1_if2_mac}
1225 | | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
1226 | | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
1227 | | Configure IP addresses on interfaces
1228 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
1229 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
1230 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
1231 | | ... | ${dut2} | ${dut2_if2} | 20.20.20.1 | 24
1232 | | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2}
1233 | | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
1234 | | All Vpp Interfaces Ready Wait | ${nodes}
1235 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1236
1237 | Configure MACIP ACLs
1238 | | [Documentation]
1239 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
1240 | | ... | plus two hitting ACEs for both traffic directions.
1241 | | ...
1242 | | ... | *Arguments:*
1243 | | ... | - dut_node - DUT node. Type: dictionary
1244 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
1245 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
1246 | | ...
1247 | | ... | *Example:*
1248 | | ...
1249 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
1250 | | ... | \| GigabitEthernet0/8/0 \|
1251 | | ...
1252 | | ... | _NOTE:_ This KW uses following test case variables:
1253 | | ... | - ${src_ip_start} - Source IP address start. Type: string
1254 | | ... | - ${ip_step} - IP address step. Type: string
1255 | | ... | - ${src_mac_start} - Source MAC address start in format with colons.
1256 | | ... | Type: string
1257 | | ... | - ${src_mac_step} - Source MAC address step. Type: string
1258 | | ... | - ${src_mac_mask} - Source MAC address mask. 00:00:00:00:00:00 is a
1259 | | ... | wildcard mask. Type: string
1260 | | ... | - ${no_hit_aces_number} - Number of not-hitting ACEs to be configured.
1261 | | ... | Type: integer
1262 | | ... | - ${acl_action} - Action for the rule - deny, permit, permit+reflect.
1263 | | ... | Type: string
1264 | | ... | - ${tg_stream1_subnet} - IP subnet used by TG in direction 0->1.
1265 | | ... | Type: string
1266 | | ... | - ${tg_stream2_subnet} - IP subnet used by TG in direction 1->0.
1267 | | ... | Type: string
1268 | | ... | - ${tg_stream1_mac} - Source MAC address of traffic stream 1.
1269 | | ... | Type: string
1270 | | ... | - ${tg_stream2_mac} - Source MAC address of traffic stream 2.
1271 | | ... | Type: string
1272 | | ... | - ${tg_mac_mask} - MAC address mask for traffic streams.
1273 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
1274 | | ...
1275 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
1276 | | ...
1277 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
1278 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
1279 | | ...
1280 | | ${ip_limit} = | Set Variable | 255.255.255.255
1281 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
1282 | | ...
1283 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
1284 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
1285 | | ...
1286 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
1287 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
1288 | | ...
1289 | | ${acl}= | Set Variable | ipv4 permit
1290 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
1291 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
1292 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
1293 | | | ${ipv4_limit_reached}= | Set Variable If
1294 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
1295 | | | ${mac_limit_reached}= | Set Variable If
1296 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
1297 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
1298 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
1299 | | | ... | WARN
1300 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
1301 | | | ... | Can't do more iterations - MAC address limit has been reached.
1302 | | | ... | WARN
1303 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
1304 | | | ... | Set Variable | ${ip_limit}
1305 | | | ... | ELSE | Int To IP | ${src_ip_int}
1306 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
1307 | | | ... | Set Variable | ${mac_limit}
1308 | | | ... | ELSE | Int To Mac | ${src_mac_int}
1309 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
1310 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
1311 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
1312 | | ${acl0}= | Catenate | ${acl}
1313 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
1314 | | ... | mask ${tg_mac_mask}
1315 | | ${acl1}= | Catenate | ${acl}
1316 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
1317 | | ... | mask ${tg_mac_mask}
1318 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
1319 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
1320 | | ${acl_idx}= | Set Variable | 0
1321 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
1322 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
1323 | | ${acl_idx}= | Set Variable | 1
1324 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
1325 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
1326
1327 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
1328 | | [Documentation]
1329 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
1330 | | ... | domain that is created automatically with index 1. Learning is
1331 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
1332 | | ... | DUT1 interfaces.
1333 | | ...
1334 | | ... | *Arguments:*
1335 | | ... | _None_
1336 | | ...
1337 | | ... | *Example:*
1338 | | ...
1339 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
1340 | | ... | circular topology \|
1341 | | ...
1342 | | ... | _NOTE 1:_ This KW uses following test case variables:
1343 | | ... | - ${tg} - TG node.
1344 | | ... | - ${dut1} - DUT1 node.
1345 | | ... | - ${dut2} - DUT2 node.
1346 | | ... | - ${tg_if1} - TG interface towards DUT1.
1347 | | ... | - ${tg_if2} - TG interface towards DUT2.
1348 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1349 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1350 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1351 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1352 | | ...
1353 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
1354 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
1355 | | All Vpp Interfaces Ready Wait | ${nodes}
1356 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
1357
1358 | Initialize L2 bridge domains with Vhost-User in 3-node circular topology
1359 | | [Documentation]
1360 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1361 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1362 | | ... | with physical inteface.
1363 | | ...
1364 | | ... | *Arguments:*
1365 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1366 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1367 | | ... | - sock1 - Sock path for the first Vhost-User interface. Type: string
1368 | | ... | - sock2 - Sock path for the second Vhost-User interface. Type: string
1369 | | ...
1370 | | ... | _NOTE:_ This KW uses following test case variables:
1371 | | ... | - ${dut1} - DUT1 node.
1372 | | ... | - ${dut2} - DUT2 node.
1373 | | ... | - ${dut1_if1} - DUT1 interface towards TG.
1374 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1375 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1376 | | ... | - ${dut2_if2} - DUT2 interface towards TG.
1377 | | ...
1378 | | ... | *Example:*
1379 | | ...
1380 | | ... | \| L2 bridge domains with Vhost-User initialized in a 3-node \
1381 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1382 | | ...
1383 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1384 | | ...
1385 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1386 | | ... | ${sock1} | ${sock2} | dut1_vhost_if1 | dut1_vhost_if2
1387 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1388 | | Add interface to bridge domain | ${dut1} | ${dut1_vhost_if1} | ${bd_id1}
1389 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1390 | | Add interface to bridge domain | ${dut1} | ${dut1_vhost_if2} | ${bd_id2}
1391 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1392 | | ... | ${sock1} | ${sock2} | dut2_vhost_if1 | dut2_vhost_if2
1393 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id1}
1394 | | Add interface to bridge domain | ${dut2} | ${dut2_vhost_if1} | ${bd_id1}
1395 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1396 | | Add interface to bridge domain | ${dut2} | ${dut2_vhost_if2} | ${bd_id2}
1397
1398 | Initialize L2 bridge domains with Vhost-User for '${nr}' VMs in 3-node circular topology
1399 | | [Documentation]
1400 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on all
1401 | | ... | defined VPP nodes. Add each Vhost-User interface into L2 bridge
1402 | | ... | domains with learning enabled with physical inteface or Vhost-User
1403 | | ... | interface of another VM.
1404 | | ...
1405 | | ... | *Arguments:*
1406 | | ... | _None_
1407 | | ...
1408 | | ... | *Note:*
1409 | | ... | Socket paths for VM are defined in following format:
1410 | | ... | - /tmp/sock-${VM_ID}-1
1411 | | ... | - /tmp/sock-${VM_ID}-2
1412 | | ...
1413 | | ... | *Example:*
1414 | | ...
1415 | | ... | \| L2 bridge domains with Vhost-User for '2' VMs initialized in \
1416 | | ... | a 3-node circular topology \|
1417 | | ...
1418 | | ${bd_id2}= | Evaluate | ${nr}+1
1419 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${1}
1420 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1421 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${1}
1422 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1423 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1424 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1425 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1426 | | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1427 | | | ... | ${sock1} | ${sock2} | dut1-vhost-${number}-if1
1428 | | | ... | dut1-vhost-${number}-if2
1429 | | | ${bd_id2}= | Evaluate | ${number}+1
1430 | | | Add interface to bridge domain | ${dut1}
1431 | | | ... | ${dut1-vhost-${number}-if1} | ${number}
1432 | | | Add interface to bridge domain | ${dut1}
1433 | | | ... | ${dut1-vhost-${number}-if2} | ${bd_id2}
1434 | | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1435 | | | ... | ${sock1} | ${sock2} | dut2-vhost-${number}-if1
1436 | | | ... | dut2-vhost-${number}-if2
1437 | | | Add interface to bridge domain | ${dut2}
1438 | | | ... | ${dut2-vhost-${number}-if1} | ${number}
1439 | | | Add interface to bridge domain | ${dut2}
1440 | | | ... | ${dut2-vhost-${number}-if2} | ${bd_id2}
1441
1442 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
1443 | | [Documentation]
1444 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
1445 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
1446 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
1447 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
1448 | | ... | interfaces.
1449 | | ...
1450 | | Set interfaces in path in 3-node circular topology up
1451 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1452 | | ... | 24
1453 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1454 | | ... | 24
1455 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
1456 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
1457 | | Add arp on dut | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
1458 | | Add arp on dut | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
1459 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1460 | | ... | 172.16.0.1 | 172.16.0.2
1461 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1462 | | ... | 172.16.0.2 | 172.16.0.1
1463 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
1464 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
1465 | | All Vpp Interfaces Ready Wait | ${nodes}
1466
1467 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
1468 | | [Documentation]
1469 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1470 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1471 | | ... | with physical inteface.
1472 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1473 | | ... | interfaces on each DUT. All interfaces are brought up.
1474 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1475 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1476 | | ...
1477 | | ... | *Arguments:*
1478 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1479 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1480 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1481 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1482 | | ...
1483 | | ... | *Example:*
1484 | | ...
1485 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1486 | | ... | 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1487 | | ...
1488 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1489 | | ...
1490 | | Set interfaces in path in 3-node circular topology up
1491 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 172.16.0.1
1492 | | ... | 24
1493 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 172.16.0.2
1494 | | ... | 24
1495 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1496 | | ... | 172.16.0.1 | 172.16.0.2
1497 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1498 | | ... | 172.16.0.2 | 172.16.0.1
1499 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1500 | | ... | ${sock1} | ${sock2}
1501 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1502 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1503 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1504 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1505 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1506 | | ... | ${sock1} | ${sock2}
1507 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1508 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1509 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1510 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1511
1512 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
1513 | | [Documentation]
1514 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
1515 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1516 | | ... | one connected to physical interface, the other to VXLAN.
1517 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
1518 | | ... | interfaces on the DUT. All interfaces are brought up.
1519 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1520 | | ... | DUT and TG.
1521 | | ...
1522 | | ... | *Arguments:*
1523 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
1524 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
1525 | | ... |                         DUT1. Type: string
1526 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
1527 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
1528 | | ... |                         DUT2. Type: string
1529 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
1530 | | ... |             forwarded on DUT1. Type: string
1531 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
1532 | | ... |             forwarded on DUT2. Type: string
1533 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
1534 | | ... |                 Type: list of dicts, dict params vni, vtep
1535 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
1536 | | ... |                 Type: list of dicts, dict params vni, vtep
1537 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
1538 | | ... |                       Type: string
1539 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
1540 | | ... |                     on DUT1. Type: string
1541 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
1542 | | ... |                       Type: string
1543 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
1544 | | ... |                     on DUT2. Type: string
1545 | | ...
1546 | | ... | *Example:*
1547 | | ...
1548 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
1549 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
1550 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
1551 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
1552 | | ...
1553 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} |
1554 | | ... | ${dut1_address} | ${dut1_address_subnet}
1555 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} |
1556 | | ... | ${dut2_address} | ${dut2_address_subnet}
1557 | | ${dut1_bd_id1}= | Set Variable | 1
1558 | | ${dut1_bd_id2}= | Set Variable | 2
1559 | | ${dut2_bd_id1}= | Set Variable | 1
1560 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
1561 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
1562 | | | ... | ${dut1_address} | ${vxlan.vtep}
1563 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
1564 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
1565 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
1566 | | | ... | ${dut2_address} | ${vxlan.vtep}
1567 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
1568 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
1569 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
1570 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
1571 | | Add arp on dut | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
1572 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
1573 | | ... | ${dut1_gw} | ${dut1_if1}
1574 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
1575 | | ... | ${dut2_gw} | ${dut2_if2}
1576 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
1577 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
1578 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
1579 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
1580
1581 | Initialize L2 bridge domains with Vhost-User in 2-node circular topology
1582 | | [Documentation]
1583 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1584 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1585 | | ... | with physical inteface.
1586 | | ...
1587 | | ... | *Arguments:*
1588 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1589 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1590 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1591 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1592 | | ...
1593 | | ... | *Example:*
1594 | | ...
1595 | | ... | \| L2 bridge domains with Vhost-User initialized in a 2-node \
1596 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \|
1597 | | ...
1598 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
1599 | | ...
1600 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1601 | | ... | ${sock1} | ${sock2}
1602 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1603 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1604 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
1605 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1606
1607 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in a 3-node circular topology
1608 | | [Documentation]
1609 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN
1610 | | ... | between DUTs by connecting physical and vlan interfaces on each DUT.
1611 | | ... | All interfaces are brought up.
1612 | | ...
1613 | | ... | *Arguments:*
1614 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1615 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1616 | | ... | - subid - ID of the sub-interface to be created. Type: string
1617 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1618 | | ...
1619 | | ... | _NOTE:_ This KW uses following test case variables:
1620 | | ... | - ${dut1} - DUT1 node.
1621 | | ... | - ${dut2} - DUT2 node.
1622 | | ... | - ${dut1_if2} - DUT1 interface towards DUT2.
1623 | | ... | - ${dut2_if1} - DUT2 interface towards DUT1.
1624 | | ...
1625 | | ... | *Example:*
1626 | | ...
1627 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
1628 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
1629 | | ...
1630 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1631 | | ...
1632 | | Set interfaces in path in 3-node circular topology up
1633 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1634 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1635 | | Configure L2 tag rewrite method on interfaces
1636 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1637 | | ... | ${tag_rewrite}
1638 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1639 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
1640 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id2}
1641 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1642 | | All Vpp Interfaces Ready Wait | ${nodes}
1643
1644 | Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology
1645 | | [Documentation]
1646 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1647 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1648 | | ... | with physical inteface.
1649 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
1650 | | ...
1651 | | ... | *Arguments:*
1652 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1653 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1654 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1655 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1656 | | ... | - subid - ID of the sub-interface to be created. Type: string
1657 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1658 | | ...
1659 | | ... | *Example:*
1660 | | ...
1661 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in a 3-node\
1662 | | ... | circular topology \| 1 \| 2 \| /tmp/sock1 \| /tmp/sock2 \| 10 \
1663 | | ... | \| pop-1 \|
1664 | | ...
1665 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1666 | | ... | ${tag_rewrite}
1667 | | ...
1668 | | Set interfaces in path in 3-node circular topology up
1669 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1670 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1671 | | Configure L2 tag rewrite method on interfaces
1672 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1673 | | ... | ${tag_rewrite}
1674 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1675 | | ... | ${sock1} | ${sock2}
1676 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1677 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1678 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1679 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1680 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1681 | | ... | ${sock1} | ${sock2}
1682 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1683 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1684 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1685 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1686
1687 | Initialize L2 bridge domains with Vhost-User and VLAN with DPDK link bonding in a 3-node circular topology
1688 | | [Documentation]
1689 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Setup VLAN
1690 | | ... | on BondEthernet interfaces between DUTs. Add one Vhost-User interface
1691 | | ... | into L2 bridge domains with learning enabled with physical interface
1692 | | ... | towards TG and other Vhost-User interface into L2 bridge domains with
1693 | | ... | learning enabled with VLAN sub-interface. All interfaces are brought
1694 | | ... | up.
1695 | | ...
1696 | | ... | *Arguments:*
1697 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1698 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1699 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1700 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1701 | | ... | - subid - ID of the sub-interface to be created. Type: string
1702 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1703 | | ...
1704 | | ... | *Example:*
1705 | | ...
1706 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with DPDK\
1707 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \
1708 | | ... | \| /tmp/sock2 \| 10 \| pop-1 \|
1709 | | ...
1710 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1711 | | ... | ${tag_rewrite}
1712 | | ...
1713 | | Set interfaces in path in 3-node circular topology up
1714 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1715 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1716 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1717 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1718 | | ... | ${subid}
1719 | | Configure L2 tag rewrite method on interfaces
1720 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1721 | | ... | ${tag_rewrite}
1722 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1723 | | ... | ${sock1} | ${sock2}
1724 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1725 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1726 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1727 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1728 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1729 | | ... | ${sock1} | ${sock2}
1730 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1731 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1732 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1733 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1734
1735 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
1736 | | [Documentation]
1737 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
1738 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
1739 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
1740 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
1741 | | ... | interface into L2 bridge domains with learning enabled with physical
1742 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
1743 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
1744 | | ... | are brought up.
1745 | | ...
1746 | | ... | *Arguments:*
1747 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1748 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1749 | | ... | - sock1 - Sock path for first Vhost-User interface. Type: string
1750 | | ... | - sock2 - Sock path for second Vhost-User interface. Type: string
1751 | | ... | - subid - ID of the sub-interface to be created. Type: string
1752 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1753 | | ... | - bond_mode - Link bonding mode. Type: string
1754 | | ... | - lb_mode - Load balance mode. Type: string
1755 | | ...
1756 | | ... | *Example:*
1757 | | ...
1758 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
1759 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \| /tmp/sock1 \
1760 | | ... | \| /tmp/sock2 \| 10 \| pop-1 \| xor \| l34 \|
1761 | | ...
1762 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
1763 | | ... | ${tag_rewrite} | ${bond_mode} | ${lb_mode}
1764 | | ...
1765 | | Set interfaces in path in 3-node circular topology up
1766 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
1767 | | ... | ${lb_mode}
1768 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1769 | | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1770 | | ... | ${dut1_eth_bond_if1}
1771 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1772 | | ... | ${lb_mode}
1773 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1774 | | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1775 | | ... | ${dut2_eth_bond_if1}
1776 | | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
1777 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
1778 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1779 | | ... | ${subid}
1780 | | Configure L2 tag rewrite method on interfaces
1781 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1782 | | ... | ${tag_rewrite}
1783 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1784 | | ... | ${sock1} | ${sock2}
1785 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1786 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1787 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1788 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1789 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1790 | | ... | ${sock1} | ${sock2}
1791 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1792 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1793 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1794 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1795
1796 | Add PCI devices to all DUTs
1797 | | [Documentation]
1798 | | ... | Add PCI devices to VPP configuration file.
1799 | | ...
1800 | | ${duts}= | Get Matches | ${nodes} | DUT*
1801 | | :FOR | ${dut} | IN | @{duts}
1802 | | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
1803 | | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
1804 | | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci} | ${if2_pci}
1805 | | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
1806 | | | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
1807
1808 | Add single PCI device to all DUTs
1809 | | [Documentation]
1810 | | ... | Add single (first) PCI device on DUT1 and single (last) PCI device on
1811 | | ... | DUT2 to VPP configuration file.
1812 | | ...
1813 | | ${duts}= | Get Matches | ${nodes} | DUT*
1814 | | :FOR | ${dut} | IN | @{duts}
1815 | | | ${if1_pci}= | Run Keyword If | '${dut}' == 'DUT1' | Get Interface PCI Addr
1816 | | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ELSE | Get Interface PCI Addr
1817 | | | ... | ${nodes['${dut}']} | ${${dut}_if2}
1818 | | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
1819 | | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
1820
1821 | Add VLAN Strip Offload switch off between DUTs in 3-node single link topology
1822 | | [Documentation]
1823 | | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
1824 | | ... | configuration file.
1825 | | ...
1826 | | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_pci}
1827 | | ... | vlan-strip-offload | off
1828 | | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_pci}
1829 | | ... | vlan-strip-offload | off
1830
1831 | Add DPDK bonded ethernet interfaces to DUTs in 3-node single link topology
1832 | | [Documentation]
1833 | | ... | Add DPDK bonded Ethernet interfaces with mode XOR and transmit policy
1834 | | ... | l34 to VPP configuration file.
1835 | | ...
1836 | | Run keyword | DUT1.Add DPDK Eth Bond Dev | 0 | 2 | l34 | ${dut1_if2_pci}
1837 | | Run keyword | DUT2.Add DPDK Eth Bond Dev | 0 | 2 | l34 | ${dut2_if1_pci}
1838
1839 | Add DPDK bonded ethernet interfaces to topology file in 3-node single link topology
1840 | | Add Bond Eth Interface | ${dut1} | ${dut1_eth_bond_if1_name}
1841 | | Add Bond Eth Interface | ${dut2} | ${dut2_eth_bond_if1_name}
1842
1843 | Configure guest VM with dpdk-testpmd connected via vhost-user
1844 | | [Documentation]
1845 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1846 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1847 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1848 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1849 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1850 | | ...
1851 | | ... | *Arguments:*
1852 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1853 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1854 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1855 | | ... | - vm_name - QemuUtil instance name. Type: string
1856 | | ... | - skip - Number of cpus which will be skipped. Type: integer
1857 | | ... | - count - Number of cpus which will be allocated for qemu.
1858 | | ... | Type: integer
1859 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
1860 | | ... | Type: integer
1861 | | ... | - jumbo_frames - Set True if jumbo frames are used in the test.
1862 | | ... | Type: bool
1863 | | ...
1864 | | ... | *Example:*
1865 | | ...
1866 | | ... | \| Configure guest VM with dpdk-testpmd connected via vhost-user \
1867 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
1868 | | ... | \| ${5} \|
1869 | | ... | \| Configure guest VM with dpdk-testpmd connected via vhost-user \
1870 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
1871 | | ... | \| qemu_id=${2} \|
1872 | | ...
1873 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1874 | | ... | ${count}=${5} | ${qemu_id}=${1} | ${jumbo_frames}=${False}
1875 | | ...
1876 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
1877 | | ... | WITH NAME | ${vm_name}
1878 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
1879 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
1880 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
1881 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
1882 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1883 | | ... | ${dut1_if1} | ${dut1_if2}
1884 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
1885 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1886 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
1887 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1888 | | ... | jumbo_frames=${jumbo_frames}
1889 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1890 | | ... | jumbo_frames=${jumbo_frames}
1891 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1892 | | ... | ${TRUE}
1893 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
1894 | | ... | ${perf_qemu_path}-patch/bin/
1895 | | ... | ${perf_qemu_path}-base/bin/
1896 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
1897 | | ... | apply_patch=${apply_patch}
1898 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
1899 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1900 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1901 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1902 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1903 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1904 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1905 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
1906 | | ${max_pkt_len}= | Set Variable If | ${jumbo_frames} | 9000 | ${EMPTY}
1907 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
1908 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE}
1909 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
1910 | | ... | pmd_max_pkt_len=${max_pkt_len}
1911 | | Return From Keyword | ${vm}
1912
1913 | Configure '${nr}' guest VMs with dpdk-testpmd connected via vhost-user in 3-node circular topology
1914 | | [Documentation]
1915 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
1916 | | ... | DPDK testpmd for defined number of VMs on all defined VPP nodes.
1917 | | ...
1918 | | ... | *Arguments:*
1919 | | ... | _None_
1920 | | ...
1921 | | ... | _NOTE:_ This KW expects following test case variables to be set:
1922 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
1923 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
1924 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
1925 | | ... | - ${jumbo_frames} - Jumbo frames are used (True) or are not used
1926 | | ... | (False) in the test.
1927 | | ...
1928 | | ... | *Example:*
1929 | | ...
1930 | | ... | \| Configure '2' guest VMs with dpdk-testpmd connected via vhost-user\
1931 | | ... | in 3-node circular topology \|
1932 | | ...
1933 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
1934 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
1935 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
1936 | | | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
1937 | | | ${vm1}= | Configure guest VM with dpdk-testpmd connected via vhost-user
1938 | | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
1939 | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1940 | | | ... | jumbo_frames=${jumbo_frames}
1941 | | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
1942 | | | ${vm2}= | Configure guest VM with dpdk-testpmd connected via vhost-user
1943 | | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
1944 | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number}
1945 | | | ... | jumbo_frames=${jumbo_frames}
1946 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
1947
1948 | Configure guest VM with dpdk-testpmd using SMT connected via vhost-user
1949 | | [Documentation]
1950 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
1951 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
1952 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
1953 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
1954 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is io.
1955 | | ...
1956 | | ... | *Arguments:*
1957 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
1958 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
1959 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
1960 | | ... | - vm_name - QemuUtil instance name. Type: string
1961 | | ... | - skip - number of cpus which will be skipped. Type: int
1962 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
1963 | | ... | - jumbo_frames - Set True if jumbo frames are used in the test.
1964 | | ... | Type: bool
1965 | | ...
1966 | | ... | *Example:*
1967 | | ...
1968 | | ... | \| Configure guest VM with dpdk-testpmd using SMT connected via \
1969 | | ... | vhost-user \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
1970 | | ... | \| ${6} \| ${5} \|
1971 | | ...
1972 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
1973 | | ... | ${count}=${5} | ${jumbo_frames}=${False}
1974 | | ...
1975 | | Import Library | resources.libraries.python.QemuUtils
1976 | | ... | WITH NAME | ${vm_name}
1977 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
1978 | | ... | ${dut1_if1} | ${dut1_if2}
1979 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
1980 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${TRUE}
1981 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
1982 | | ... | jumbo_frames=${jumbo_frames}
1983 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
1984 | | ... | jumbo_frames=${jumbo_frames}
1985 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
1986 | | ... | ${TRUE}
1987 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
1988 | | ... | ${perf_qemu_path}-patch/bin/
1989 | | ... | ${perf_qemu_path}-base/bin/
1990 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
1991 | | ... | apply_patch=${apply_patch}
1992 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
1993 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
1994 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
1995 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
1996 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
1997 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
1998 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
1999 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
2000 | | ${max_pkt_len}= | Set Variable If | ${jumbo_frames} | 9000 | ${EMPTY}
2001 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f | eal_mem_channels=4
2002 | | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE}
2003 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
2004 | | ... | pmd_max_pkt_len=${max_pkt_len}
2005 | | Return From Keyword | ${vm}
2006
2007 | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
2008 | | [Documentation]
2009 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
2010 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
2011 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
2012 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
2013 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
2014 | | ...
2015 | | ... | *Arguments:*
2016 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
2017 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2018 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
2019 | | ... | - vm_name - QemuUtil instance name. Type: string
2020 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
2021 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
2022 | | ... | - skip - number of cpus which will be skipped. Type: integer
2023 | | ... | - count - number of cpus which will be allocated for qemu.
2024 | | ... | Type: integer
2025 | | ... | - qemu_id - Qemu Id when starting more then one guest VM on DUT node.
2026 | | ... | Type: integer
2027 | | ... | - jumbo_frames - Set True if jumbo frames are used in the test.
2028 | | ... | Type: bool
2029 | | ...
2030 | | ... | *Example:*
2031 | | ...
2032 | | ... | \| Configure guest VM with dpdk-testpmd-mac connected via vhost-user \
2033 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
2034 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
2035 | | ... | \| Configure guest VM with dpdk-testpmd-mac connected via vhost-user \
2036 | | ... | \| ${nodes['DUT1']} \| /tmp/sock-2-1 \| /tmp/sock-2-2 \| DUT1_VM2 \
2037 | | ... | \| 00:00:00:00:02:01 \| 00:00:00:00:02:02 \| ${6} \| ${5} \
2038 | | ... | \| qemu_id=${2} \|
2039 | | ...
2040 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
2041 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
2042 | | ... | ${qemu_id}=${1} | ${jumbo_frames}=${False}
2043 | | ...
2044 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
2045 | | ... | WITH NAME | ${vm_name}
2046 | | ${serial_port}= | Evaluate | ${qemu_id} + ${4555}
2047 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
2048 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
2049 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
2050 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
2051 | | ... | ${dut1_if1} | ${dut1_if2}
2052 | | ${skip_cnt}= | Evaluate | ${skip} + (${qemu_id} - 1) * ${count}
2053 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
2054 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${count} | smt_used=${False}
2055 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2056 | | ... | jumbo_frames=${jumbo_frames}
2057 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2058 | | ... | jumbo_frames=${jumbo_frames}
2059 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
2060 | | ... | ${TRUE}
2061 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2062 | | ... | ${perf_qemu_path}-patch/bin/
2063 | | ... | ${perf_qemu_path}-base/bin/
2064 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
2065 | | ... | apply_patch=${apply_patch}
2066 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2067 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2068 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2069 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2070 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2071 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2072 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2073 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
2074 | | ${max_pkt_len}= | Set Variable If | ${jumbo_frames} | 9000 | ${EMPTY}
2075 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
2076 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
2077 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${TRUE}
2078 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
2079 | | ... | pmd_max_pkt_len=${max_pkt_len}
2080 | | Return From Keyword | ${vm}
2081
2082 | Configure '${nr}' guest VMs with dpdk-testpmd-mac connected via vhost-user in 3-node circular topology
2083 | | [Documentation]
2084 | | ... | Start QEMU guests with two vhost-user interfaces and interconnecting
2085 | | ... | DPDK testpmd with fwd mode set to mac rewrite for defined number of
2086 | | ... | VMs on all defined VPP nodes.
2087 | | ...
2088 | | ... | *Arguments:*
2089 | | ... | _None_
2090 | | ...
2091 | | ... | _NOTE:_ This KW expects following test case variables to be set:
2092 | | ... | - ${system_cpus} - Number of CPUs allocated for OS itself.
2093 | | ... | - ${vpp_cpus} - Number of CPUs allocated for VPP.
2094 | | ... | - ${vm_cpus} - Number of CPUs to be allocated per QEMU instance.
2095 | | ... | - ${jumbo_frames} - Jumbo frames are used (True) or are not used
2096 | | ... | (False) in the test.
2097 | | ...
2098 | | ... | *Example:*
2099 | | ...
2100 | | ... | \| Configure '2' guest VMs with dpdk-testpmd-mac connected via vhost-user\
2101 | | ... | in 3-node circular topology \|
2102 | | ...
2103 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
2104 | | | ${sock1}= | Set Variable | /tmp/sock-${number}-1
2105 | | | ${sock2}= | Set Variable | /tmp/sock-${number}-2
2106 | | | ${skip_cpus}= | Evaluate | ${vpp_cpus}+${system_cpus}
2107 | | | ${vm1}=
2108 | | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
2109 | | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM${number}
2110 | | | ... | ${dut1-vhost-${number}-if1_mac}
2111 | | | ... | ${dut1-vhost-${number}-if2_mac} | skip=${skip_cpus}
2112 | | | ... | count=${vm_cpus} | qemu_id=${number}
2113 | | | ... | jumbo_frames=${jumbo_frames}
2114 | | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM${number} | ${vm1}
2115 | | | ${vm2}=
2116 | | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
2117 | | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number}
2118 | | | ... | ${dut2-vhost-${number}-if1_mac}
2119 | | | ... | ${dut2-vhost-${number}-if2_mac} | skip=${skip_cpus}
2120 | | | ... | count=${vm_cpus} | qemu_id=${number}
2121 | | | ... | jumbo_frames=${jumbo_frames}
2122 | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2}
2123
2124 | Configure guest VM with dpdk-testpmd-mac using SMT connected via vhost-user
2125 | | [Documentation]
2126 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
2127 | | ... | DPDK testpmd. Qemu Guest uses by default 5 cores and 2048M. Testpmd
2128 | | ... | uses 5 cores (1 main core and 4 cores dedicated to io) mem-channel=4,
2129 | | ... | txq/rxq=256, burst=64, disable-hw-vlan, disable-rss,
2130 | | ... | driver usr/lib/librte_pmd_virtio.so and fwd mode is mac rewrite.
2131 | | ...
2132 | | ... | *Arguments:*
2133 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
2134 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2135 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
2136 | | ... | - vm_name - QemuUtil instance name. Type: string
2137 | | ... | - eth0_mac - MAC address of first Vhost interface. Type: string
2138 | | ... | - eth1_mac - MAC address of second Vhost interface. Type: string
2139 | | ... | - skip - number of cpus which will be skipped. Type: int
2140 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
2141 | | ... | - jumbo_frames - Set True if jumbo frames are used in the test.
2142 | | ... | Type: bool
2143 | | ...
2144 | | ... | *Example:*
2145 | | ...
2146 | | ... | \| Configure guest VM with dpdk-testpmd-mac using SMT connected via \
2147 | | ... | vhost-user \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM\
2148 | | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| ${6} \| ${5} \|
2149 | | ...
2150 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name}
2151 | | ... | ${eth0_mac} | ${eth1_mac} | ${skip}=${6} | ${count}=${5}
2152 | | ... | ${jumbo_frames}=${False}
2153 | | ...
2154 | | Import Library | resources.libraries.python.QemuUtils
2155 | | ... | WITH NAME | ${vm_name}
2156 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
2157 | | ... | ${dut1_if1} | ${dut1_if2}
2158 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
2159 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${TRUE}
2160 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2161 | | ... | jumbo_frames=${jumbo_frames}
2162 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2163 | | ... | jumbo_frames=${jumbo_frames}
2164 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
2165 | | ... | ${TRUE}
2166 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2167 | | ... | ${perf_qemu_path}-patch/bin/
2168 | | ... | ${perf_qemu_path}-base/bin/
2169 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
2170 | | ... | apply_patch=${apply_patch}
2171 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2172 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2173 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2174 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2175 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2176 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2177 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2178 | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy
2179 | | ${max_pkt_len}= | Set Variable If | ${jumbo_frames} | 9000 | ${EMPTY}
2180 | | Dpdk Testpmd Start | ${vm} | eal_coremask=0x1f
2181 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
2182 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${TRUE}
2183 | | ... | pmd_txd=${perf_qemu_qsz} | pmd_rxd=${perf_qemu_qsz}
2184 | | ... | pmd_max_pkt_len=${max_pkt_len}
2185 | | Return From Keyword | ${vm}
2186
2187 | Configure guest VM with linux bridge connected via vhost-user
2188 | | [Documentation]
2189 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
2190 | | ... | linux bridge. Qemu Guest uses 2048M.
2191 | | ...
2192 | | ... | *Arguments:*
2193 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
2194 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2195 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
2196 | | ... | - vm_name - QemuUtil instance name. Type: string
2197 | | ... | - skip - number of cpus which will be skipped. Type: int
2198 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
2199 | | ...
2200 | | ... | *Example:*
2201 | | ...
2202 | | ... | \| Configure guest VM with linux bridge connected via vhost-user \
2203 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \| ${6} \
2204 | | ... | \| ${5} \|
2205 | | ...
2206 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
2207 | | ... | ${count}=${5}
2208 | | ...
2209 | | Import Library | resources.libraries.python.QemuUtils
2210 | | ... | WITH NAME | ${vm_name}
2211 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
2212 | | ... | ${dut1_if1} | ${dut1_if2}
2213 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
2214 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False}
2215 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2216 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2217 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
2218 | | ... | ${TRUE}
2219 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2220 | | ... | ${perf_qemu_path}-patch/bin/
2221 | | ... | ${perf_qemu_path}-base/bin/
2222 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
2223 | | ... | apply_patch=${apply_patch}
2224 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2225 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2226 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2227 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2228 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2229 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2230 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2231 | | ${br}= | Set Variable | br0
2232 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
2233 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
2234 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
2235 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
2236 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
2237 | | Set Interface State | ${vm} | ${br} | up | if_type=name
2238 | | Return From Keyword | ${vm}
2239
2240 | Configure guest VM with linux bridge using SMT connected via vhost-user
2241 | | [Documentation]
2242 | | ... | Start QEMU guest with two vhost-user interfaces and interconnecting
2243 | | ... | linux bridge. Qemu Guest uses 2048M.
2244 | | ...
2245 | | ... | *Arguments:*
2246 | | ... | - dut_node - DUT node to start guest VM on. Type: dictionary
2247 | | ... | - sock1 - Socket path for first Vhost-User interface. Type: string
2248 | | ... | - sock2 - Socket path for second Vhost-User interface. Type: string
2249 | | ... | - vm_name - QemuUtil instance name. Type: string
2250 | | ... | - skip - number of cpus which will be skipped. Type: int
2251 | | ... | - count - number of cpus which will be allocated for qemu. Type: int
2252 | | ...
2253 | | ... | *Example:*
2254 | | ...
2255 | | ... | \| Guest VM with Linux Bridge using SMT connected via vhost-user is \
2256 | | ... | setup \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| DUT1_VM \
2257 | | ... | \| ${6}\| ${5} \|
2258 | | ...
2259 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vm_name} | ${skip}=${6}
2260 | | ... | ${count}=${5}
2261 | | ...
2262 | | Import Library | resources.libraries.python.QemuUtils
2263 | | ... | WITH NAME | ${vm_name}
2264 | | ${dut_numa}= | Get interfaces numa node | ${dut_node}
2265 | | ... | ${dut1_if1} | ${dut1_if2}
2266 | | ${qemu_cpus}= | Cpu slice of list per node | ${dut_node} | ${dut_numa}
2267 | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${TRUE}
2268 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1}
2269 | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2}
2270 | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False}
2271 | | ... | ${TRUE}
2272 | | ${perf_qemu_path}= | Set Variable If | ${apply_patch}
2273 | | ... | ${perf_qemu_path}-patch/bin/
2274 | | ... | ${perf_qemu_path}-base/bin/
2275 | | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${dut_node}
2276 | | ... | apply_patch=${apply_patch}
2277 | | Run keyword | ${vm_name}.Qemu Set Path | ${perf_qemu_path}
2278 | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node}
2279 | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1
2280 | | Run keyword | ${vm_name}.Qemu Set Mem Size | 2048
2281 | | Run keyword | ${vm_name}.Qemu Set Disk Image | ${perf_vm_image}
2282 | | ${vm}= | Run keyword | ${vm_name}.Qemu Start
2283 | | Run keyword | ${vm_name}.Qemu Set Affinity | @{qemu_cpus}
2284 | | ${br}= | Set Variable | br0
2285 | | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
2286 | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
2287 | | Linux Add Bridge | ${vm} | ${br} | ${vhost1} | ${vhost2}
2288 | | Set Interface State | ${vm} | ${vhost1} | up | if_type=name
2289 | | Set Interface State | ${vm} | ${vhost2} | up | if_type=name
2290 | | Set Interface State | ${vm} | ${br} | up | if_type=name
2291 | | Return From Keyword | ${vm}
2292
2293 | Initialize LISP IPv4 forwarding in 3-node circular topology
2294 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
2295 | | ... | Don`t set route.
2296 | | ...
2297 | | ... | *Arguments:*
2298 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
2299 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2300 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
2301 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2302 | | ... | -${duts_prefix} - ip prefix. Type: int
2303 | | ...
2304 | | ... | *Return:*
2305 | | ... | - No value returned
2306 | | ...
2307 | | ... | *Example:*
2308 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
2309 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2310 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2311 | | ...
2312 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2313 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
2314 | | ...
2315 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2316 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2317 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2318 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2319 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2320 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2321 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2322 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2323 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2324 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2325 | | ... | ${dut2_if1_mac}
2326 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2327 | | ... | ${dut1_if2_mac}
2328 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2329 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
2330 | | ... | ${dut1_tg_address} | ${duts_prefix}
2331 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
2332 | | ... | ${dut1_dut2_address} | ${duts_prefix}
2333 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
2334 | | ... | ${dut2_dut1_address} | ${duts_prefix}
2335 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
2336 | | ... | ${dut2_tg_address} | ${duts_prefix}
2337 | | All Vpp Interfaces Ready Wait | ${nodes}
2338
2339 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
2340 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
2341 | | ...
2342 | | ... | *Arguments:*
2343 | | ... | -${encr_alg} - Encryption algorithm. Type: string
2344 | | ... | -${auth_alg} - Authentication algorithm. Type: string
2345 | | ...
2346 | | ... | *Return:*
2347 | | ... | - No value returned
2348 | | ...
2349 | | ... | *Example:*
2350 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
2351 | | ... | \| ${encr_alg} \| ${auth_alg}
2352 | | ...
2353 | | [Arguments] | ${encr_alg} | ${auth_alg}
2354 | | ...
2355 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
2356 | | Initialize LISP IPv4 forwarding in 3-node circular topology
2357 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
2358 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
2359 | | Configure LISP GPE topology in 3-node circular topology
2360 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
2361 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
2362 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
2363 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
2364 | | Configure manual keyed connection for IPSec
2365 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
2366 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
2367 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
2368 | | Configure manual keyed connection for IPSec
2369 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
2370 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
2371 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
2372 | | Set interfaces in path in 3-node circular topology up
2373
2374 | Initialize LISP IPv6 forwarding in 3-node circular topology
2375 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
2376 | | ... | Don`t set route.
2377 | | ...
2378 | | ... | *Arguments:*
2379 | | ... | -${dut1_dut2_address} - Ip address from DUT1 to DUT2. Type: string
2380 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2381 | | ... | -${dut2_dut1_address} - Ip address from DUT2 to DUT1. Type: string
2382 | | ... | -${dut1_tg_address} - Ip address from DUT1 to tg. Type: string
2383 | | ... | -${duts_prefix} - ip prefix. Type: int
2384 | | ...
2385 | | ... | *Return:*
2386 | | ... | - No value returned
2387 | | ...
2388 | | ... | *Example:*
2389 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
2390 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
2391 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
2392 | | ...
2393 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
2394 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
2395 | | ...
2396 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2397 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2398 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2399 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2400 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_address}
2401 | | ... | ${prefix}
2402 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_address}
2403 | | ... | ${prefix}
2404 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_address}
2405 | | ... | ${prefix}
2406 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_address}
2407 | | ... | ${prefix}
2408 | | Suppress ICMPv6 router advertisement message | ${nodes}
2409 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2410 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2411 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_address}
2412 | | ... | ${dut2_if1_mac}
2413 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_address}
2414 | | ... | ${dut1_if2_mac}
2415
2416 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
2417 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2418 | | ... | Don`t set route.
2419 | | ...
2420 | | ... | *Arguments:*
2421 | | ... | - ${dut1_dut2_ip6_address} - IPv6 address from DUT1 to DUT2.
2422 | | ... | Type: string
2423 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
2424 | | ... | - ${dut2_dut1_ip6_address} - IPv6 address from DUT2 to DUT1.
2425 | | ... | Type: string
2426 | | ... | - ${dut1_tg_ip4_address} - IPv4 address from DUT1 to tg. Type: string
2427 | | ... | - ${prefix4} - IPv4 prefix. Type: int
2428 | | ... | - ${prefix6} - IPv6 prefix. Type: int
2429 | | ...
2430 | | ... | *Return:*
2431 | | ... | - No value returned
2432 | | ...
2433 | | ... | *Example:*
2434 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
2435 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
2436 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
2437 | | ... | \| ${prefix4} \| ${prefix6} \|
2438 | | ...
2439 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
2440 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
2441 | | ... | ${prefix4} | ${prefix6}
2442 | | ...
2443 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2444 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2445 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2446 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2447 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2448 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2449 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2450 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2451 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1}
2452 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
2453 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address}
2454 | | ... | ${prefix6}
2455 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address}
2456 | | ... | ${prefix6}
2457 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2}
2458 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
2459 | | Suppress ICMPv6 router advertisement message | ${nodes}
2460 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac}
2461 | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg1_if2_mac}
2462 | | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address}
2463 | | ... | ${dut2_if1_mac}
2464 | | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address}
2465 | | ... | ${dut1_if2_mac}
2466
2467 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
2468 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
2469 | | ... | Don`t set route.
2470 | | ...
2471 | | ... | *Arguments:*
2472 | | ... | - ${dut1_dut2_ip4_address} - IPv4 address from DUT1 to DUT2.
2473 | | ... | Type: string
2474 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
2475 | | ... | - ${dut2_dut1_ip4_address} - IPv4 address from DUT2 to DUT1.
2476 | | ... | Type: string
2477 | | ... | - ${dut1_tg_ip6_address} - IPv6 address from DUT1 to tg. Type: string
2478 | | ... | - ${prefix4} - IPv4 prefix. Type: int
2479 | | ... | - ${prefix6} - IPv6 prefix. Type: int
2480 | | ...
2481 | | ... | *Return:*
2482 | | ... | - No value returned
2483 | | ...
2484 | | ... | *Example:*
2485 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
2486 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
2487 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
2488 | | ... | \| ${prefix6} \| ${prefix4} \|
2489 | | ...
2490 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
2491 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
2492 | | ... | ${prefix6} | ${prefix4}
2493 | | ...
2494 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2495 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2496 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2497 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2498 | | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2499 | | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2500 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2501 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2502 | | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address}
2503 | | ... | ${prefix6}
2504 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2}
2505 | | ... | ${dut1_dut2_ip4_address} | ${prefix4}
2506 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1}
2507 | | ... | ${dut2_dut1_ip4_address} | ${prefix4}
2508 | | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address}
2509 | | ... | ${prefix6}
2510 | | Suppress ICMPv6 router advertisement message | ${nodes}
2511 | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac}
2512 | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac}
2513 | | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address}
2514 | | ... | ${dut2_if1_mac}
2515 | | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address}
2516 | | ... | ${dut1_if2_mac}
2517
2518 | Initialize NAT44 in 3-node circular topology
2519 | | [Documentation] | Initialization of 3-node topology with NAT44 between DUTs:
2520 | | ... | - set interfaces up
2521 | | ... | - set IP addresses
2522 | | ... | - set ARP
2523 | | ... | - create routes
2524 | | ... | - set NAT44 - only on DUT1
2525 | | ...
2526 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2527 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2528 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2529 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2530 | | All Vpp Interfaces Ready Wait | ${nodes}
2531 | | ...
2532 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
2533 | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
2534 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
2535 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | 12.0.0.1 | 20
2536 | | ...
2537 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
2538 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
2539 | | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
2540 | | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
2541 | | ...
2542 | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
2543 | | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
2544 | | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
2545 | | Add arp on dut | ${dut2} | ${dut2_if2} | 12.0.0.2 | ${tg_if2_mac}
2546 | | ...
2547 | | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | 11.0.0.2 | ${dut1_if2}
2548 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | 10.0.0.2 | ${dut1_if1}
2549 | | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | 12.0.0.2 | ${dut2_if2}
2550 | | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | 11.0.0.1 | ${dut2_if1}
2551 | | ...
2552 | | Configure inside and outside interfaces
2553 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
2554 | | Configure deterministic mode for NAT44
2555 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
2556
2557 | Initialize L2 xconnect for '${nr}' memif pairs and '${rxq}' rxqueues in 3-node circular topology
2558 | | [Documentation]
2559 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Cross
2560 | | ... | connect each Memif interface with one physical interface or virtual
2561 | | ... | interface to create a chain accross DUT node.
2562 | | ...
2563 | | ... | *Arguments:*
2564 | | ... | _None_
2565 | | ...
2566 | | ... | *Note:*
2567 | | ... | Socket paths for Memif are defined in following format:
2568 | | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
2569 | | ...
2570 | | ... | *Example:*
2571 | | ...
2572 | | ... | \| Initialize L2 xconnect for 1 Memif in 3-node circular topology \|
2573 | | ...
2574 | | Set Interface State | ${dut1} | ${dut1_if1} | up
2575 | | Set Interface State | ${dut1} | ${dut1_if2} | up
2576 | | Set Interface State | ${dut2} | ${dut2_if1} | up
2577 | | Set Interface State | ${dut2} | ${dut2_if2} | up
2578 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
2579 | | | ${sock1}= | Set Variable | memif-DUT1_VNF
2580 | | | ${sock2}= | Set Variable | memif-DUT1_VNF
2581 | | | ${prev_index}= | Evaluate | ${number}-1
2582 | | | Set up memif interfaces on DUT node | ${dut1}
2583 | | | ... | ${sock1} | ${sock2} | ${number} | dut1-memif-${number}-if1
2584 | | | ... | dut1-memif-${number}-if2 | ${rxq} | ${rxq}
2585 | | | ${dut1_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut1_if1}
2586 | | | ... | ${dut1-memif-${prev_index}-if2}
2587 | | | Configure L2XC | ${dut1} | ${dut1_xconnect_if1}
2588 | | | ... | ${dut1-memif-${number}-if1}
2589 | | | ${sock1}= | Set Variable | memif-DUT2_VNF
2590 | | | ${sock2}= | Set Variable | memif-DUT2_VNF
2591 | | | Set up memif interfaces on DUT node | ${dut2}
2592 | | | ... | ${sock1} | ${sock2} | ${number} | dut2-memif-${number}-if1
2593 | | | ... | dut2-memif-${number}-if2 | ${rxq} | ${rxq}
2594 | | | ${dut2_xconnect_if1}= | Set Variable If | ${number}==1 | ${dut2_if1}
2595 | | | ... | ${dut2-memif-${prev_index}-if2}
2596 | | | Configure L2XC | ${dut2} | ${dut2_xconnect_if1}
2597 | | | ... | ${dut2-memif-${number}-if1}
2598 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
2599 | | | ... | ${dut1} | ${dut1-memif-${number}-if2} | ${dut1_if2}
2600 | | | Run Keyword If | ${number}==${nr} | Configure L2XC
2601 | | | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2}
2602 | | All Vpp Interfaces Ready Wait | ${nodes}
2603 | | Show Memif on all DUTs | ${nodes}
2604
2605 | Initialize L2 Bridge Domain for '${nr}' memif pairs and '${rxq}' rxqueues in 3-node circular topology
2606 | | [Documentation]
2607 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
2608 | | ... | Memif interface to separate L2 bridge domain with one physical or
2609 | | ... | virtual interface to create a chain accross DUT node.
2610 | | ...
2611 | | ... | *Arguments:*
2612 | | ... | _None_
2613 | | ...
2614 | | ... | *Note:*
2615 | | ... | Socket paths for Memif are defined in following format:
2616 | | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
2617 | | ...
2618 | | ... | *Example:*
2619 | | ...
2620 | | ... | \| Initialize L2 Bridge Domain for '1' memif pairs in 3-node circular\
2621 | | ... | topology \|
2622 | | ...
2623 | | ${bd_id2}= | Evaluate | ${nr}+1
2624 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${1}
2625 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id2}
2626 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${1}
2627 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
2628 | | :FOR | ${number} | IN RANGE | 1 | ${nr}+1
2629 | | | ${sock1}= | Set Variable | memif-DUT1_VNF
2630 | | | ${sock2}= | Set Variable | memif-DUT1_VNF
2631 | | | Set up memif interfaces on DUT node | ${dut1}
2632 | | | ... | ${sock1} | ${sock2} | ${number} | dut1-memif-${number}-if1
2633 | | | ... | dut1-memif-${number}-if2 | ${rxq} | ${rxq}
2634 | | | ${bd_id2}= | Evaluate | ${number}+1
2635 | | | Add interface to bridge domain | ${dut1}
2636 | | | ... | ${dut1-memif-${number}-if1} | ${number}
2637 | | | Add interface to bridge domain | ${dut1}
2638 | | | ... | ${dut1-memif-${number}-if2} | ${bd_id2}
2639 | | | ${sock1}= | Set Variable | memif-DUT2_VNF
2640 | | | ${sock2}= | Set Variable | memif-DUT2_VNF
2641 | | | Set up memif interfaces on DUT node | ${dut2}
2642 | | | ... | ${sock1} | ${sock2} | ${number} | dut2-memif-${number}-if1
2643 | | | ... | dut2-memif-${number}-if2 | ${rxq} | ${rxq}
2644 | | | Add interface to bridge domain | ${dut2}
2645 | | | ... | ${dut2-memif-${number}-if1} | ${number}
2646 | | | Add interface to bridge domain | ${dut2}
2647 | | | ... | ${dut2-memif-${number}-if2} | ${bd_id2}
2648 | | All Vpp Interfaces Ready Wait | ${nodes}
2649 | | Show Memif on all DUTs | ${nodes}
2650
2651 | Initialize L2 xconnect for single memif in 3-node circular topology
2652 | | [Documentation]
2653 | | ... | Create single Memif interface on all defined VPP nodes. Cross
2654 | | ... | connect Memif interface with one physical interface.
2655 | | ...
2656 | | ... | *Arguments:*
2657 | | ... | - ${rxq} - Number of Memif RX queues. Type: integer
2658 | | ... | - ${number} - Memif ID. Type: integer
2659 | | ...
2660 | | ... | *Note:*
2661 | | ... | Socket paths for Memif are defined in following format:
2662 | | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
2663 | | ...
2664 | | ... | *Example:*
2665 | | ...
2666 | | ... | \| Initialize L2 xconnect for single memif in 3-node circular \
2667 | | ... | topology \| 1 \| 1 \|
2668 | | ...
2669 | | [Arguments] | ${rxq}=${1} | ${number}=${1}
2670 | | ${sock}= | Set Variable | memif-DUT1_VNF
2671 | | Set up single memif interface on DUT node | ${dut1} | ${sock}
2672 | | ... | ${number} | dut1-memif-${number}-if1 | ${rxq} | ${rxq}
2673 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1-memif-${number}-if1}
2674 | | ${sock}= | Set Variable | memif-DUT2_VNF
2675 | | Set up single memif interface on DUT node | ${dut2} | ${sock}
2676 | | ... | ${number} | dut2-memif-${number}-if1 | ${rxq} | ${rxq}
2677 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2-memif-${number}-if1}
2678 | | All Vpp Interfaces Ready Wait | ${nodes}
2679 | | Show Memif on all DUTs | ${nodes}
2680
2681 | Initialize L2 Bridge Domain for single memif in 3-node circular topology
2682 | | [Documentation]
2683 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
2684 | | ... | interface to separate L2 bridge domain with one physical interface.
2685 | | ...
2686 | | ... | *Arguments:*
2687 | | ... | - ${rxq} - Number of Memif RX queues. Type: integer
2688 | | ... | - ${number} - Memif ID. Type: integer
2689 | | ...
2690 | | ... | *Note:*
2691 | | ... | Socket paths for Memif are defined in following format:
2692 | | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
2693 | | ...
2694 | | ... | *Example:*
2695 | | ...
2696 | | ... | \| Initialize L2 Bridge Domain for single memif in 3-node circular \
2697 | | ... | topology \| 1 \| 1 \|
2698 | | ...
2699 | | [Arguments] | ${rxq}=${1} | ${number}=${1}
2700 | | ${sock}= | Set Variable | memif-DUT1_VNF
2701 | | Set up single memif interface on DUT node | ${dut1} | ${sock}
2702 | | ... | ${number} | dut1-memif-${number}-if1 | ${rxq} | ${rxq}
2703 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${number}
2704 | | Add interface to bridge domain | ${dut1} | ${dut1-memif-${number}-if1}
2705 | | ... | ${number}
2706 | | ${sock}= | Set Variable | memif-DUT2_VNF
2707 | | Set up single memif interface on DUT node | ${dut2} | ${sock}
2708 | | ... | ${number} | dut2-memif-${number}-if1 | ${rxq} | ${rxq}
2709 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${number}
2710 | | Add interface to bridge domain | ${dut2} | ${dut2-memif-${number}-if1}
2711 | | ... | ${number}
2712 | | All Vpp Interfaces Ready Wait | ${nodes}
2713 | | Show Memif on all DUTs | ${nodes}