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