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