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