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