integration: Support for VxLAN TC without using overlay traffic gen.
[vswitchperf.git] / conf / integration / 01_testcases.conf
1 # Copyright 2015-2016 Intel Corporation.
2 #
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
6 #
7 #   http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
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']
18
19 #
20 # Generic test configuration options are described at conf/01_testcases.conf
21 #
22
23 #
24 # Options specific to integration testcases are described below:
25 #
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.
29 #                                   # Values:
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".
34 #
35 # biDirectional testing for OP2P is not yet supported.
36 # biDirectional must be set to False.
37 #
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.
47
48 #
49 # Common TestSteps parts ("macros")
50 #
51
52 # P2P 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'}],
59 ]
60
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'],
68 ]
69
70 # PVP and PVVP macros
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
76     ['vswitch', 'add_vport', 'int_br0'],            # STEP 4
77 ]
78
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'],
85 ]
86
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'}],
92 ]
93
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
101
102 STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [
103     ['vswitch', 'add_vport', 'int_br0'],            # STEP 5
104     ['vswitch', 'add_vport', 'int_br0'],            # STEP 6
105 ]
106
107 STEP_VSWITCH_PVVP_FINIT = [
108     ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'],
109     ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
110 ] + STEP_VSWITCH_PVP_FINIT
111
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'}],
119 ]
120
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
130
131 #
132 # Definition of integration tests
133 #
134 INTEGRATION_TESTS = [
135     {
136         "Name": "overlay_p2p_mod_tput",
137         "Traffic Type": "rfc2544",
138         "Deployment": "ptunp",
139         "biDirectional": 'True',
140         "Tunnel Type": "vxlan",
141         "Description": ("Tunneling Throughput RFC2544 Test."
142                        "The encap and decap are performed inside the "
143                        "virtual switch itself in each direction to avoid "
144                        "the need of ingress overlay traffic."),
145     },
146     {
147         "Name": "overlay_p2p_tput",
148         "Traffic Type": "rfc2544",
149         "Deployment": "op2p",
150         "biDirectional": 'False',
151         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
152         "Tunnel Operation": "encapsulation",
153         "Description": "Overlay Encapsulation Throughput RFC2544 Test",
154     },
155     {
156         "Name": "overlay_p2p_cont",
157         "Traffic Type": "continuous",
158         "Deployment": "op2p",
159         "biDirectional": 'False',
160         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
161         "Tunnel Operation": "encapsulation",
162         "Description": "Overlay Encapsulation Continuous Stream",
163     },
164     {
165         "Name": "overlay_p2p_decap_tput",
166         "Traffic Type": "rfc2544",
167         "Deployment": "op2p",
168         "biDirectional": 'False',
169         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
170         "Tunnel Operation": "decapsulation",
171         "Description": "Overlay Decapsulation Throughput RFC2544 Test",
172     },
173     {
174         "Name": "overlay_p2p_decap_cont",
175         "Traffic Type": "continuous",
176         "Deployment": "op2p",
177         "biDirectional": 'False',
178         "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0],
179         "Tunnel Operation": "decapsulation",
180         "Description": "Overlay Decapsulation Continuous Stream",
181     },
182     {
183         "Name": "vswitch_add_del_bridge",
184         "Deployment": "clean",
185         "Description": "vSwitch - add and delete bridge",
186         "TestSteps": [
187                         ['vswitch', 'add_switch', 'int_br0'],
188                         ['vswitch', 'del_switch', 'int_br0'],
189                      ]
190     },
191     {
192         "Name": "vswitch_add_del_bridges",
193         "Deployment": "clean",
194         "Description": "vSwitch - add and delete bridges",
195         "TestSteps": [
196                         ['vswitch', 'add_switch', 'int_br0'],
197                         ['vswitch', 'add_switch', 'int_br1'],
198                         ['vswitch', 'del_switch', 'int_br0'],
199                         ['vswitch', 'del_switch', 'int_br1'],
200                      ]
201     },
202     {
203         "Name": "vswitch_add_del_phy_port",
204         "Deployment": "clean",
205         "Description": "vSwitch - add and delete physical port",
206         "TestSteps": [
207                         ['vswitch', 'add_switch', 'int_br0'],
208                         ['vswitch', 'add_phy_port', 'int_br0'],
209                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
210                         ['vswitch', 'del_switch', 'int_br0'],
211                      ]
212     },
213     {
214         "Name": "vswitch_add_del_phy_ports",
215         "Deployment": "clean",
216         "Description": "vSwitch - add and delete physical ports",
217         "TestSteps": [
218                         ['vswitch', 'add_switch', 'int_br0'],
219                         ['vswitch', 'add_phy_port', 'int_br0'],
220                         ['vswitch', 'add_phy_port', 'int_br0'],
221                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
222                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
223                         ['vswitch', 'del_switch', 'int_br0'],
224                      ]
225     },
226     {
227         "Name": "vswitch_add_del_vport",
228         "Deployment": "clean",
229         "Description": "vSwitch - add and delete virtual port",
230         "TestSteps": [
231                         ['vswitch', 'add_switch', 'int_br0'],
232                         ['vswitch', 'add_vport', 'int_br0'],
233                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
234                         ['vswitch', 'del_switch', 'int_br0'],
235                      ]
236     },
237     {
238         "Name": "vswitch_add_del_vports",
239         "Deployment": "clean",
240         "Description": "vSwitch - add and delete virtual ports",
241         "TestSteps": [
242                         ['vswitch', 'add_switch', 'int_br0'],
243                         ['vswitch', 'add_vport', 'int_br0'],
244                         ['vswitch', 'add_vport', 'int_br0'],
245                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
246                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
247                         ['vswitch', 'del_switch', 'int_br0'],
248                      ]
249     },
250     {
251         "Name": "vswitch_add_del_flow",
252         "Deployment": "clean",
253         "Description": "vSwitch - add and delete flow",
254         "TestSteps": [
255                         ['vswitch', 'add_switch', 'int_br0'],
256                         ['vswitch', 'add_phy_port', 'int_br0'],
257                         ['vswitch', 'add_phy_port', 'int_br0'],
258                         ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
259                         ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[1][1]'}],
260                         ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
261                         ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
262                         ['vswitch', 'del_switch', 'int_br0'],
263                      ]
264     },
265     {
266         "Name": "vswitch_add_del_flows",
267         "Deployment": "clean",
268         "Description": "vSwitch - add and delete flows",
269         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
270                      STEP_VSWITCH_P2P_FLOWS_FINIT
271     },
272     {
273         "Name": "vswitch_p2p_tput",
274         "Deployment": "clean",
275         "Description": "vSwitch - configure switch and execute RFC2544 throughput test",
276         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
277                      [
278                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
279                      ] +
280                      STEP_VSWITCH_P2P_FLOWS_FINIT
281     },
282     {
283         "Name": "vswitch_p2p_back2back",
284         "Deployment": "clean",
285         "Description": "vSwitch - configure switch and execute RFC2544 back2back test",
286         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
287                      [
288                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
289                      ] +
290                      STEP_VSWITCH_P2P_FLOWS_FINIT
291     },
292     {
293         "Name": "vswitch_p2p_cont",
294         "Deployment": "clean",
295         "Description": "vSwitch - configure switch and execute continuous stream test",
296         "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT +
297                      [
298                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
299                      ] +
300                      STEP_VSWITCH_P2P_FLOWS_FINIT
301     },
302     {
303         "Name": "vswitch_pvp",
304         "Deployment": "clean",
305         "Description": "vSwitch - configure switch and one vnf",
306         "TestSteps": STEP_VSWITCH_PVP_INIT +
307                      [
308                         ['vnf', 'start'],
309                         ['vnf', 'stop'],
310                      ] +
311                      STEP_VSWITCH_PVP_FINIT
312     },
313     {
314         "Name": "vswitch_pvp_tput",
315         "Deployment": "clean",
316         "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test",
317         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
318                      [
319                         ['vnf', 'start'],
320                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
321                         ['vnf', 'stop'],
322                      ] +
323                      STEP_VSWITCH_PVP_FLOWS_FINIT
324     },
325     {
326         "Name": "vswitch_pvp_back2back",
327         "Deployment": "clean",
328         "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test",
329         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
330                      [
331                         ['vnf', 'start'],
332                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
333                         ['vnf', 'stop'],
334                      ] +
335                      STEP_VSWITCH_PVP_FLOWS_FINIT
336     },
337     {
338         "Name": "vswitch_pvp_cont",
339         "Deployment": "clean",
340         "Description": "vSwitch - configure switch, vnf and execute continuous stream test",
341         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
342                      [
343                         ['vnf', 'start'],
344                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
345                         ['vnf', 'stop'],
346                      ] +
347                      STEP_VSWITCH_PVP_FLOWS_FINIT
348     },
349     {
350         "Name": "vswitch_pvp_all",
351         "Deployment": "clean",
352         "Description": "vSwitch - configure switch, vnf and execute all test types",
353         "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
354                      [
355                         ['vnf', 'start'],
356                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
357                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
358                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
359                         ['vnf', 'stop'],
360                      ] +
361                      STEP_VSWITCH_PVP_FLOWS_FINIT
362     },
363     {
364         "Name": "vswitch_pvvp",
365         "Deployment": "clean",
366         "Description": "vSwitch - configure switch and two vnfs",
367         "TestSteps": STEP_VSWITCH_PVVP_INIT +
368                      [
369                         ['vnf1', 'start'],
370                         ['vnf2', 'start'],
371                         ['vnf1', 'stop'],
372                         ['vnf2', 'stop'],
373                      ] +
374                      STEP_VSWITCH_PVVP_FINIT
375     },
376     {
377         "Name": "vswitch_pvvp_tput",
378         "Deployment": "clean",
379         "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test",
380         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
381                      [
382                         ['vnf1', 'start'],
383                         ['vnf2', 'start'],
384                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
385                         ['vnf1', 'stop'],
386                         ['vnf2', 'stop'],
387                      ] +
388                      STEP_VSWITCH_PVVP_FLOWS_FINIT
389     },
390     {
391         "Name": "vswitch_pvvp_back2back",
392         "Deployment": "clean",
393         "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test",
394         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
395                      [
396                         ['vnf1', 'start'],
397                         ['vnf2', 'start'],
398                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
399                         ['vnf1', 'stop'],
400                         ['vnf2', 'stop'],
401                      ] +
402                      STEP_VSWITCH_PVVP_FLOWS_FINIT
403     },
404     {
405         "Name": "vswitch_pvvp_cont",
406         "Deployment": "clean",
407         "Description": "vSwitch - configure switch, two chained vnfs and execute continuous stream test",
408         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
409                      [
410                         ['vnf1', 'start'],
411                         ['vnf2', 'start'],
412                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
413                         ['vnf1', 'stop'],
414                         ['vnf2', 'stop'],
415                      ] +
416                      STEP_VSWITCH_PVVP_FLOWS_FINIT
417     },
418     {
419         "Name": "vswitch_pvvp_all",
420         "Deployment": "clean",
421         "Description": "vSwitch - configure switch, two chained vnfs and execute all test types",
422         "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT +
423                      [
424                         ['vnf1', 'start'],
425                         ['vnf2', 'start'],
426                         ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', 'bidir' : 'True'}],
427                         ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}],
428                         ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
429                         ['vnf1', 'stop'],
430                         ['vnf2', 'stop'],
431                      ] +
432                      STEP_VSWITCH_PVVP_FLOWS_FINIT
433     },
434 ]
435
436 # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values.
437 #    {
438 #        "Name": "ovs_vanilla_linux_bridge_pvp_cont",
439 #        "Deployment": "clean",
440 #        "Description": "vSwitch - configure OVS Vanilla, QemuVirtioNet with linux bridge and execute continuous stream test",
441 #        "vSwitch" : "OvsVanilla",
442 #        "VNF" : "QemuVirtioNet",
443 #        "Trafficgen": "IxNet",
444 #        "Parameters": {"guest_loopback" : "linux_bridge"},
445 #        "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT +
446 #                     [
447 #                        ['vnf', 'start'],
448 #                        ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', 'bidir' : 'True'}],
449 #                        ['vnf', 'stop'],
450 #                     ] +
451 #                     STEP_VSWITCH_PVP_FLOWS_FINIT
452 #    },