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