Merge "tests: Improvement of step driven testcases"
[vswitchperf.git] / conf / 01_testcases.conf
1 # Copyright 2015-2017 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 # This file describes a list of testcases.  Each testcase is described as a
16 # dictionary in a list of dictionaries.
17 #
18 # The dictionary keys, their meanings and available values are:
19 #
20 # "Name": "phy2phy_burst",         # A human-readable string identifying the
21 #                                  # test.
22 # "Deployment": "p2p",             # One of the supported deployment scenarios.
23 # "Description": "Lorem ipsum..."  # Optional. A human-readable string
24 #                                  # describing the test.
25 # "Frame Modification": "vlan"     # One of the supported frame modifications:
26 #                                  # vlan, mpls, mac, dscp, ttl, ip_addr,
27 #                                  # ip_port.
28 # "Load": dictionary               # Optional. Configures background load
29 #                                  # during testcase execution.
30 #   Description of "Load" dictionary keys, their meanings and available values:
31 #
32 #   "tool": "stress"               # One of the supported load generators.
33 #   "load": 0-100                  # percentage of cores which should be
34 #                                  # utilized by load generator
35 #                                  # e.g. load = 70%, detected cpu cores = 14 =>
36 #                                  # round(14*0.7)=10, i.e. 10 instances of load
37 #                                  # generator will be executed
38 #   "reserved": 0- (Default 0)     # Optional. Defines number of cores reserved
39 #                                  # for vsperf
40 #                                  # e.g. load = 80%, detected cpu cores = 14,
41 #                                  # reserved = 4 => round((14-4)*0.8)=8,
42 #                                  # i.e. 8 load gen. instances will be executed
43 #   "pattern" : "c"                # stress/stress-ng specific; Number of 'c',
44 #                                  # 'm' and 'i' defines ratio between cpu, mem
45 #                                  # and io workers respectively
46 #                                  # e.g. "ccccmmi" => ratio among workers types
47 #                                  # will be 3:2:1, so in case that 12 stress
48 #                                  # instances should be executed, then 6 cpu,
49 #                                  # 4 memory and 2 io workers will be executed
50 #   "load_memory": 0-100           # Optional. Defines percentage of the system
51 #                                  # memory, which should be utilized by memory
52 #                                  # workers (if they are part of "pattern").
53 #                                  # if not specified then default stress(-ng)
54 #                                  # value will be used
55 #   "options": ""                  # Optional. Additional command line options
56 #                                  # to be passed to the load generator.
57 # "vSwitch" : "OvsVanilla"         # Defines vSwitch to be used for test execution.
58 #                                  # It will override any VSWITCH option stated
59 #                                  # in configuration files or value specified
60 #                                  # on command line through --vswitch parameter.
61 # "VNF" : "QemuVirtioNet"          # Defines VNF to be used for test execution.
62 #                                  # It will override any VNF option stated
63 #                                  # in configuration files or value specified
64 #                                  # on command line through --vnf parameter.
65 # "Trafficgen" : "Dummy"           # Defines traffic generator to be used for test
66 #                                  # execution. It will override any VNF option
67 #                                  # stated in configuration files or value
68 #                                  # specified on command line through --trafficgen
69 #                                  # parameter.
70 # "Parameters" : {'TRAFFICGEN_PKT_SIZES' : (512,)},
71 #                                  # Dictionary with testcase specific configuration
72 #                                  # environment. Specified parameters will be modified
73 #                                  # before the test execution and their original values will
74 #                                  # be restored after TC finishes. This dictionary will
75 #                                  # override any values defined by TEST_PARAMS option
76 #                                  # stated in configuration files or values specified
77 #                                  # on command line through --test-params parameter.
78 #
79 # "TestSteps": []                  # Definition of detailed test steps.
80 #                                  # In case that this list is defined, then
81 #                                  # vsperf will execute defined test steps
82 #                                  # one by one. It can be used to configure
83 #                                  # vswitch, insert flows and transmit traffic.
84 #                                  # It is possible to refer to result of any
85 #                                  # previous step through #STEP[i][j] macro.
86 #                                  # Where i is a number of step (starts from 0)
87 #                                  # and j is index of result returned by step i.
88 # "Test Modifier": [FrameMod|Other],
89 # "Dependency": [Test_Case_Name |None],
90
91 #
92 # VPP specific macros used in TC defintions
93 #
94 VPP_P2P =   [
95                 ['vswitch', 'add_switch', 'int_br0'],           # STEP 0
96                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 1
97                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 2
98                 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True],
99                 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True],
100                 ['trafficgen', 'send_traffic', {}],
101                 ['vswitch', 'dump_connections', 'int_br0'],
102                 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True],
103                 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True],
104                 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
105                 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
106                 ['vswitch', 'del_switch', 'int_br0'],
107             ]
108 VPP_PVP =   [
109                 ['vswitch', 'add_switch', 'int_br0'],           # STEP 0
110                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 1
111                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 2
112                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 3
113                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 4
114                 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
115                 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True],
116                 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True],
117                 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
118                 ['vnf', 'start'],
119                 ['trafficgen', 'send_traffic', {}],
120                 ['vnf', 'stop'],
121                 ['vswitch', 'dump_connections', 'int_br0'],
122                 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
123                 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True],
124                 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True],
125                 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
126                 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
127                 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
128                 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
129                 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
130                 ['vswitch', 'del_switch', 'int_br0'],
131             ]
132 VPP_PVVP =   [
133                 ['vswitch', 'add_switch', 'int_br0'],           # STEP 0
134                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 1
135                 ['vswitch', 'add_phy_port', 'int_br0'],         # STEP 2
136                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 3
137                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 4
138                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 5
139                 ['vswitch', 'add_vport', 'int_br0'],            # STEP 6
140                 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
141                 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True],
142                 ['vswitch', 'add_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True],
143                 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True],
144                 ['vswitch', 'add_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True],
145                 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
146                 ['vnf1', 'start'],
147                 ['vnf2', 'start'],
148                 ['trafficgen', 'send_traffic', {}],
149                 ['vnf2', 'stop'],
150                 ['vnf1', 'stop'],
151                 ['vswitch', 'dump_connections', 'int_br0'],
152                 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
153                 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True],
154                 ['vswitch', 'del_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True],
155                 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True],
156                 ['vswitch', 'del_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True],
157                 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
158                 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
159                 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
160                 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
161                 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
162                 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'],
163                 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
164                 ['vswitch', 'del_switch', 'int_br0'],
165             ]
166
167 #
168 # Generic performance TC definitions
169 #
170 PERFORMANCE_TESTS = [
171     {
172         "Name": "phy2phy_tput",
173         "Deployment": "p2p",
174         "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
175         "Parameters" : {
176             "TRAFFIC" : {
177                 "traffic_type" : "rfc2544_throughput",
178             },
179         },
180     },
181     {
182         "Name": "phy2phy_forwarding",
183         "Deployment": "p2p",
184         "Description": "LTD.Forwarding.RFC2889.MaxForwardingRate",
185         "Parameters" : {
186             "TRAFFIC" : {
187                 "traffic_type" : "rfc2889_forwarding",
188             },
189         },
190     },
191     {
192         "Name": "phy2phy_learning",
193         "Deployment": "p2p",
194         "Description": "LTD.AddrLearning.RFC2889.AddrLearningRate",
195         "Parameters" : {
196             "TRAFFIC" : {
197                 "traffic_type" : "rfc2889_learning",
198             },
199         },
200     },
201     {
202         "Name": "phy2phy_caching",
203         "Deployment": "p2p",
204         "Description": "LTD.AddrCaching.RFC2889.AddrCachingCapacity",
205         "Parameters" : {
206             "TRAFFIC" : {
207                 "traffic_type" : "rfc2889_caching",
208             },
209         },
210     },
211     {
212         "Name": "back2back",
213         "Deployment": "p2p",
214         "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
215         "Parameters" : {
216             "TRAFFIC" : {
217                 "traffic_type" : "rfc2544_back2back",
218             },
219         },
220     },
221     {
222         "Name": "phy2phy_tput_mod_vlan",
223         "Deployment": "p2p",
224         "Frame Modification": "vlan",
225         "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification",
226         "Parameters" : {
227             "TRAFFIC" : {
228                 "traffic_type" : "rfc2544_throughput",
229             },
230         },
231     },
232     {
233         "Name": "phy2phy_cont",
234         "Deployment": "p2p",
235         "Description": "Phy2Phy Continuous Stream",
236         "Parameters" : {
237             "TRAFFIC" : {
238                 "traffic_type" : "rfc2544_continuous",
239                 "frame_rate" : 100,
240             },
241         },
242     },
243     {
244         "Name": "pvp_cont",
245         "Deployment": "pvp",
246         "Description": "PVP Continuous Stream",
247         "Parameters" : {
248             "TRAFFIC" : {
249                 "traffic_type" : "rfc2544_continuous",
250                 "frame_rate" : 100,
251             },
252         },
253     },
254     {
255         "Name": "pvvp_cont",
256         "Deployment": "pvvp",
257         "Description": "PVVP Continuous Stream",
258         "Parameters" : {
259             "TRAFFIC" : {
260                 "traffic_type" : "rfc2544_continuous",
261                 "frame_rate" : 100,
262             },
263         },
264     },
265     {
266         "Name": "pvpv_cont",
267         "Deployment": "pvpv",
268         "Description": "Two VMs in parallel with Continuous Stream",
269         "Parameters" : {
270             "TRAFFIC" : {
271                 "traffic_type" : "rfc2544_continuous",
272                 "frame_rate" : 100,
273             },
274         },
275     },
276     {
277         "Name": "phy2phy_scalability",
278         "Deployment": "p2p",
279         "Description": "LTD.Scalability.Flows.RFC2544.0PacketLoss",
280         "Parameters" : {
281             "TRAFFIC" : {
282                 "traffic_type" : "rfc2544_throughput",
283                 "multistream" : 8000,
284             },
285         },
286     },
287     {
288         "Name": "pvp_tput",
289         "Deployment": "pvp",
290         "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
291         "Parameters" : {
292             "TRAFFIC" : {
293                 "traffic_type" : "rfc2544_throughput",
294             },
295         },
296     },
297     {
298         "Name": "pvp_back2back",
299         "Deployment": "pvp",
300         "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
301         "Parameters" : {
302             "TRAFFIC" : {
303                 "traffic_type" : "rfc2544_back2back",
304             },
305         },
306     },
307     {
308         "Name": "pvvp_tput",
309         "Collector": "cpu",
310         "Deployment": "pvvp",
311         "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
312         "Parameters" : {
313             "TRAFFIC" : {
314                 "traffic_type" : "rfc2544_throughput",
315             },
316         },
317     },
318     {
319         "Name": "pvvp_back2back",
320         "Collector": "cpu",
321         "Deployment": "pvvp",
322         "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
323         "Parameters" : {
324             "TRAFFIC" : {
325                 "traffic_type" : "rfc2544_back2back",
326             },
327         },
328     },
329     {
330         "Name": "phy2phy_cpu_load",
331         "Deployment": "p2p",
332         "Description": "LTD.CPU.RFC2544.0PacketLoss",
333         "Load" : {
334             "tool" : "stress-ng",
335             "load" : 100,
336             "reserved" : 4,
337             "pattern" : "c",
338         },
339         "Parameters" : {
340             "TRAFFIC" : {
341                 "traffic_type" : "rfc2544_throughput",
342             },
343         },
344     },
345     {
346         "Name": "phy2phy_mem_load",
347         "Deployment": "p2p",
348         "Description": "LTD.Memory.RFC2544.0PacketLoss",
349         "Load" : {
350             "tool" : "stress-ng",
351             "load" : 50,
352             "pattern" : "m",
353             "load_memory" : 80,
354         },
355         "Parameters" : {
356             "TRAFFIC" : {
357                 "traffic_type" : "rfc2544_throughput",
358             },
359         },
360     },
361     {
362         "Name": "phy2phy_tput_vpp",
363         "Deployment": "clean",
364         "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
365         "vSwitch" : "VppDpdkVhost",
366         "Parameters" : {
367             "TRAFFIC" : {
368                 "traffic_type" : "rfc2544_throughput",
369             },
370         },
371         "TestSteps": VPP_P2P,
372     },
373     {
374         "Name": "phy2phy_cont_vpp",
375         "Deployment": "clean",
376         "Description": "VPP: Phy2Phy Continuous Stream",
377         "vSwitch" : "VppDpdkVhost",
378         "Parameters" : {
379             "TRAFFIC" : {
380                 "traffic_type" : "rfc2544_continuous",
381                 "frame_rate" : 100,
382             },
383         },
384         "TestSteps": VPP_P2P,
385     },
386     {
387         "Name": "phy2phy_back2back_vpp",
388         "Deployment": "clean",
389         "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
390         "vSwitch" : "VppDpdkVhost",
391         "Parameters" : {
392             "TRAFFIC" : {
393                 "traffic_type" : "rfc2544_back2back",
394             },
395         },
396         "TestSteps": VPP_P2P,
397     },
398     {
399         "Name": "pvp_tput_vpp",
400         "Deployment": "clean",
401         "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
402         "vSwitch" : "VppDpdkVhost",
403         "Parameters" : {
404             "TRAFFIC" : {
405                 "traffic_type" : "rfc2544_throughput",
406             },
407         },
408         "TestSteps": VPP_PVP,
409     },
410     {
411         "Name": "pvp_cont_vpp",
412         "Deployment": "clean",
413         "Description": "VPP: PVP Continuous Stream",
414         "vSwitch" : "VppDpdkVhost",
415         "Parameters" : {
416             "TRAFFIC" : {
417                 "traffic_type" : "rfc2544_continuous",
418             },
419         },
420         "TestSteps": VPP_PVP,
421     },
422     {
423         "Name": "pvp_back2back_vpp",
424         "Deployment": "clean",
425         "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
426         "vSwitch" : "VppDpdkVhost",
427         "Parameters" : {
428             "TRAFFIC" : {
429                 "traffic_type" : "rfc2544_back2back",
430             },
431         },
432         "TestSteps": VPP_PVP,
433     },
434     {
435         "Name": "pvvp_tput_vpp",
436         "Deployment": "clean",
437         "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
438         "vSwitch" : "VppDpdkVhost",
439         "Parameters" : {
440             "TRAFFIC" : {
441                 "traffic_type" : "rfc2544_throughput",
442             },
443         },
444         "TestSteps": VPP_PVVP,
445     },
446     {
447         "Name": "pvvp_cont_vpp",
448         "Deployment": "clean",
449         "Description": "VPP: PVP Continuous Stream",
450         "vSwitch" : "VppDpdkVhost",
451         "Parameters" : {
452             "TRAFFIC" : {
453                 "traffic_type" : "rfc2544_continuous",
454             },
455         },
456         "TestSteps": VPP_PVVP,
457     },
458     {
459         "Name": "pvvp_back2back_vpp",
460         "Deployment": "clean",
461         "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
462         "vSwitch" : "VppDpdkVhost",
463         "Parameters" : {
464             "TRAFFIC" : {
465                 "traffic_type" : "rfc2544_back2back",
466             },
467         },
468         "TestSteps": VPP_PVVP,
469     },
470 ]