Clean: L2_patch
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
1 # Copyright (c) 2019 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 | resources.libraries.python.DpdkUtil
16 | Library | resources.libraries.python.InterfaceUtil
17 | Library | resources.libraries.python.IPUtil
18 | Library | resources.libraries.python.NodePath
19 | Library | resources.libraries.python.TestConfig
20 | Library | resources.libraries.python.TrafficGenerator
21 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
22 | Library | resources.libraries.python.VhostUser
23 | ...
24 | Documentation | Performance suite keywords - configuration
25
26 *** Keywords ***
27 | Initialize IPSec in 3-node circular topology
28 | | [Documentation]
29 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
30 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
31 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG and
32 | | ... | DUT1-DUT2 links. Set routing for encrypted traffic on both DUT nodes
33 | | ... | with prefix /8 and next hop of neighbour DUT or TG interface IPv4
34 | | ... | address.
35 | | ...
36 | | Set interfaces in path up
37 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
38 | | ... | ${dut1_if1_ip4} | 24
39 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
40 | | ... | ${dut2_if2_ip4} | 24
41 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
42 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
43 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4}
44 | | ... | interface=${dut1_if1}
45 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | gateway=${tg_if2_ip4}
46 | | ... | interface=${dut2_if2}
47
48 | Initialize IPv6 forwarding with VLAN dot1q sub-interfaces in circular topology
49 | | [Documentation]
50 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
51 | | ... | circular topology. In case of 3-node topology create VLAN
52 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
53 | | ... | sub-interface on dut1-if2 interface. Get the interface MAC addresses
54 | | ... | and setup ARPs. Setup IPv6 addresses with /64 prefix on DUT-TG links
55 | | ... | and set routing with prefix /64. In case of 3-node set IPv6 adresses
56 | | ... | with /64 prefix on VLAN and set routing on both DUT nodes with prefix
57 | | ... | /64. Set next hop of neighbour DUT interface IPv6 address. All
58 | | ... | interfaces are brought up.
59 | | ...
60 | | ... | *Arguments:*
61 | | ... | - tg_if1_net - TG interface 1 IPv6 subnet used by traffic generator.
62 | | ... | Type: integer
63 | | ... | - tg_if2_net - TG interface 2 IPv6 subnet used by traffic generator.
64 | | ... | Type: integer
65 | | ... | - subid - ID of the sub-interface to be created. Type: string
66 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
67 | | ...
68 | | ... | _NOTE:_ This KW uses following test case variables:
69 | | ... | - dut1 - DUT1 node.
70 | | ... | - dut2 - DUT2 node.
71 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
72 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
73 | | ...
74 | | ... | *Example:*
75 | | ...
76 | | ... | \| Initialize IPv6 forwarding with VLAN dot1q sub-interfaces\
77 | | ... | in circular topology \| 2001:1::0 \| 2001:2::0 \| 10 \| pop-1 \|
78 | | ...
79 | | [Arguments] | ${tg_if1_net} | ${tg_if2_net} | ${subid} | ${tag_rewrite}
80 | | ...
81 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
82 | | ... | Variable Should Exist | ${dut2}
83 | | ...
84 | | Set interfaces in path up
85 | | ...
86 | | Run Keyword If | '${dut2_status}' == 'PASS'
87 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
88 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
89 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
90 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
91 | | Run Keyword If | '${dut2_status}' == 'PASS'
92 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
93 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
94 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
95 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
96 | | ...
97 | | ${prefix}= | Set Variable | 64
98 | | ${host_prefix}= | Set Variable | 64
99 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg_if1_mac}
100 | | Run Keyword If | '${dut2_status}' == 'PASS'
101 | | ... | VPP Add Ip Neighbor
102 | | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${dut2_if1_mac}
103 | | Run Keyword If | '${dut2_status}' == 'PASS'
104 | | ... | VPP Add Ip Neighbor
105 | | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${dut1_if2_mac}
106 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
107 | | ... | Set Variable | ${dut2}
108 | | ... | ELSE | Set Variable | ${dut1}
109 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
110 | | ... | Set Variable | ${dut2_if2}
111 | | ... | ELSE | Set Variable | ${subif_index_1}
112 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg_if2_mac}
113 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
114 | | Run Keyword If | '${dut2_status}' == 'PASS'
115 | | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1} | 2002:2::1
116 | | ... | ${prefix}
117 | | Run Keyword If | '${dut2_status}' == 'PASS'
118 | | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | 2002:2::2
119 | | ... | ${prefix}
120 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
121 | | Vpp All Ra Suppress Link Layer | ${nodes}
122 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
123 | | ... | gateway=2002:1::1 | interface=${dut1_if1}
124 | | Run Keyword If | '${dut2_status}' == 'PASS'
125 | | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | ${host_prefix}
126 | | ... | gateway=2002:2::2 | interface=${subif_index_1}
127 | | Run Keyword If | '${dut2_status}' == 'PASS'
128 | | ... | Vpp Route Add | ${dut2} | ${tg_if1_net} | ${host_prefix}
129 | | ... | gateway=2002:2::1 | interface=${subif_index_2}
130 | | Vpp Route Add | ${dut} | ${tg_if2_net} | ${host_prefix}
131 | | ... | gateway=2002:3::1 | interface=${dut_if2}
132
133 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
134 | | [Documentation]
135 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
136 | | ... | topology. Get the interface MAC addresses and setup neighbours on all
137 | | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
138 | | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
139 | | ... | on both DUT nodes.
140 | | ...
141 | | VPP Interface Set IP Address
142 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
143 | | VPP Interface Set IP Address
144 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
145 | | VPP Interface Set IP Address
146 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
147 | | VPP Interface Set IP Address
148 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
149 | | Vpp All Ra Suppress Link Layer | ${nodes}
150 | | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
151 | | | ${hexa_nr}= | Convert To Hex | ${number}
152 | | | VPP Add IP Neighbor | ${dut1}
153 | | | ... | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} | ${tg_if1_mac}
154 | | | VPP Add IP Neighbor | ${dut2}
155 | | | ... | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} | ${tg_if2_mac}
156 | | VPP Add IP Neighbor
157 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
158 | | VPP Add IP Neighbor
159 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
160 | | ${sid1}= | Set Variable If
161 | | ... | "${n}" == "1" | ${dut2_sid1}
162 | | ... | "${n}" == "2" | ${dut2_sid1_1}
163 | | ${sid2}= | Set Variable If
164 | | ... | "${n}" == "1" | ${dut1_sid2}
165 | | ... | "${n}" == "2" | ${dut1_sid2_1}
166 | | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
167 | | ... | interface=${dut1_if2}
168 | | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
169 | | ... | interface=${dut2_if1}
170 # Configure SRv6 for direction0
171 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
172 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
173 | | ... | Create List | ${dut2_sid1}
174 | | ... | ELSE IF | "${n}" == "2"
175 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
176 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
177 | | ... | @{sid_list_dir0}
178 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
179 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
180 | | Run Keyword If | "${n}" == "1"
181 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
182 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
183 | | Run Keyword If | "${n}" == "2"
184 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
185 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
186 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
187 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
188 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
189 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
190 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
191 # Configure SRv6 for direction1
192 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
193 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
194 | | ... | Create List | ${dut1_sid2}
195 | | ... | ELSE IF | "${n}" == "2"
196 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
197 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
198 | | ... | @{sid_list_dir1}
199 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
200 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
201 | | Run Keyword If | "${n}" == "1"
202 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
203 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
204 | | Run Keyword If | "${n}" == "2"
205 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
206 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
207 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
208 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
209 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
210 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
211 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
212 | | Set interfaces in path up
213
214 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
215 | | [Documentation]
216 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
217 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
218 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
219 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
220 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
221 | | ... | routes on both DUT nodes.
222 | | ...
223 | | ... | *Note:*
224 | | ... | KW uses test variable rxq_count_int set by KW Add worker threads
225 | | ... | and rxqueues to all DUTs
226 | | ...
227 | | ${sock1}= | Set Variable | memif-DUT1_CNF
228 | | ${sock2}= | Set Variable | memif-DUT2_CNF
229 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
230 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int}
231 | | ... | ${rxq_count_int}
232 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
233 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
234 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
235 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
236 | | ... | ${rxq_count_int}
237 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
238 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
239 | | :FOR | ${dut} | IN | @{duts}
240 | | | Show Memif | ${nodes['${dut}']}
241 | | VPP Interface Set IP Address
242 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
243 | | VPP Interface Set IP Address
244 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
245 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1}
246 | | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix}
247 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
248 | | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix}
249 | | VPP Interface Set IP Address
250 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
251 | | VPP Interface Set IP Address
252 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
253 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
254 | | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix}
255 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
256 | | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
257 | | Vpp All Ra Suppress Link Layer | ${nodes}
258 | | VPP Add IP Neighbor
259 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
260 | | VPP Add IP Neighbor
261 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
262 | | VPP Add IP Neighbor
263 | | ... | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2 | ${tg_if1_mac}
264 | | VPP Add IP Neighbor
265 | | ... | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2 | ${tg_if2_mac}
266 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
267 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
268 | | VPP Add IP Neighbor | ${dut1}
269 | | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
270 | | VPP Add IP Neighbor | ${dut2}
271 | | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
272 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
273 | | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
274 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
275 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
276 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
277 | | ... | gateway=${dut1_if2_ip6} | interface=${dut2_if1}
278 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
279 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
280 # Configure SRv6 for direction0 on DUT1
281 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
282 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
283 | | ... | ${out_sid1_2}
284 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
285 | | ... | @{sid_list_dir0}
286 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
287 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
288 # Configure SRv6 for direction1 on DUT2
289 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
290 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
291 | | ... | ${out_sid2_2}
292 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
293 | | ... | @{sid_list_dir1}
294 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
295 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
296 # Configure SRv6 for direction0 on DUT2
297 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
298 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
299 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
300 | | Run Keyword If | "${behavior}" == "static_proxy"
301 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
302 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
303 | | ... | ${dut1_sid1} | @{sid_list_dir0}
304 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
305 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
306 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
307 | | ... | ELSE IF | "${behavior}" == "masquerading"
308 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
309 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
310 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
311 # Configure SRv6 for direction1 on DUT1
312 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
313 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
314 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
315 | | Run Keyword If | "${behavior}" == "static_proxy"
316 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
317 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
318 | | ... | ${dut2_sid2} | @{sid_list_dir1}
319 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
320 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
321 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
322 | | ... | ELSE IF | "${behavior}" == "masquerading"
323 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
324 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
325 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
326 | | Set interfaces in path up
327
328 | Initialize L2 xconnect in 2-node circular topology
329 | | [Documentation]
330 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
331 | | ... | each DUT. Interfaces are brought up.
332 | | ...
333 | | Set interfaces in path up
334 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
335
336 | Initialize L2 xconnect in 3-node circular topology
337 | | [Documentation]
338 | | ... | Setup L2 xconnect topology by cross connecting two interfaces on
339 | | ... | each DUT. Interfaces are brought up.
340 | | ... |
341 | | Set interfaces in path up
342 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1_if2}
343 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
344
345 | Initialize L2 xconnect with VXLANoIPv4 in 3-node circular topology
346 | | [Documentation]
347 | | ... | Setup L2 xconnect topology with VXLANoIPv4 by cross connecting
348 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
349 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
350 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
351 | | ... | interfaces.
352 | | ...
353 | | Set interfaces in path up
354 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1 | 24
355 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2 | 24
356 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
357 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
358 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
359 | | ... | 172.16.0.1 | 172.16.0.2
360 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
361 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
362 | | ... | 172.16.0.2 | 172.16.0.1
363 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
364
365 | Initialize L2 xconnect with Vhost-User on node
366 | | [Documentation]
367 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
368 | | ... | defined VPP node. Add each Vhost-User interface into L2 cross-connect
369 | | ... | with with physical inteface or Vhost-User interface of another VM.
370 | | ...
371 | | ... | *Arguments:*
372 | | ... | - dut - DUT node. Type: string
373 | | ... | - nf_nodes - VM count. Type: integer
374 | | ...
375 | | ... | *Note:*
376 | | ... | Socket paths for VM are defined in following format:
377 | | ... | - /tmp/sock-\${VM_ID}-1
378 | | ... | - /tmp/sock-\${VM_ID}-2
379 | | ...
380 | | ... | *Example:*
381 | | ...
382 | | ... | \| Initialize L2 xconnect with Vhost-User on node \| DUT1 \| 1 \|
383 | | ...
384 | | [Arguments] | ${dut} | ${nf_nodes}=${1}
385 | | ...
386 | | :FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
387 | | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1
388 | | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2
389 | | | ${prev_index}= | Evaluate | ${number}-1
390 | | | Configure vhost interfaces for L2BD forwarding | ${nodes['${dut}']}
391 | | | ... | ${sock1} | ${sock2} | ${dut}-vhost-${number}-if1
392 | | | ... | ${dut}-vhost-${number}-if2
393 | | | ${dut_xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
394 | | | ... | ${${dut}-vhost-${prev_index}-if2}
395 | | | Configure L2XC | ${nodes['${dut}']} | ${dut_xconnect_if1}
396 | | | ... | ${${dut}-vhost-${number}-if1}
397 | | | Run Keyword If | ${number}==${nf_nodes} | Configure L2XC
398 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${number}-if2} | ${${dut}_if2}
399
400 | Initialize L2 xconnect with Vhost-User
401 | | [Documentation]
402 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
403 | | ... | all VPP nodes. Add each Vhost-User interface into L2 cross-connect
404 | | ... | with with physical inteface or Vhost-User interface of another VM.
405 | | ...
406 | | ... | *Arguments:*
407 | | ... | - nf_nodes - VM count. Type: integer
408 | | ...
409 | | ... | *Example:*
410 | | ...
411 | | ... | \| Initialize L2 xconnect with Vhost-User \| 1 \|
412 | | ...
413 | | [Arguments] | ${nf_nodes}=${1}
414 | | ...
415 | | :FOR | ${dut} | IN | @{duts}
416 | | | Initialize L2 xconnect with Vhost-User on node | ${dut}
417 | | | ... | nf_nodes=${nf_nodes}
418
419 | Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology
420 | | [Documentation]
421 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross
422 | | ... | connect each Vhost interface with one physical interface.
423 | | ... | Setup VLAN between DUTs. All interfaces are brought up.
424 | | ...
425 | | ... | *Arguments:*
426 | | ... | - subid - ID of the sub-interface to be created. Type: string
427 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
428 | | ...
429 | | ... | *Example:*
430 | | ...
431 | | ... | \| L2 xconnect with Vhost-User and VLAN initialized in a 3-node\
432 | | ... | circular topology \| 10 \| pop-1 \|
433 | | ...
434 | | [Arguments] | ${subid} | ${tag_rewrite}
435 | | ...
436 | | Set interfaces in path up
437 | | Initialize VLAN dot1q sub-interfaces in circular topology
438 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
439 | | Configure L2 tag rewrite method on interfaces
440 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
441 | | ... | ${tag_rewrite}
442 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
443 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
444 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
445 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
446 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
447 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
448 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
449 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
450
451 | Initialize L2 xconnect with Vhost-User and VLAN with VPP link bonding in 3-node circular topology
452 | | [Documentation]
453 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
454 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
455 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
456 | | ... | VLAN on BondEthernet interfaces between DUTs. Cross connect one Vhost
457 | | ... | interface with physical interface towards TG and other Vhost interface
458 | | ... | with VLAN sub-interface. All interfaces are brought up.
459 | | ...
460 | | ... | *Arguments:*
461 | | ... | - subid - ID of the sub-interface to be created. Type: string
462 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
463 | | ... | - bond_mode - Link bonding mode. Type: string
464 | | ... | - lb_mode - Load balance mode. Type: string
465 | | ...
466 | | ... | *Example:*
467 | | ...
468 | | ... | \| Initialize L2 xconnect with Vhost-User and VLAN with VPP link\
469 | | ... | bonding in 3-node circular topology \| 10 \| pop-1 \| xor \| l34 \|
470 | | ...
471 | | [Arguments] | ${subid} | ${tag_rewrite} | ${bond_mode} | ${lb_mode}
472 | | ...
473 | | Set interfaces in path up
474 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
475 | | ... | ${lb_mode}
476 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
477 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
478 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
479 | | ... | Variable Should Exist | ${dut1_if2}
480 | | Run Keyword If | '${if2_status}' == 'PASS'
481 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
482 | | ... | ${dut1_eth_bond_if1}
483 | | ... | ELSE
484 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
485 | | ... | ${dut1_eth_bond_if1}
486 | | Run Keyword Unless | '${if2_status}' == 'PASS'
487 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
488 | | ... | ${dut1_eth_bond_if1}
489 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
490 | | ... | ${lb_mode}
491 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
492 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
493 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
494 | | ... | Variable Should Exist | ${dut2_if1}
495 | | Run Keyword If | '${if1_status}' == 'PASS'
496 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
497 | | ... | ${dut2_eth_bond_if1}
498 | | ... | ELSE
499 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
500 | | ... | ${dut2_eth_bond_if1}
501 | | Run Keyword Unless | '${if2_status}' == 'PASS'
502 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
503 | | ... | ${dut2_eth_bond_if1}
504 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
505 | | Initialize VLAN dot1q sub-interfaces in circular topology
506 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
507 | | ... | ${subid}
508 | | Configure L2 tag rewrite method on interfaces
509 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
510 | | ... | ${tag_rewrite}
511 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
512 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
513 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1}
514 | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2}
515 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
516 | | ... | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2
517 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1}
518 | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}
519
520 | Initialize L2 bridge domain in circular topology
521 | | [Documentation]
522 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
523 | | ... | that is created automatically with index 1. Learning is enabled.
524 | | ... | Interfaces are brought up.
525 | | ...
526 | | ... | *Arguments:*
527 | | ... | - bd_id - Bridge domain ID. Type: integer
528 | | ...
529 | | ... | *Example:*
530 | | ...
531 | | ... | \| Initialize L2 bridge domain in circular topology \| 1 \|
532 | | ...
533 | | [Arguments] | ${bd_id}=${1}
534 | | ...
535 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
536 | | ... | Variable Should Exist | ${dut2}
537 | | ...
538 | | Set interfaces in path up
539 | | ...
540 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
541 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
542 | | Run Keyword If | '${dut2_status}' == 'PASS'
543 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
544 | | Run Keyword If | '${dut2_status}' == 'PASS'
545 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
546
547 | Configure IPv4 ACLs
548 | | [Documentation]
549 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
550 | | ... | hitting ACEs for both traffic directions.
551 | | ...
552 | | ... | *Arguments:*
553 | | ... | - dut_node - DUT node. Type: dictionary
554 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
555 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
556 | | ...
557 | | ... | *Example:*
558 | | ...
559 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
560 | | ... | \| GigabitEthernet0/8/0 \|
561 | | ...
562 | | ... | _NOTE:_ This KW uses following test case variables:
563 | | ... | - src_ip_start - Source IP address start. Type: string
564 | | ... | - dst_ip_start - Destination IP address start. Type: string
565 | | ... | - ip_step - IP address step. Type: string
566 | | ... | - sport_start - Source port number start. Type: string
567 | | ... | - dport_start - Destination port number start. Type: string
568 | | ... | - port_step - Port number step. Type: string
569 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
570 | | ... | Type: integer
571 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
572 | | ... | Type: string
573 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
574 | | ... | Type: string
575 | | ... | - trex_stream1_subnet - IP subnet used by T-Rex in direction 0->1.
576 | | ... | Type: string
577 | | ... | - trex_stream2_subnet - IP subnet used by T-Rex in direction 1->0.
578 | | ... | Type: string
579 | | ...
580 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
581 | | ${src_ip_int} = | Evaluate
582 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
583 | | ... | modules=ipaddress
584 | | ${dst_ip_int} = | Evaluate
585 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
586 | | ... | modules=ipaddress
587 | | ${ip_limit} = | Set Variable | 255.255.255.255
588 | | ${ip_limit_int} = | Evaluate
589 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
590 | | ${sport}= | Evaluate | $sport_start - $port_step
591 | | ${dport}= | Evaluate | $dport_start - $port_step
592 | | ${port_limit}= | Set Variable | ${65535}
593 | | ${acl}= | Set Variable | ipv4 permit
594 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
595 | | | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
596 | | | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
597 | | | ${sport}= | Evaluate | $sport + $port_step
598 | | | ${dport}= | Evaluate | $dport + $port_step
599 | | | ${ipv4_limit_reached}= | Set Variable If
600 | | | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
601 | | | ... | ${TRUE}
602 | | | ${udp_limit_reached}= | Set Variable If
603 | | | ... | $sport > $port_limit or $dport > $port_limit | ${TRUE}
604 | | | Run Keyword If | $ipv4_limit_reached is True | Log
605 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
606 | | | ... | WARN
607 | | | Run Keyword If | $udp_limit_reached is True | Log
608 | | | ... | Can't do more iterations - UDP port limit has been reached.
609 | | | ... | WARN
610 | | | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
611 | | | ... | Set Variable | ${ip_limit}
612 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
613 | | | ... | modules=ipaddress
614 | | | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
615 | | | ... | Set Variable | ${ip_limit}
616 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
617 | | | ... | modules=ipaddress
618 | | | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
619 | | | ... | ${sport}
620 | | | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
621 | | | ... | ${dport}
622 | | | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
623 | | | ... | sport ${sport} | dport ${dport},
624 | | | Exit For Loop If
625 | | | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
626 | | ${acl}= | Catenate | ${acl}
627 | | ... | ipv4 ${acl_action} src ${trex_stream1_subnet},
628 | | ... | ipv4 ${acl_action} src ${trex_stream2_subnet}
629 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
630 | | @{acl_list}= | Create List | ${0}
631 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
632 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
633 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
634 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
635 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
636 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
637 | | ... | ${acl_list}
638 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
639 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
640 | | ... | ${acl_list}
641
642 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
643 | | [Documentation]
644 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
645 | | ... | domain that is created automatically with index 1. Learning is
646 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
647 | | ... | interfaces.
648 | | ...
649 | | ... | *Arguments:*
650 | | ... | _None_
651 | | ...
652 | | ... | *Example:*
653 | | ...
654 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
655 | | ... | circular topology \|
656 | | ...
657 | | ... | _NOTE:_ This KW uses following test case variables:
658 | | ... | - dut1 - DUT1 node.
659 | | ... | - dut2 - DUT2 node.
660 | | ... | - dut1_if1 - DUT1 interface towards TG.
661 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
662 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
663 | | ... | - dut2_if2 - DUT2 interface towards TG.
664 | | ...
665 | | Set interfaces in path up
666 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
667 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
668 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
669
670 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in circular topology
671 | | [Documentation]
672 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
673 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
674 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
675 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
676 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
677 | | ... | and next hop of neighbour DUT interface IPv4 address.
678 | | ... | Apply required ACL rules to DUT1 interfaces.
679 | | ...
680 | | ... | *Arguments:*
681 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
682 | | ...
683 | | ... | *Example:*
684 | | ...
685 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
686 | | ... | in 3-node circular topology \|
687 | | ...
688 | | ... | _NOTE:_ This KW uses following test case variables:
689 | | ... | - tg - TG node.
690 | | ... | - dut1 - DUT1 node.
691 | | ... | - dut2 - DUT2 node.
692 | | ... | - tg_if1 - TG interface 1 towards DUT1.
693 | | ... | - tg_if2 - TG interface 2 towards DUT2 (3-node topo) or DUT1
694 | | ... | (2-node topo).
695 | | ... | - dut1_if1 - DUT1 interface 1 towards TG.
696 | | ... | - dut1_if2 - DUT1 interface 2 towards DUT2 (3-node topo) or TG
697 | | ... | (2-node topo).
698 | | ... | - dut2_if1 - DUT2 interface 1 towards DUT1.
699 | | ... | - dut2_if2 - DUT2 interface 2 towards TG.
700 | | ...
701 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
702 | | ... | Variable Should Exist | ${dut2}
703 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
704 | | ... | Set Variable | ${dut2}
705 | | ... | ELSE | Set Variable | ${dut1}
706 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
707 | | ... | Set Variable | ${dut2_if2}
708 | | ... | ELSE | Set Variable | ${dut1_if2}
709 | | ...
710 | | Set interfaces in path up
711 | | ...
712 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
713 | | | VPP Add IP Neighbor
714 | | | ... | ${dut1} | ${dut1_if1} | 10.10.10.${number} | ${tg_if1_mac}
715 | | | VPP Add IP Neighbor
716 | | | ... | ${dut} | ${dut_if2} | 20.20.20.${number} | ${tg_if2_mac}
717 | | Run Keyword If | '${dut2_status}' == 'PASS'
718 | | ... | VPP Add IP Neighbor
719 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
720 | | Run Keyword If | '${dut2_status}' == 'PASS'
721 | | ... | VPP Add IP Neighbor
722 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
723 | | ...
724 | | VPP Interface Set IP Address
725 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
726 | | VPP Interface Set IP Address
727 | | ... | ${dut} | ${dut_if2} | 20.20.20.1 | 24
728 | | Run Keyword If | '${dut2_status}' == 'PASS'
729 | | ... | VPP Interface Set IP Address
730 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
731 | | Run Keyword If | '${dut2_status}' == 'PASS'
732 | | ... | VPP Interface Set IP Address
733 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
734 | | ...
735 | | Run Keyword If | '${dut2_status}' == 'PASS'
736 | | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | gateway=1.1.1.2
737 | | ... | interface=${dut1_if2}
738 | | Run Keyword If | '${dut2_status}' == 'PASS'
739 | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1
740 | | ... | interface=${dut2_if1}
741 | | ...
742 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
743
744 | Configure MACIP ACLs
745 | | [Documentation]
746 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
747 | | ... | plus two hitting ACEs for both traffic directions.
748 | | ...
749 | | ... | *Arguments:*
750 | | ... | - dut_node - DUT node. Type: dictionary
751 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
752 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
753 | | ...
754 | | ... | *Example:*
755 | | ...
756 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
757 | | ... | \| GigabitEthernet0/8/0 \|
758 | | ...
759 | | ... | _NOTE:_ This KW uses following test case variables:
760 | | ... | - src_ip_start - Source IP address start. Type: string
761 | | ... | - ip_step - IP address step. Type: string
762 | | ... | - src_mac_start - Source MAC address start in format with colons.
763 | | ... | Type: string
764 | | ... | - src_mac_step - Source MAC address step. Type: string
765 | | ... | - src_mac_mask - Source MAC address mask. 00:00:00:00:00:00 is a
766 | | ... | wildcard mask. Type: string
767 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
768 | | ... | Type: integer
769 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
770 | | ... | Type: string
771 | | ... | - tg_stream1_subnet - IP subnet used by TG in direction 0->1.
772 | | ... | Type: string
773 | | ... | - tg_stream2_subnet - IP subnet used by TG in direction 1->0.
774 | | ... | Type: string
775 | | ... | - tg_stream1_mac - Source MAC address of traffic stream 1.
776 | | ... | Type: string
777 | | ... | - tg_stream2_mac - Source MAC address of traffic stream 2.
778 | | ... | Type: string
779 | | ... | - tg_mac_mask - MAC address mask for traffic streams.
780 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
781 | | ...
782 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
783 | | ...
784 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
785 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
786 | | ...
787 | | ${ip_limit} = | Set Variable | 255.255.255.255
788 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
789 | | ...
790 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
791 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
792 | | ...
793 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
794 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
795 | | ...
796 | | ${acl}= | Set Variable | ipv4 permit
797 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
798 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
799 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
800 | | | ${ipv4_limit_reached}= | Set Variable If
801 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
802 | | | ${mac_limit_reached}= | Set Variable If
803 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
804 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
805 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
806 | | | ... | WARN
807 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
808 | | | ... | Can't do more iterations - MAC address limit has been reached.
809 | | | ... | WARN
810 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
811 | | | ... | Set Variable | ${ip_limit}
812 | | | ... | ELSE | Int To IP | ${src_ip_int}
813 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
814 | | | ... | Set Variable | ${mac_limit}
815 | | | ... | ELSE | Int To Mac | ${src_mac_int}
816 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
817 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
818 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
819 | | ${acl0}= | Catenate | ${acl}
820 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
821 | | ... | mask ${tg_mac_mask}
822 | | ${acl1}= | Catenate | ${acl}
823 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
824 | | ... | mask ${tg_mac_mask}
825 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
826 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
827 | | ${acl_idx}= | Set Variable | 0
828 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
829 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
830 | | ${acl_idx}= | Set Variable | 1
831 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
832 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
833
834 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
835 | | [Documentation]
836 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
837 | | ... | domain that is created automatically with index 1. Learning is
838 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
839 | | ... | DUT1 interfaces.
840 | | ...
841 | | ... | *Arguments:*
842 | | ... | _None_
843 | | ...
844 | | ... | *Example:*
845 | | ...
846 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
847 | | ... | circular topology \|
848 | | ...
849 | | ... | _NOTE 1:_ This KW uses following test case variables:
850 | | ... | - tg - TG node.
851 | | ... | - dut1 - DUT1 node.
852 | | ... | - dut2 - DUT2 node.
853 | | ... | - tg_if1 - TG interface towards DUT1.
854 | | ... | - tg_if2 - TG interface towards DUT2.
855 | | ... | - dut1_if1 - DUT1 interface towards TG.
856 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
857 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
858 | | ... | - dut2_if2 - DUT2 interface towards TG.
859 | | ...
860 | | Set interfaces in path up
861 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
862 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
863 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
864
865 | Initialize L2 bridge domains with Vhost-User on node
866 | | [Documentation]
867 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
868 | | ... | defined VPP node. Add each Vhost-User interface into L2 bridge
869 | | ... | domains with learning enabled with physical inteface or Vhost-User
870 | | ... | interface of another VM.
871 | | ...
872 | | ... | *Arguments:*
873 | | ... | - dut - DUT node. Type: string
874 | | ... | - nf_chain - NF chain. Type: integer
875 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
876 | | ...
877 | | ... | *Note:*
878 | | ... | Socket paths for VM are defined in following format:
879 | | ... | - /var/run/vpp/sock-\${VM_ID}-1
880 | | ... | - /var/run/vpp/sock-\${VM_ID}-2
881 | | ...
882 | | ... | *Example:*
883 | | ...
884 | | ... | \| Initialize L2 bridge domains with Vhost-User on node \| DUT1 \
885 | | ... | \| 1 \| 1 \|
886 | | ...
887 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
888 | | ...
889 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
890 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
891 | | ${dut_str}= | Convert To Lowercase | ${dut}
892 | | Add interface to bridge domain
893 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
894 | | ... | ${bd_id1}
895 | | Add interface to bridge domain
896 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
897 | | ... | ${bd_id2}
898 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes} + 1
899 | | | ${qemu_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
900 | | | Configure vhost interfaces for L2BD forwarding
901 | | | ... | ${nodes['${dut}']}
902 | | | ... | /var/run/vpp/sock-${qemu_id}-1 | /var/run/vpp/sock-${qemu_id}-2
903 | | | ... | ${dut}-vhost-${qemu_id}-if1 | ${dut}-vhost-${qemu_id}-if2
904 | | | ${bd_id1}= | Evaluate | ${qemu_id} + (${nf_chain} - 1)
905 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
906 | | | Add interface to bridge domain
907 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if1} | ${bd_id1}
908 | | | Add interface to bridge domain
909 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if2} | ${bd_id2}
910
911 | Initialize L2 bridge domains with Vhost-User
912 | | [Documentation]
913 | | ... | Create pairs of Vhost-User interfaces for defined number of VNF nodes
914 | | ... | on all defined VPP nodes. Add each Vhost-User interface into L2 bridge
915 | | ... | domains with learning enabled with physical inteface or Vhost-User
916 | | ... | interface of another VM.
917 | | ...
918 | | ... | *Arguments:*
919 | | ... | - nf_chain - NF chain. Type: integer
920 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
921 | | ...
922 | | ... | *Example:*
923 | | ...
924 | | ... | \| Initialize L2 bridge domains with Vhost-User \| 1 \| 1 \|
925 | | ...
926 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1}
927 | | ...
928 | | :FOR | ${dut} | IN | @{duts}
929 | | | Initialize L2 bridge domains with Vhost-User on node
930 | | | ... | ${dut} | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
931
932 | Initialize L2 bridge domains for multiple chains with Vhost-User
933 | | [Documentation]
934 | | ... | Create pairs of Vhost-User interfaces for defined number of NF chains
935 | | ... | with defined number of VNF nodes on all defined VPP nodes. Add each
936 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
937 | | ... | with physical inteface or Vhost-User interface of another VM.
938 | | ... | Put all interfaces in path up.
939 | | ...
940 | | ... | *Arguments:*
941 | | ... | - nf_chains - Number of chains of NFs. Type: integer
942 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
943 | | ...
944 | | ... | *Example:*
945 | | ...
946 | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \
947 | | ... | \| 1 \| 1 \|
948 | | ...
949 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
950 | | ...
951 | | Set interfaces in path up
952 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains} + 1
953 | | | Initialize L2 bridge domains with Vhost-User
954 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
955
956 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
957 | | [Documentation]
958 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
959 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
960 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
961 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
962 | | ... | interfaces.
963 | | ...
964 | | Set interfaces in path up
965 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
966 | | ... | 24
967 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
968 | | ... | 24
969 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
970 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
971 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
972 | | ... | 172.16.0.1 | 172.16.0.2
973 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
974 | | ... | 172.16.0.2 | 172.16.0.1
975 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
976 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
977
978 | Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node circular topology
979 | | [Documentation]
980 | | ... | Setup L2 bridge domain topology with VLAN and VXLANoIPv4 by connecting
981 | | ... | pairs of VLAN sub-interface and VXLAN interface to separate L2 bridge
982 | | ... | domain on each DUT. All interfaces are brought up. IPv4 addresses
983 | | ... | with prefix /32 are configured on interfaces between DUTs. VXLAN
984 | | ... | sub-interfaces has same IPv4 address as interfaces.
985 | | ...
986 | | ... | *Arguments:*
987 | | ... | - vxlan_count - VXLAN count. Type: integer
988 | | ...
989 | | ... | *Example:*
990 | | ...
991 | | ... | \| Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node \
992 | | ... | \| circular topology \| ${1} \|
993 | | ...
994 | | [Arguments] | ${vxlan_count}=${1}
995 | | ...
996 | | Set interfaces in path up
997 | | ...
998 | | ${bd_id_start}= | Set Variable | ${1}
999 | | ${vni_start} = | Set Variable | ${20}
1000 | | ...
1001 | | ${ip_step} = | Set Variable | ${2}
1002 | | ${dut1_ip_start}= | Set Variable | 172.16.0.1
1003 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2
1004 | | ...
1005 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut1}
1006 | | ... | node_vxlan_if=${dut1_if2} | node_vlan_if=${dut1_if1}
1007 | | ... | op_node=${dut2} | op_node_if=${dut2_if1} | n_tunnels=${vxlan_count}
1008 | | ... | vni_start=${vni_start} | src_ip_start=${dut1_ip_start}
1009 | | ... | dst_ip_start=${dut2_ip_start} | ip_step=${ip_step}
1010 | | ... | bd_id_start=${bd_id_start}
1011 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut2}
1012 | | ... | node_vxlan_if=${dut2_if1} | node_vlan_if=${dut2_if2}
1013 | | ... | op_node=${dut1} | op_node_if=${dut1_if2} | n_tunnels=${vxlan_count}
1014 | | ... | vni_start=${vni_start} | src_ip_start=${dut2_ip_start}
1015 | | ... | dst_ip_start=${dut1_ip_start} | ip_step=${ip_step}
1016 | | ... | bd_id_start=${bd_id_start}
1017
1018 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
1019 | | [Documentation]
1020 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1021 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1022 | | ... | with physical inteface.
1023 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
1024 | | ... | interfaces on each DUT. All interfaces are brought up.
1025 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1026 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
1027 | | ...
1028 | | ... | *Arguments:*
1029 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1030 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1031 | | ...
1032 | | ... | *Example:*
1033 | | ...
1034 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
1035 | | ... | 3-node circular topology \| 1 \| 2 \|
1036 | | ...
1037 | | [Arguments] | ${bd_id1} | ${bd_id2}
1038 | | ...
1039 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
1040 | | ... | 24
1041 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
1042 | | ... | 24
1043 | | Set interfaces in path up
1044 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
1045 | | ... | 172.16.0.1 | 172.16.0.2
1046 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
1047 | | ... | 172.16.0.2 | 172.16.0.1
1048 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1049 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1050 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1051 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1052 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1053 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
1054 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1055 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1056 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
1057 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1058 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1059 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1060
1061 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
1062 | | [Documentation]
1063 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
1064 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1065 | | ... | one connected to physical interface, the other to VXLAN.
1066 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
1067 | | ... | interfaces on the DUT. All interfaces are brought up.
1068 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
1069 | | ... | DUT and TG.
1070 | | ...
1071 | | ... | *Arguments:*
1072 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
1073 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
1074 | | ... |                         DUT1. Type: string
1075 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
1076 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
1077 | | ... |                         DUT2. Type: string
1078 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
1079 | | ... |             forwarded on DUT1. Type: string
1080 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
1081 | | ... |             forwarded on DUT2. Type: string
1082 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
1083 | | ... |                 Type: list of dicts, dict params vni, vtep
1084 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
1085 | | ... |                 Type: list of dicts, dict params vni, vtep
1086 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
1087 | | ... |                       Type: string
1088 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
1089 | | ... |                     on DUT1. Type: string
1090 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
1091 | | ... |                       Type: string
1092 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
1093 | | ... |                     on DUT2. Type: string
1094 | | ...
1095 | | ... | *Example:*
1096 | | ...
1097 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
1098 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
1099 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
1100 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
1101 | | ...
1102 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1103 | | ... | /var/run/vpp/sock-1-${dut1_bd_id1}
1104 | | ... | /var/run/vpp/sock-1-${dut1_bd_id2}
1105 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} |
1106 | | ... | ${dut1_address} | ${dut1_address_subnet}
1107 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} |
1108 | | ... | ${dut2_address} | ${dut2_address_subnet}
1109 | | ${dut1_bd_id1}= | Set Variable | 1
1110 | | ${dut1_bd_id2}= | Set Variable | 2
1111 | | ${dut2_bd_id1}= | Set Variable | 1
1112 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
1113 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
1114 | | | ... | ${dut1_address} | ${vxlan.vtep}
1115 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
1116 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
1117 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
1118 | | | ... | ${dut2_address} | ${vxlan.vtep}
1119 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
1120 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
1121 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
1122 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
1123 | | ... | gateway=${dut1_gw} | interface=${dut1_if1}
1124 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
1125 | | ... | gateway=${dut2_gw} | interface=${dut2_if2}
1126 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
1127 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
1128 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
1129 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
1130
1131 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
1132 | | [Documentation]
1133 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
1134 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
1135 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
1136 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
1137 | | ... | interfaces are brought up.
1138 | | ...
1139 | | ... | *Arguments:*
1140 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1141 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1142 | | ... | - subid - ID of the sub-interface to be created. Type: string
1143 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1144 | | ...
1145 | | ... | _NOTE:_ This KW uses following test case variables:
1146 | | ... | - dut1 - DUT1 node.
1147 | | ... | - dut2 - DUT2 node.
1148 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
1149 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
1150 | | ...
1151 | | ... | *Example:*
1152 | | ...
1153 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
1154 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
1155 | | ...
1156 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1157 | | ...
1158 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1159 | | ... | Variable Should Exist | ${dut2}
1160 | | ...
1161 | | Set interfaces in path up
1162 | | ...
1163 | | Run Keyword If | '${dut2_status}' == 'PASS'
1164 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1165 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1166 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1167 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1168 | | Run Keyword If | '${dut2_status}' == 'PASS'
1169 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1170 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1171 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1172 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1173 | | ...
1174 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1175 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
1176 | | Run Keyword If | '${dut2_status}' == 'PASS'
1177 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1178 | | ... | ${bd_id2}
1179 | | Run Keyword If | '${dut2_status}' == 'PASS'
1180 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2}
1181 | | ... | ${bd_id2}
1182
1183 | Initialize L2 bridge domains with Vhost-User and VLAN in circular topology
1184 | | [Documentation]
1185 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
1186 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
1187 | | ... | with physical inteface. In case of 3-node topology create VLAN
1188 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
1189 | | ... | sub-interface on dut1-if2 interface. All interfaces are brought up.
1190 | | ...
1191 | | ... | *Arguments:*
1192 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1193 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1194 | | ... | - subid - ID of the sub-interface to be created. Type: string
1195 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1196 | | ...
1197 | | ... | *Example:*
1198 | | ...
1199 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in circular\
1200 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
1201 | | ...
1202 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1203 | | ...
1204 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1205 | | ... | Variable Should Exist | ${dut2}
1206 | | ...
1207 | | Set interfaces in path up
1208 | | ...
1209 | | Run Keyword If | '${dut2_status}' == 'PASS'
1210 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1211 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1212 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1213 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1214 | | Run Keyword If | '${dut2_status}' == 'PASS'
1215 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1216 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1217 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1218 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1219 | | ...
1220 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1221 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1222 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1223 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1224 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1225 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1226 | | Run Keyword If | '${dut2_status}' == 'PASS'
1227 | | ... | Configure vhost interfaces for L2BD forwarding | ${dut2}
1228 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1229 | | Run Keyword If | '${dut2_status}' == 'PASS'
1230 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1231 | | ... | ${bd_id1}
1232 | | Run Keyword If | '${dut2_status}' == 'PASS'
1233 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1234 | | Run Keyword If | '${dut2_status}' == 'PASS'
1235 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1236 | | Run Keyword If | '${dut2_status}' == 'PASS'
1237 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1238
1239 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
1240 | | [Documentation]
1241 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
1242 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
1243 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
1244 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
1245 | | ... | interface into L2 bridge domains with learning enabled with physical
1246 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
1247 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
1248 | | ... | are brought up.
1249 | | ...
1250 | | ... | *Arguments:*
1251 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1252 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1253 | | ... | - subid - ID of the sub-interface to be created. Type: string
1254 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1255 | | ... | - bond_mode - Link bonding mode. Type: string
1256 | | ... | - lb_mode - Load balance mode. Type: string
1257 | | ...
1258 | | ... | *Example:*
1259 | | ...
1260 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
1261 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \
1262 | | ... | \| 10 \| pop-1 \| xor \| l34 \|
1263 | | ...
1264 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1265 | | ... | ${bond_mode} | ${lb_mode}
1266 | | ...
1267 | | Set interfaces in path up
1268 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
1269 | | ... | ${lb_mode}
1270 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1271 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1272 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
1273 | | ... | Variable Should Exist | ${dut1_if2}
1274 | | Run Keyword If | '${if2_status}' == 'PASS'
1275 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1276 | | ... | ${dut1_eth_bond_if1}
1277 | | ... | ELSE
1278 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
1279 | | ... | ${dut1_eth_bond_if1}
1280 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1281 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
1282 | | ... | ${dut1_eth_bond_if1}
1283 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1284 | | ... | ${lb_mode}
1285 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1286 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
1287 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
1288 | | ... | Variable Should Exist | ${dut2_if1}
1289 | | Run Keyword If | '${if1_status}' == 'PASS'
1290 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1291 | | ... | ${dut2_eth_bond_if1}
1292 | | ... | ELSE
1293 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
1294 | | ... | ${dut2_eth_bond_if1}
1295 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1296 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
1297 | | ... | ${dut2_eth_bond_if1}
1298 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
1299 | | Initialize VLAN dot1q sub-interfaces in circular topology
1300 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1301 | | ... | ${subid}
1302 | | Configure L2 tag rewrite method on interfaces
1303 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1304 | | ... | ${tag_rewrite}
1305 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1306 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1307 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1308 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1309 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1310 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1311 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1312 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1313 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1314 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1315 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1316 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1317
1318 | Initialize LISP IPv4 forwarding in 3-node circular topology
1319 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1320 | | ... | Don`t set route.
1321 | | ...
1322 | | ... | *Arguments:*
1323 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1324 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1325 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1326 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1327 | | ... | - duts_prefix - ip prefix. Type: int
1328 | | ...
1329 | | ... | *Return:*
1330 | | ... | - No value returned
1331 | | ...
1332 | | ... | *Example:*
1333 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
1334 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1335 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1336 | | ...
1337 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1338 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1339 | | ...
1340 | | Set interfaces in path up
1341 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac}
1342 | | VPP Add IP Neighbor
1343 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1344 | | VPP Add IP Neighbor
1345 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1346 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg_if2_mac}
1347 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1348 | | ... | ${dut1_tg_address} | ${duts_prefix}
1349 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1350 | | ... | ${dut1_dut2_address} | ${duts_prefix}
1351 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1352 | | ... | ${dut2_dut1_address} | ${duts_prefix}
1353 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1354 | | ... | ${dut2_tg_address} | ${duts_prefix}
1355
1356 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
1357 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
1358 | | ...
1359 | | ... | *Arguments:*
1360 | | ... | - encr_alg - Encryption algorithm. Type: string
1361 | | ... | - auth_alg - Authentication algorithm. Type: string
1362 | | ...
1363 | | ... | *Return:*
1364 | | ... | - No value returned
1365 | | ...
1366 | | ... | *Example:*
1367 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
1368 | | ... | \| ${encr_alg} \| ${auth_alg}
1369 | | ...
1370 | | [Arguments] | ${encr_alg} | ${auth_alg}
1371 | | ...
1372 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
1373 | | Initialize LISP IPv4 forwarding in 3-node circular topology
1374 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
1375 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
1376 | | Configure LISP GPE topology in 3-node circular topology
1377 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
1378 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
1379 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
1380 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
1381 | | Configure manual keyed connection for IPSec
1382 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
1383 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
1384 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
1385 | | Configure manual keyed connection for IPSec
1386 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
1387 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
1388 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
1389
1390 | Initialize LISP IPv6 forwarding in 3-node circular topology
1391 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1392 | | ... | Don`t set route.
1393 | | ...
1394 | | ... | *Arguments:*
1395 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1396 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1397 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1398 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1399 | | ... | - duts_prefix - ip prefix. Type: int
1400 | | ...
1401 | | ... | *Return:*
1402 | | ... | - No value returned
1403 | | ...
1404 | | ... | *Example:*
1405 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
1406 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1407 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1408 | | ...
1409 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1410 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1411 | | ...
1412 | | Set interfaces in path up
1413 | | VPP Interface Set IP Address
1414 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_address} | ${prefix}
1415 | | VPP Interface Set IP Address
1416 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_address} | ${prefix}
1417 | | VPP Interface Set IP Address
1418 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_address} | ${prefix}
1419 | | VPP Interface Set IP Address
1420 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_address} | ${prefix}
1421 | | Vpp All Ra Suppress Link Layer | ${nodes}
1422 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
1423 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg_if2_mac}
1424 | | VPP Add IP Neighbor
1425 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1426 | | VPP Add IP Neighbor
1427 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1428
1429 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
1430 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1431 | | ... | Don`t set route.
1432 | | ...
1433 | | ... | *Arguments:*
1434 | | ... | - dut1_dut2_ip6_address - IPv6 address from DUT1 to DUT2.
1435 | | ... | Type: string
1436 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1437 | | ... | - dut2_dut1_ip6_address - IPv6 address from DUT2 to DUT1.
1438 | | ... | Type: string
1439 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1440 | | ... | - prefix4 - IPv4 prefix. Type: int
1441 | | ... | - prefix6 - IPv6 prefix. Type: int
1442 | | ...
1443 | | ... | *Return:*
1444 | | ... | - No value returned
1445 | | ...
1446 | | ... | *Example:*
1447 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1448 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1449 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1450 | | ... | \| ${prefix4} \| ${prefix6} \|
1451 | | ...
1452 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1453 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1454 | | ... | ${prefix4} | ${prefix6}
1455 | | ...
1456 | | Set interfaces in path up
1457 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1458 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
1459 | | VPP Interface Set IP Address
1460 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address} | ${prefix6}
1461 | | VPP Interface Set IP Address
1462 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address} | ${prefix6}
1463 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1464 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
1465 | | Vpp All Ra Suppress Link Layer | ${nodes}
1466 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac}
1467 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg_if2_mac}
1468 | | VPP Add IP Neighbor
1469 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address} | ${dut2_if1_mac}
1470 | | VPP Add IP Neighbor
1471 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address} | ${dut1_if2_mac}
1472
1473 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
1474 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1475 | | ... | Don`t set route.
1476 | | ...
1477 | | ... | *Arguments:*
1478 | | ... | - dut1_dut2_ip4_address - IPv4 address from DUT1 to DUT2.
1479 | | ... | Type: string
1480 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1481 | | ... | - dut2_dut1_ip4_address - IPv4 address from DUT2 to DUT1.
1482 | | ... | Type: string
1483 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1484 | | ... | - prefix4 - IPv4 prefix. Type: int
1485 | | ... | - prefix6 - IPv6 prefix. Type: int
1486 | | ...
1487 | | ... | *Return:*
1488 | | ... | - No value returned
1489 | | ...
1490 | | ... | *Example:*
1491 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1492 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1493 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1494 | | ... | \| ${prefix6} \| ${prefix4} \|
1495 | | ...
1496 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1497 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1498 | | ... | ${prefix6} | ${prefix4}
1499 | | ...
1500 | | Set interfaces in path up
1501 | | VPP Interface Set IP Address
1502 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address} | ${prefix6}
1503 | | VPP Interface Set IP Address
1504 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1505 | | VPP Interface Set IP Address
1506 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1507 | | VPP Interface Set IP Address
1508 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address} | ${prefix6}
1509 | | Vpp All Ra Suppress Link Layer | ${nodes}
1510 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
1511 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg_if2_mac}
1512 | | VPP Add IP Neighbor
1513 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1514 | | VPP Add IP Neighbor
1515 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1516
1517 | Initialize NAT44 in circular topology
1518 | | [Documentation] | Initialization of 2-node / 3-node topology with NAT44
1519 | | ... | between DUTs:
1520 | | ... | - set interfaces up
1521 | | ... | - set IP addresses
1522 | | ... | - set ARP
1523 | | ... | - create routes
1524 | | ... | - set NAT44 - only on DUT1
1525 | | ...
1526 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1527 | | ... | Variable Should Exist | ${dut2}
1528 | | ...
1529 | | Set interfaces in path up
1530 | | ...
1531 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
1532 | | Run Keyword If | '${dut2_status}' == 'PASS'
1533 | | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1534 | | ... | 11.0.0.1 | 20
1535 | | Run Keyword If | '${dut2_status}' == 'PASS'
1536 | | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1537 | | ... | 11.0.0.2 | 20
1538 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
1539 | | ... | Set Variable | ${dut2}
1540 | | ... | ELSE | Set Variable | ${dut1}
1541 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1542 | | ... | Set Variable | ${dut2_if2}
1543 | | ... | ELSE | Set Variable | ${dut1_if2}
1544 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 12.0.0.1 | 20
1545 | | ...
1546 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
1547 | | Run Keyword If | '${dut2_status}' == 'PASS'
1548 | | ... | VPP Add IP Neighbor
1549 | | ... | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
1550 | | Run Keyword If | '${dut2_status}' == 'PASS'
1551 | | ... | VPP Add IP Neighbor
1552 | | ... | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
1553 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
1554 | | ...
1555 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | gateway=10.0.0.2
1556 | | ... | interface=${dut1_if1}
1557 | | Run Keyword If | '${dut2_status}' == 'PASS'
1558 | | ... | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | gateway=11.0.0.2
1559 | | ... | interface=${dut1_if2}
1560 | | Run Keyword If | '${dut2_status}' == 'PASS'
1561 | | ... | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | gateway=12.0.0.2
1562 | | ... | interface=${dut2_if2}
1563 | | Run Keyword If | '${dut2_status}' == 'PASS'
1564 | | ... | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | gateway=11.0.0.1
1565 | | ... | interface=${dut2_if1}
1566 | | ...
1567 | | Configure inside and outside interfaces
1568 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
1569 | | Configure deterministic mode for NAT44
1570 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
1571
1572 | Initialize L2 xconnect with memif pairs on DUT node
1573 | | [Documentation]
1574 | | ... | Create pairs of Memif interfaces on DUT node. Cross connect each Memif
1575 | | ... | interface with one physical interface or virtual interface to create
1576 | | ... | a chain accross DUT node.
1577 | | ...
1578 | | ... | *Arguments:*
1579 | | ... | - dut - DUT node. Type: dictionary
1580 | | ... | - count - Number of memif pairs (containers). Type: integer
1581 | | ...
1582 | | ... | *Note:*
1583 | | ... | Socket paths for Memif are defined in following format:
1584 | | ... | - /tmp/memif-\${dut}_CNF\${number}-\${sid}
1585 | | ...
1586 | | ... | KW uses test variable \${rxq_count_int} set by KW Add worker threads
1587 | | ... | and rxqueues to all DUTs
1588 | | ...
1589 | | ... | *Example:*
1590 | | ...
1591 | | ... | \| Initialize L2 xconnect with memif pairs on DUT node \| ${dut} \
1592 | | ... | \| ${1} \|
1593 | | ...
1594 | | [Arguments] | ${dut} | ${count}
1595 | | ...
1596 | | :FOR | ${number} | IN RANGE | 1 | ${count}+1
1597 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
1598 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
1599 | | | ${prev_index}= | Evaluate | ${number}-1
1600 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
1601 | | | ... | ${sock1} | ${sock2} | ${number} | ${dut}-memif-${number}-if1
1602 | | | ... | ${dut}-memif-${number}-if2 | ${rxq_count_int} | ${rxq_count_int}
1603 | | | ${xconnect_if1}= | Set Variable If | ${number}==1 | ${${dut}_if1}
1604 | | | ... | ${${dut}-memif-${prev_index}-if2}
1605 | | | Configure L2XC | ${nodes['${dut}']} | ${xconnect_if1}
1606 | | | ... | ${${dut}-memif-${number}-if1}
1607 | | | Run Keyword If | ${number}==${count} | Configure L2XC
1608 | | | ... | ${nodes['${dut}']} | ${${dut}-memif-${number}-if2} | ${${dut}_if2}
1609
1610 | Initialize L2 xconnect with memif pairs
1611 | | [Documentation]
1612 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Cross
1613 | | ... | connect each Memif interface with one physical interface or virtual
1614 | | ... | interface to create a chain accross DUT node.
1615 | | ...
1616 | | ... | *Arguments:*
1617 | | ... | - count - Number of memif pairs (containers). Type: integer
1618 | | ...
1619 | | ... | *Example:*
1620 | | ...
1621 | | ... | \| Initialize L2 xconnect with memif pairs \| ${1} \|
1622 | | ...
1623 | | [Arguments] | ${count}=${1}
1624 | | ...
1625 | | :FOR | ${dut} | IN | @{duts}
1626 | | | Initialize L2 xconnect with memif pairs on DUT node | ${dut} | ${count}
1627 | | Set interfaces in path up
1628 | | Show Memif on all DUTs | ${nodes}
1629 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1630
1631 | Initialize L2 Bridge Domain with memif pairs on DUT node
1632 | | [Documentation]
1633 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
1634 | | ... | to separate L2 bridge domain with one physical or memif interface
1635 | | ... | to create a chain accross DUT node.
1636 | | ...
1637 | | ... | *Arguments:*
1638 | | ... | - dut - DUT node. Type: dictionary
1639 | | ... | - nf_chain - NF chain. Type: integer
1640 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1641 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1642 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1643 | | ...
1644 | | ... | *Note:*
1645 | | ... | Socket paths for Memif are defined in following format:
1646 | | ... | - /tmp/memif-\${dut}_CNF\${nf_id}-\${sid}
1647 | | ...
1648 | | ... | *Example:*
1649 | | ...
1650 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
1651 | | ... | \| ${dut} \| 1 \| 1 \|
1652 | | ...
1653 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
1654 | | ... | ${auto_scale}=${True}
1655 | | ...
1656 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
1657 | | ... | Set Variable | ${rxq_count_int}
1658 | | ... | ELSE | Set Variable | ${1}
1659 | | ${bd_id2}= | Evaluate | ${nf_nodes}+1
1660 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
1661 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2}
1662 | | ... | ${bd_id2}
1663 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
1664 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
1665 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
1666 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
1667 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
1668 | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
1669 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
1670 | | | ${bd_id2}= | Evaluate | ${nf_node}+1
1671 | | | Add interface to bridge domain | ${nodes['${dut}']}
1672 | | | ... | ${${dut}-memif-${nf_id}-if1} | ${nf_node}
1673 | | | Add interface to bridge domain | ${nodes['${dut}']}
1674 | | | ... | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
1675
1676 | Initialize L2 Bridge Domain with memif pairs
1677 | | [Documentation]
1678 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1679 | | ... | Memif interface to separate L2 bridge domain with one physical or
1680 | | ... | virtual interface to create a chain accross DUT node.
1681 | | ...
1682 | | ... | *Arguments:*
1683 | | ... | - nf_chain - NF chain. Type: integer
1684 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1685 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1686 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1687 | | ...
1688 | | ... | *Example:*
1689 | | ...
1690 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| 1 \| 1 \|
1691 | | ...
1692 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1693 | | ...
1694 | | :FOR | ${dut} | IN | @{duts}
1695 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
1696 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1697 | | | ... | auto_scale=${auto_scale}
1698
1699 | Initialize L2 Bridge Domain for multiple chains with memif pairs
1700 | | [Documentation]
1701 | | ... | Create pairs of Memif interfaces for defined number of NF chains
1702 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
1703 | | ... | Memif interface into L2 bridge domains with learning enabled
1704 | | ... | with physical inteface or Memif interface of another NF.
1705 | | ...
1706 | | ... | *Arguments:*
1707 | | ... | - nf_chains - Number of chains of NFs. Type: integer
1708 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1709 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1710 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1711 | | ...
1712 | | ... | *Example:*
1713 | | ...
1714 | | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
1715 | | ... | \| 1 \| 1 \|
1716 | | ...
1717 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1718 | | ...
1719 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
1720 | | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
1721 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
1722 | | Set interfaces in path up
1723 | | Show Memif on all DUTs | ${nodes}
1724 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1725
1726 | Initialize L2 Bridge Domain for pipeline with memif pairs
1727 | | [Documentation]
1728 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1729 | | ... | Memif interface to separate L2 bridge domain with one physical or
1730 | | ... | virtual interface to create a service pipeline on DUT node.
1731 | | ...
1732 | | ... | *Arguments:*
1733 | | ... | - nf_chain - NF pipe. Type: integer
1734 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
1735 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1736 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1737 | | ...
1738 | | ... | *Example:*
1739 | | ...
1740 | | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
1741 | | ... | \| 1 \| 1 \|
1742 | | ...
1743 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1744 | | ...
1745 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
1746 | | ... | Set Variable | ${rxq_count_int}
1747 | | ... | ELSE | Set Variable | ${1}
1748 | | :FOR | ${dut} | IN | @{duts}
1749 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
1750 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2}
1751 | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
1752 | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
1753 | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
1754 | | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
1755 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
1756 | | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
1757 | | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
1758 | | | ... | rxq=${rxq} | txq=${rxq}
1759 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
1760 | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
1761 | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
1762 | | | ... | rxq=${rxq} | txq=${rxq}
1763 | | | Add interface to bridge domain | ${nodes['${dut}']}
1764 | | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1}
1765 | | | Add interface to bridge domain | ${nodes['${dut}']}
1766 | | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2}
1767
1768 | Initialize L2 Bridge Domain for multiple pipelines with memif pairs
1769 | | [Documentation]
1770 | | ... | Create pairs of Memif interfaces for defined number of NF pipelines
1771 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
1772 | | ... | Memif interface into L2 bridge domains with learning enabled
1773 | | ... | with physical inteface or Memif interface of another NF.
1774 | | ...
1775 | | ... | *Arguments:*
1776 | | ... | - nf_chains - Number of pipelines of NFs. Type: integer
1777 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
1778 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1779 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1780 | | ...
1781 | | ... | *Example:*
1782 | | ...
1783 | | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
1784 | | ... | pairs \| 1 \| 1 \|
1785 | | ...
1786 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1787 | | ...
1788 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
1789 | | | Initialize L2 Bridge Domain for pipeline with memif pairs
1790 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1791 | | | ... | auto_scale=${auto_scale}
1792 | | Set interfaces in path up
1793 | | Show Memif on all DUTs | ${nodes}
1794 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1795
1796 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
1797 | | [Documentation]
1798 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1799 | | ... | Memif interface to separate L2 bridge domain with one physical or
1800 | | ... | virtual interface to create a chain accross DUT node. In case of
1801 | | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
1802 | | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
1803 | | ... | interfaces are brought up.
1804 | | ...
1805 | | ... | *Arguments:*
1806 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1807 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1808 | | ... | - subid - ID of the sub-interface to be created. Type: string
1809 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1810 | | ...
1811 | | ... | *Example:*
1812 | | ...
1813 | | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
1814 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
1815 | | ...
1816 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1817 | | ...
1818 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1819 | | ... | Variable Should Exist | ${dut2}
1820 | | ...
1821 | | Set interfaces in path up
1822 | | ...
1823 | | Run Keyword If | '${dut2_status}' == 'PASS'
1824 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1825 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1826 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1827 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1828 | | Run Keyword If | '${dut2_status}' == 'PASS'
1829 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1830 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1831 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1832 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1833 | | ...
1834 | | ${number}= | Set Variable | ${1}
1835 | | ${sock1}= | Set Variable | memif-DUT1_CNF
1836 | | ${sock2}= | Set Variable | memif-DUT1_CNF
1837 | | ${memif_if1_name}= | Set Variable | DUT1-memif-${number}-if1
1838 | | ${memif_if2_name}= | Set Variable | DUT1-memif-${number}-if2
1839 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock2}
1840 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
1841 | | ... | ${rxq_count_int}
1842 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1843 | | Add interface to bridge domain | ${dut1} | ${${memif_if1_name}} | ${bd_id1}
1844 | | Add interface to bridge domain | ${dut1} | ${${memif_if2_name}} | ${bd_id2}
1845 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1846 | | ${sock1}= | Run Keyword If | '${dut2_status}' == 'PASS'
1847 | | ... | Set Variable | memif-DUT2_CNF
1848 | | ${sock2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1849 | | ... | Set Variable | memif-DUT2_CNF
1850 | | ${memif_if1_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
1851 | | ... | Set Variable | DUT2-memif-${number}-if1
1852 | | ${memif_if2_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
1853 | | ... | Set Variable | DUT2-memif-${number}-if2
1854 | | Run Keyword If | '${dut2_status}' == 'PASS'
1855 | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock1} | ${sock2}
1856 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
1857 | | ... | ${rxq_count_int}
1858 | | Run Keyword If | '${dut2_status}' == 'PASS'
1859 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1860 | | ... | ${bd_id1}
1861 | | Run Keyword If | '${dut2_status}' == 'PASS'
1862 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if1_name}}
1863 | | ... | ${bd_id1}
1864 | | Run Keyword If | '${dut2_status}' == 'PASS'
1865 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if2_name}}
1866 | | ... | ${bd_id2}
1867 | | Run Keyword If | '${dut2_status}' == 'PASS'
1868 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1869 | | ...
1870 | | Show Memif on all DUTs | ${nodes}
1871 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1872
1873 | Initialize L2 xconnect for single memif
1874 | | [Documentation]
1875 | | ... | Create single Memif interface on all defined VPP nodes. Cross
1876 | | ... | connect Memif interface with one physical interface.
1877 | | ...
1878 | | ... | *Arguments:*
1879 | | ... | - number - Memif ID. Type: integer
1880 | | ...
1881 | | ... | *Note:*
1882 | | ... | Socket paths for Memif are defined in following format:
1883 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
1884 | | ...
1885 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
1886 | | ... | and rxqueues to all DUTs
1887 | | ...
1888 | | ... | *Example:*
1889 | | ...
1890 | | ... | \| Initialize L2 xconnect for single memif \| 1 \|
1891 | | ...
1892 | | [Arguments] | ${number}=${1}
1893 | | ...
1894 | | :FOR | ${dut} | IN | @{duts}
1895 | | | ${sock}= | Set Variable | memif-${dut}_CNF
1896 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
1897 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
1898 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
1899 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
1900 | | | Configure L2XC | ${nodes['${dut}']} | ${${dut}_if1}
1901 | | | ... | ${${dut}-memif-${number}-if1}
1902 | | Set single interfaces in path up
1903 | | Show Memif on all DUTs | ${nodes}
1904 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1905
1906 | Initialize L2 Bridge Domain for single memif
1907 | | [Documentation]
1908 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
1909 | | ... | interface to separate L2 bridge domain with one physical interface.
1910 | | ...
1911 | | ... | *Arguments:*
1912 | | ... | - number - Memif ID. Type: integer
1913 | | ...
1914 | | ... | *Note:*
1915 | | ... | Socket paths for Memif are defined in following format:
1916 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
1917 | | ...
1918 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
1919 | | ... | and rxqueues to all DUTs
1920 | | ...
1921 | | ... | *Example:*
1922 | | ...
1923 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
1924 | | ...
1925 | | [Arguments] | ${number}=${1}
1926 | | ...
1927 | | :FOR | ${dut} | IN | @{duts}
1928 | | | ${sock}= | Set Variable | memif-${dut}_CNF
1929 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
1930 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
1931 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
1932 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
1933 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1}
1934 | | | ... | ${number}
1935 | | | Add interface to bridge domain | ${nodes['${dut}']}
1936 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
1937 | | Set single interfaces in path up
1938 | | Show Memif on all DUTs | ${nodes}
1939
1940 | Configure ACLs on a single interface
1941 | | [Documentation]
1942 | | ... | Configure ACL
1943 | | ...
1944 | | ... | *Arguments:*
1945 | | ... | - dut - DUT node. Type: string
1946 | | ... | - dut_if - DUT node interface name. Type: string
1947 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
1948 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
1949 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
1950 | | ...
1951 | | ... | *Example:*
1952 | | ...
1953 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
1954 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
1955 | | ...
1956 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
1957 | | ... | @{subnets}
1958 | | Set Test variable | ${acl} | ${EMPTY}
1959 | | :FOR | ${subnet} | IN | @{subnets}
1960 | | | ${acl} = | Run Keyword If | '${acl}' == '${EMPTY}'
1961 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
1962 | | | ... | ELSE
1963 | | | ... | Catenate | SEPARATOR=", " | ${acl}
1964 | | | ... | ipv4 ${acl_action} src ${subnet}
1965 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
1966 | | @{acl_list} = | Create List | ${0}
1967 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
1968 | | ... | ${acl_list}