1 # Copyright 2015-2017 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 # This file describes a list of testcases. Each testcase is described as a
16 # dictionary in a list of dictionaries.
18 # The dictionary keys, their meanings and available values are:
20 # "Name": "phy2phy_burst", # A human-readable string identifying the
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,
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
34 # Description of "Load" dictionary keys, their meanings and available values:
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
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
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.
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],
95 # VPP specific macros used in TC defintions
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'],
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],
122 ['trafficgen', 'send_traffic', {}],
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'],
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],
151 ['trafficgen', 'send_traffic', {}],
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'],
171 # Generic performance TC definitions
173 PERFORMANCE_TESTS = [
175 "Name": "phy2phy_tput",
177 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
180 "traffic_type" : "rfc2544_throughput",
185 "Name": "phy2phy_forwarding",
187 "Description": "LTD.Forwarding.RFC2889.MaxForwardingRate",
190 "traffic_type" : "rfc2889_forwarding",
195 "Name": "phy2phy_learning",
197 "Description": "LTD.AddrLearning.RFC2889.AddrLearningRate",
200 "traffic_type" : "rfc2889_learning",
205 "Name": "phy2phy_caching",
207 "Description": "LTD.AddrCaching.RFC2889.AddrCachingCapacity",
210 "traffic_type" : "rfc2889_caching",
217 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
220 "traffic_type" : "rfc2544_back2back",
225 "Name": "phy2phy_tput_mod_vlan",
227 "Frame Modification": "vlan",
228 "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification",
231 "traffic_type" : "rfc2544_throughput",
236 "Name": "phy2phy_cont",
238 "Description": "Phy2Phy Continuous Stream",
241 "traffic_type" : "rfc2544_continuous",
249 "Description": "PVP Continuous Stream",
252 "traffic_type" : "rfc2544_continuous",
259 "Deployment": "pvvp",
260 "Description": "PVVP Continuous Stream",
263 "traffic_type" : "rfc2544_continuous",
270 "Deployment": "pvpv",
271 "Description": "Two VMs in parallel with Continuous Stream",
274 "traffic_type" : "rfc2544_continuous",
280 "Name": "phy2phy_scalability",
282 "Description": "LTD.Scalability.Flows.RFC2544.0PacketLoss",
285 "traffic_type" : "rfc2544_throughput",
286 "multistream" : 8000,
293 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
296 "traffic_type" : "rfc2544_throughput",
301 "Name": "pvp_back2back",
303 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
306 "traffic_type" : "rfc2544_back2back",
313 "Deployment": "pvvp",
314 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
317 "traffic_type" : "rfc2544_throughput",
322 "Name": "pvvp_back2back",
324 "Deployment": "pvvp",
325 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
328 "traffic_type" : "rfc2544_back2back",
333 "Name": "phy2phy_cpu_load",
335 "Description": "LTD.CPU.RFC2544.0PacketLoss",
342 "LOADGEN" : "StressNg",
344 "traffic_type" : "rfc2544_throughput",
349 "Name": "phy2phy_mem_load",
351 "Description": "LTD.Memory.RFC2544.0PacketLoss",
358 "LOADGEN" : "StressNg",
360 "traffic_type" : "rfc2544_throughput",
365 "Name": "phy2phy_tput_vpp",
366 "Deployment": "clean",
367 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
368 "vSwitch" : "VppDpdkVhost",
371 "traffic_type" : "rfc2544_throughput",
374 "TestSteps": VPP_P2P,
377 "Name": "phy2phy_cont_vpp",
378 "Deployment": "clean",
379 "Description": "VPP: Phy2Phy Continuous Stream",
380 "vSwitch" : "VppDpdkVhost",
383 "traffic_type" : "rfc2544_continuous",
387 "TestSteps": VPP_P2P,
390 "Name": "phy2phy_back2back_vpp",
391 "Deployment": "clean",
392 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
393 "vSwitch" : "VppDpdkVhost",
396 "traffic_type" : "rfc2544_back2back",
399 "TestSteps": VPP_P2P,
402 "Name": "pvp_tput_vpp",
403 "Deployment": "clean",
404 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
405 "vSwitch" : "VppDpdkVhost",
408 "traffic_type" : "rfc2544_throughput",
411 "TestSteps": VPP_PVP,
414 "Name": "pvp_cont_vpp",
415 "Deployment": "clean",
416 "Description": "VPP: PVP Continuous Stream",
417 "vSwitch" : "VppDpdkVhost",
420 "traffic_type" : "rfc2544_continuous",
423 "TestSteps": VPP_PVP,
426 "Name": "pvp_back2back_vpp",
427 "Deployment": "clean",
428 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
429 "vSwitch" : "VppDpdkVhost",
432 "traffic_type" : "rfc2544_back2back",
435 "TestSteps": VPP_PVP,
438 "Name": "pvvp_tput_vpp",
439 "Deployment": "clean",
440 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
441 "vSwitch" : "VppDpdkVhost",
444 "traffic_type" : "rfc2544_throughput",
447 "TestSteps": VPP_PVVP,
450 "Name": "pvvp_cont_vpp",
451 "Deployment": "clean",
452 "Description": "VPP: PVP Continuous Stream",
453 "vSwitch" : "VppDpdkVhost",
456 "traffic_type" : "rfc2544_continuous",
459 "TestSteps": VPP_PVVP,
462 "Name": "pvvp_back2back_vpp",
463 "Deployment": "clean",
464 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
465 "vSwitch" : "VppDpdkVhost",
468 "traffic_type" : "rfc2544_back2back",
471 "TestSteps": VPP_PVVP,