1 # Copyright 2015-2016 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # The 1st value of SUPPORTED_TUNNELING_PROTO is used as the default
16 # tunneling protocol for OP2P tests.
17 SUPPORTED_TUNNELING_PROTO = ['vxlan', 'gre', 'geneve']
20 # Generic test configuration options are described at conf/01_testcases.conf
24 # Options specific to integration testcases are described below:
26 # Required for OP2P tests
27 # "Tunnel Type": ["vxlan"|"gre"|"geneve"] # Tunnel Type defines tunneling protocol to use.
28 # # It can be overridden by cli option tunnel_type.
30 # # "vxlan" - iteration of destination MAC address
31 # # "gre" - iteration of destination IP address
32 # # "geneve" - iteration of destination UDP port
33 # # Default value is "vxlan".
35 # biDirectional testing for OP2P is not yet supported.
36 # biDirectional must be set to False.
38 # "TestSteps": [] # Definition of integration test steps.
39 # # In case that this list is defined, then
40 # # vsperf will execute defined test steps
41 # # one by one. It can be used to configure
42 # # vswitch, insert flows and transmit traffic.
43 # # It is possible to refer to result of any
44 # # previous step through #STEP[i][j] macro.
45 # # Where i is a number of step (starts from 0)
46 # # and j is index of result returned by step i.
49 # Common TestSteps parts ("macros")
53 STEP_VSWITCH_P2P_FLOWS_INIT = [
54 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
55 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
56 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
57 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
58 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
61 STEP_VSWITCH_P2P_FLOWS_FINIT = [
62 ['vswitch', 'dump_flows', 'int_br0'],
63 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
64 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
65 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
66 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
67 ['vswitch', 'del_switch', 'int_br0'],
71 STEP_VSWITCH_PVP_INIT = [
72 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
73 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
74 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
75 ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1 ports
76 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
79 STEP_VSWITCH_PVP_FINIT = [
80 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
81 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
82 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
83 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
84 ['vswitch', 'del_switch', 'int_br0'],
87 STEP_VSWITCH_PVP_FLOWS_INIT = STEP_VSWITCH_PVP_INIT + [
88 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
89 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
90 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
91 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
94 STEP_VSWITCH_PVP_FLOWS_FINIT = [
95 ['vswitch', 'dump_flows', 'int_br0'],
96 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
97 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
98 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
99 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
100 ] + STEP_VSWITCH_PVP_FINIT
102 STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [
103 ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2 ports
104 ['vswitch', 'add_vport', 'int_br0'], # STEP 6
107 STEP_VSWITCH_PVVP_FINIT = [
108 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], # vm2 ports
109 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
110 ] + STEP_VSWITCH_PVP_FINIT
112 STEP_VSWITCH_PVVP_FLOWS_INIT = STEP_VSWITCH_PVVP_INIT + [
113 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
114 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
115 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
116 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
117 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][1]', 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
118 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
121 STEP_VSWITCH_PVVP_FLOWS_FINIT = [
122 ['vswitch', 'dump_flows', 'int_br0'],
123 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
124 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[4][1]'}],
125 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[6][1]'}],
126 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}],
127 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[5][1]'}],
128 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
129 ] + STEP_VSWITCH_PVVP_FINIT
131 STEP_VSWITCH_2PHY_2VM_INIT = STEP_VSWITCH_PVVP_INIT
133 STEP_VSWITCH_2PHY_2VM_FINIT = STEP_VSWITCH_PVVP_FINIT
135 STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT = [
136 # Setup Flows to reply ICMPv6 and similar packets, so to
137 # avoid flooding the internal port with their re-transmissions
138 ['vswitch', 'add_flow', 'int_br0', \
139 {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
140 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
141 ['vswitch', 'add_flow', 'int_br0', \
142 {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
143 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
144 ['vswitch', 'add_flow', 'int_br0', \
145 {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
146 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
147 ['vswitch', 'add_flow', 'int_br0', \
148 {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
149 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
150 # Forward UDP packets depending on dest port
151 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
152 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
153 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
154 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
155 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
156 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
157 # Send VM outputs to phy port #2
158 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
159 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
160 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
161 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
164 STEP_VSWITCH_2PHY_4VM_INIT = STEP_VSWITCH_2PHY_2VM_INIT + [
165 ['vswitch', 'add_vport', 'int_br0'], # STEP 7 vm3 ports
166 ['vswitch', 'add_vport', 'int_br0'], # STEP 8
167 ['vswitch', 'add_vport', 'int_br0'], # STEP 9 vm4 ports
168 ['vswitch', 'add_vport', 'int_br0'], # STEP 10
171 STEP_VSWITCH_2PHY_4VM_FINIT = [
172 ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'], # vm3 ports
173 ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'],
174 ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'], # vm4 ports
175 ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'],
176 ] + STEP_VSWITCH_2PHY_2VM_FINIT
178 STEP_VSWITCH_FLOWS_FINIT = [
179 ['vswitch', 'dump_flows', 'int_br0'],
180 ['vswitch', 'del_flow', 'int_br0'],
183 STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT = [
184 # Setup Flows to reply ICMPv6 and similar packets, so to
185 # avoid flooding the internal port with their re-transmissions
186 ['vswitch', 'add_flow', 'int_br0', \
187 {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
188 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
189 ['vswitch', 'add_flow', 'int_br0', \
190 {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
191 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
192 ['vswitch', 'add_flow', 'int_br0', \
193 {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
194 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
195 ['vswitch', 'add_flow', 'int_br0', \
196 {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
197 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
198 ['vswitch', 'add_flow', 'int_br0', \
199 {'priority': '1', 'dl_src': '00:00:00:00:00:05', \
200 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
201 ['vswitch', 'add_flow', 'int_br0', \
202 {'priority': '1', 'dl_src': '00:00:00:00:00:06', \
203 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}],
204 ['vswitch', 'add_flow', 'int_br0', \
205 {'priority': '1', 'dl_src': '00:00:00:00:00:07', \
206 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
207 ['vswitch', 'add_flow', 'int_br0', \
208 {'priority': '1', 'dl_src': '00:00:00:00:00:08', \
209 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}],
210 # Forward UDP packets depending on dest port
211 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
212 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
213 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
214 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
215 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
216 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
217 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
218 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '2', \
219 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
220 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
221 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '3', \
222 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
223 # Send VM outputs to phy port #2
224 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
225 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
226 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
227 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
228 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \
229 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
230 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \
231 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
234 STEP_VSWITCH_2PHY_6VM_INIT = STEP_VSWITCH_2PHY_4VM_INIT + [
235 ['vswitch', 'add_vport', 'int_br0'], # STEP 11 vm5 vhu8
236 ['vswitch', 'add_vport', 'int_br0'], # STEP 12 vhu9
237 ['vswitch', 'add_vport', 'int_br0'], # STEP 13 vm6 vhu10
238 ['vswitch', 'add_vport', 'int_br0'], # STEP 14 vhu11
241 STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT = STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [
242 ['vswitch', 'add_flow', 'int_br0', \
243 {'priority': '1', 'dl_src': '00:00:00:00:00:09', \
244 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
245 ['vswitch', 'add_flow', 'int_br0', \
246 {'priority': '1', 'dl_src': '00:00:00:00:00:0a', \
247 'actions': ['output:#STEP[12][1]'], 'idle_timeout': '0'}],
248 ['vswitch', 'add_flow', 'int_br0', \
249 {'priority': '1', 'dl_src': '00:00:00:00:00:0b', \
250 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}],
251 ['vswitch', 'add_flow', 'int_br0', \
252 {'priority': '1', 'dl_src': '00:00:00:00:00:0c', \
253 'actions': ['output:#STEP[14][1]'], 'idle_timeout': '0'}],
254 # Forward UDP packets depending on dest port
255 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
256 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '4', \
257 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
258 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
259 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '5', \
260 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}],
261 # Send VM outputs to phy port #2
262 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[12][1]', \
263 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
264 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[14][1]', \
265 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
268 STEP_VSWITCH_2PHY_6VM_FINIT = [
269 ['vswitch', 'del_port', 'int_br0', '#STEP[11][0]'], # vm5 ports
270 ['vswitch', 'del_port', 'int_br0', '#STEP[12][0]'],
271 ['vswitch', 'del_port', 'int_br0', '#STEP[13][0]'], # vm6 ports
272 ['vswitch', 'del_port', 'int_br0', '#STEP[14][0]'],
273 ] + STEP_VSWITCH_2PHY_4VM_FINIT
276 # Definition of integration tests
278 INTEGRATION_TESTS = [
280 "Name": "overlay_p2p_mod_tput",
281 "Traffic Type": "rfc2544",
282 "Deployment": "ptunp",
283 "biDirectional": 'True',
284 "Tunnel Type": "vxlan",
285 "Description": ("Tunneling Throughput RFC2544 Test."
286 "The encap and decap are performed inside the "
287 "virtual switch itself in each direction to avoid "
288 "the need of ingress overlay traffic."),
291 "Name": "overlay_p2p_tput",
292 "Traffic Type": "rfc2544",
293 "Deployment": "op2p",
294 "biDirectional": 'False',
295 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
296 "Tunnel Operation": "encapsulation",
297 "Description": "Overlay Encapsulation Throughput RFC2544 Test",
300 "Name": "overlay_p2p_cont",
301 "Traffic Type": "continuous",
302 "Deployment": "op2p",
303 "biDirectional": 'False',
304 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
305 "Tunnel Operation": "encapsulation",
306 "Description": "Overlay Encapsulation Continuous Stream",
309 "Name": "overlay_p2p_decap_tput",
310 "Traffic Type": "rfc2544",
311 "Deployment": "op2p",
312 "biDirectional": 'False',
313 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
314 "Tunnel Operation": "decapsulation",
315 "Description": "Overlay Decapsulation Throughput RFC2544 Test",
318 "Name": "overlay_p2p_decap_cont",
319 "Traffic Type": "continuous",
320 "Deployment": "op2p",
321 "biDirectional": 'False',
322 "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
323 "Tunnel Operation": "decapsulation",
324 "Description": "Overlay Decapsulation Continuous Stream",
327 "Name": "vswitch_add_del_bridge",
328 "Deployment": "clean",
329 "Description": "vSwitch - add and delete bridge",
331 ['vswitch', 'add_switch', 'int_br0'],
332 ['vswitch', 'del_switch', 'int_br0'],
336 "Name": "vswitch_add_del_bridges",
337 "Deployment": "clean",
338 "Description": "vSwitch - add and delete bridges",
340 ['vswitch', 'add_switch', 'int_br0'],
341 ['vswitch', 'add_switch', 'int_br1'],
342 ['vswitch', 'del_switch', 'int_br0'],
343 ['vswitch', 'del_switch', 'int_br1'],
347 "Name": "vswitch_add_del_phy_port",
348 "Deployment": "clean",
349 "Description": "vSwitch - add and delete physical port",
351 ['vswitch', 'add_switch', 'int_br0'],
352 ['vswitch', 'add_phy_port', 'int_br0'],
353 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
354 ['vswitch', 'del_switch', 'int_br0'],
358 "Name": "vswitch_add_del_phy_ports",
359 "Deployment": "clean",
360 "Description": "vSwitch - add and delete physical ports",
362 ['vswitch', 'add_switch', 'int_br0'],
363 ['vswitch', 'add_phy_port', 'int_br0'],
364 ['vswitch', 'add_phy_port', 'int_br0'],
365 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
366 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
367 ['vswitch', 'del_switch', 'int_br0'],
371 "Name": "vswitch_add_del_vport",
372 "Deployment": "clean",
373 "Description": "vSwitch - add and delete virtual port",
375 ['vswitch', 'add_switch', 'int_br0'],
376 ['vswitch', 'add_vport', 'int_br0'],
377 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
378 ['vswitch', 'del_switch', 'int_br0'],
382 "Name": "vswitch_add_del_vports",
383 "Deployment": "clean",
384 "Description": "vSwitch - add and delete virtual ports",
386 ['vswitch', 'add_switch', 'int_br0'],
387 ['vswitch', 'add_vport', 'int_br0'],
388 ['vswitch', 'add_vport', 'int_br0'],
389 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
390 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
391 ['vswitch', 'del_switch', 'int_br0'],
395 "Name": "vswitch_add_del_flow",
396 "Deployment": "clean",
397 "Description": "vSwitch - add and delete flow",
399 ['vswitch', 'add_switch', 'int_br0'],
400 ['vswitch', 'add_phy_port', 'int_br0'],
401 ['vswitch', 'add_phy_port', 'int_br0'],
402 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
403 ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
404 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
405 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
406 ['vswitch', 'del_switch', 'int_br0'],
410 "Name": "vswitch_add_del_flows",
411 "Deployment": "clean",
412 "Description": "vSwitch - add and delete flows",
413 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
414 STEP_VSWITCH_P2P_FLOWS_FINIT
417 "Name": "vswitch_p2p_tput",
418 "Deployment": "clean",
419 "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
420 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
422 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
424 STEP_VSWITCH_P2P_FLOWS_FINIT
427 "Name": "vswitch_p2p_back2back",
428 "Deployment": "clean",
429 "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
430 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
432 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
434 STEP_VSWITCH_P2P_FLOWS_FINIT
437 "Name": "vswitch_p2p_cont",
438 "Deployment": "clean",
439 "Description": "vSwitch - configure switch and execute continuous stream test",
440 "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
442 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
444 STEP_VSWITCH_P2P_FLOWS_FINIT
447 "Name": "vswitch_pvp",
448 "Deployment": "clean",
449 "Description": "vSwitch - configure switch and one vnf",
450 "TestSteps": STEP_VSWITCH_PVP_INIT +
455 STEP_VSWITCH_PVP_FINIT
458 "Name": "vswitch_pvp_tput",
459 "Deployment": "clean",
460 "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
461 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
464 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
467 STEP_VSWITCH_PVP_FLOWS_FINIT
470 "Name": "vswitch_pvp_back2back",
471 "Deployment": "clean",
472 "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
473 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
476 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
479 STEP_VSWITCH_PVP_FLOWS_FINIT
482 "Name": "vswitch_pvp_cont",
483 "Deployment": "clean",
484 "Description": "vSwitch - configure switch, vnf and execute continuous stream test",
485 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
488 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
491 STEP_VSWITCH_PVP_FLOWS_FINIT
494 "Name": "vswitch_pvp_all",
495 "Deployment": "clean",
496 "Description": "vSwitch - configure switch, vnf and execute all test types",
497 "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
500 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
501 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
502 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
505 STEP_VSWITCH_PVP_FLOWS_FINIT
508 "Name": "vswitch_pvvp",
509 "Deployment": "clean",
510 "Description": "vSwitch - configure switch and two vnfs",
511 "TestSteps": STEP_VSWITCH_PVVP_INIT +
518 STEP_VSWITCH_PVVP_FINIT
521 "Name": "vswitch_pvvp_tput",
522 "Deployment": "clean",
523 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
524 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
528 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
532 STEP_VSWITCH_PVVP_FLOWS_FINIT
535 "Name": "vswitch_pvvp_back2back",
536 "Deployment": "clean",
537 "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
538 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
542 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
546 STEP_VSWITCH_PVVP_FLOWS_FINIT
549 "Name": "vswitch_pvvp_cont",
550 "Deployment": "clean",
551 "Description": "vSwitch - configure switch, two chained vnfs and execute continuous stream test",
552 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
556 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
560 STEP_VSWITCH_PVVP_FLOWS_FINIT
563 "Name": "vswitch_pvvp_all",
564 "Deployment": "clean",
565 "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
566 "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
570 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
571 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
572 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
576 STEP_VSWITCH_PVVP_FLOWS_FINIT
579 # Topology: 2 Parallel PVP connections
580 # To run a Linux bridge as a loopback in the Guest use:
581 # --test-params "guest_loopback=linux_bridge" --integration 2pvp_udp_dest_flows
582 "Name": "2pvp_udp_dest_flows",
583 "Description": "Continuous TC with 2 Parallel VMs, flows on UDP Dest Port",
584 "Deployment": "clean",
587 "TestSteps": STEP_VSWITCH_2PHY_2VM_INIT +
588 STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT + [
592 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
596 ] + STEP_VSWITCH_FLOWS_FINIT +
597 STEP_VSWITCH_2PHY_2VM_FINIT
600 # Topology: 4 Parallel PVP connections
601 # To run a Linux bridge as a loopback in the Guest use:
602 # --test-params "guest_loopback=linux_bridge" --integration 4pvp_udp_dest_flows
603 "Name": "4pvp_udp_dest_flows",
604 "Description": "Continuous TC with 4 Parallel VMs, flows on UDP Dest Port",
605 "Deployment": "clean",
608 "TestSteps": STEP_VSWITCH_2PHY_4VM_INIT +
609 STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [
615 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
621 ] + STEP_VSWITCH_FLOWS_FINIT +
622 STEP_VSWITCH_2PHY_4VM_FINIT
625 # Topology: 6 Parallel PVP connections
626 # To run a Linux bridge as a loopback in the Guest use:
627 # --test-params "guest_loopback=linux_bridge" --integration 6pvp_udp_dest_flows
628 "Name": "6pvp_udp_dest_flows",
629 "Description": "Continuous TC with 6 Parallel VMs, flows on UDP Dest Port",
630 "Deployment": "clean",
633 "TestSteps": STEP_VSWITCH_2PHY_6VM_INIT +
634 STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT + [
642 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'False'}],
649 ] + STEP_VSWITCH_FLOWS_FINIT +
650 STEP_VSWITCH_2PHY_6VM_FINIT
653 # Testcase for verification of vHost User NUMA awareness feature
654 # introduced in DPDK v2.2. Test case will execute two VNFs, each
655 # pinned to different NUMA slot. After that it will verify that
656 # QEMU and PMD threads serving its interfaces are co-located
657 # at the same NUMA slot.
660 # * architecture with at least 2 NUMA slots
661 # * OVS with DPDK support and DPDK v2.2 and newer
662 # * OVS configuration utilizing both NUMA slots
664 # Example of OVS configuration valid for DPDK v16.04 and cores
665 # split between NUMA slots as follows:
666 # node 0 cpus: 0 1 2 3 4 5 6 7 8 9
667 # node 1 cpus: 10 11 12 13 14 15 16 17 18 19
669 # VSWITCH_PMD_CPU_MASK = '1010'
670 # VSWITCHD_DPDK_CONFIG = {
671 # 'dpdk-init' : 'true',
672 # 'dpdk-lcore-mask' : '0x4004',
673 # 'pmd-cpu-mask' : 'FF0FF',
674 # 'dpdk-socket-mem' : '1024,1024',
677 "Name": "vhost_numa_awareness",
678 "Deployment": "clean",
679 "Description": "vSwitch DPDK - verify that PMD threads are served "
680 "by the same NUMA slot as QEMU instances",
681 "vSwitch" : "OvsDpdkVhost",
682 "TestSteps": STEP_VSWITCH_PVVP_INIT + # STEP 0-6
684 # check that at least 2 numa slots are available
685 ['tools', 'exec', 'numactl -H', 'available: ([0-9]+)'], # STEP 7
686 ['tools', 'assert', '#STEP[-1][0]>1'], # STEP 8
687 # store last 2 cores from numa slot 0
688 ['tools', 'exec', 'numactl -H', 'node 0 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 9
689 # store last 2 cores from numa slot 1
690 ['tools', 'exec', 'numactl -H', 'node 1 cpus:.*\s+(\\d+) (\\d+)$'], # STEP 10
691 # pin VNF1 to 1st NUMA slot and VNF2 to 2nd NUMA slot
692 ['settings', 'setValue', 'GUEST_CORE_BINDING', # STEP 11
693 [("#STEP[-2][0][0]", "#STEP[-2][0][1]"),
694 ("#STEP[-1][0][0]", "#STEP[-1][0][1]")]
697 ['vnf1', 'start'], # STEP 12
698 ['vnf2', 'start'], # STEP 13
699 # read paths to ovs utilities
700 ['settings', 'getValue', 'TOOLS'], # STEP 14
701 # check that PMD thread serving VNF1 runs at NUMA slot 0
702 ## i.e. get numa slot ID serving dpdhvhostuser0...
703 ['tools', 'exec', "sudo #STEP[-1]['ovs-appctl'] " # STEP 15
704 "dpif-netdev/pmd-rxq-show | "
705 "sed -e '/dpdkvhostuser0/,$d' | tac",
706 'pmd thread numa_id ([0-9])+'
708 ## ...and check that it is NUMA slot 0
709 ['tools', 'assert', '#STEP[-1][0]==0'], # STEP 16
710 # check that PMD thread serving VNF2 runs at NUMA slot 1
711 ## i.e. get numa slot ID serving dpdhvhostuser2...
712 ['tools', 'exec', "sudo #STEP[-3]['ovs-appctl'] " # STEP 17
713 "dpif-netdev/pmd-rxq-show | "
714 "sed -e '/dpdkvhostuser2/,$d' | tac",
715 'pmd thread numa_id ([0-9])+'
717 ## ...and check that it is NUMA slot 1
718 ['tools', 'assert', '#STEP[-1][0]==1'], # STEP 18
720 ['vnf2', 'stop'], # STEP 19
721 ['vnf1', 'stop'], # STEP 20
723 STEP_VSWITCH_PVVP_FINIT # STEP 21...
727 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
729 # "Name": "ovs_vanilla_linux_bridge_pvp_cont",
730 # "Deployment": "clean",
731 # "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
732 # "vSwitch" : "OvsVanilla",
733 # "VNF" : "QemuVirtioNet",
734 # "Trafficgen": "IxNet",
735 # "Parameters": {"guest_loopback" : "linux_bridge"},
736 # "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
739 # ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
742 # STEP_VSWITCH_PVP_FLOWS_FINIT