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 # Description of "Load" dictionary keys, their meanings and available values:
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
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
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.
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],
92 # VPP specific macros used in TC defintions
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'],
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],
119 ['trafficgen', 'send_traffic', {}],
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'],
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],
148 ['trafficgen', 'send_traffic', {}],
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'],
168 # Generic performance TC definitions
170 PERFORMANCE_TESTS = [
172 "Name": "phy2phy_tput",
174 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
177 "traffic_type" : "rfc2544_throughput",
182 "Name": "phy2phy_forwarding",
184 "Description": "LTD.Forwarding.RFC2889.MaxForwardingRate",
187 "traffic_type" : "rfc2889_forwarding",
192 "Name": "phy2phy_learning",
194 "Description": "LTD.AddrLearning.RFC2889.AddrLearningRate",
197 "traffic_type" : "rfc2889_learning",
202 "Name": "phy2phy_caching",
204 "Description": "LTD.AddrCaching.RFC2889.AddrCachingCapacity",
207 "traffic_type" : "rfc2889_caching",
214 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
217 "traffic_type" : "rfc2544_back2back",
222 "Name": "phy2phy_tput_mod_vlan",
224 "Frame Modification": "vlan",
225 "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification",
228 "traffic_type" : "rfc2544_throughput",
233 "Name": "phy2phy_cont",
235 "Description": "Phy2Phy Continuous Stream",
238 "traffic_type" : "rfc2544_continuous",
246 "Description": "PVP Continuous Stream",
249 "traffic_type" : "rfc2544_continuous",
256 "Deployment": "pvvp",
257 "Description": "PVVP Continuous Stream",
260 "traffic_type" : "rfc2544_continuous",
267 "Deployment": "pvpv",
268 "Description": "Two VMs in parallel with Continuous Stream",
271 "traffic_type" : "rfc2544_continuous",
277 "Name": "phy2phy_scalability",
279 "Description": "LTD.Scalability.Flows.RFC2544.0PacketLoss",
282 "traffic_type" : "rfc2544_throughput",
283 "multistream" : 8000,
290 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
293 "traffic_type" : "rfc2544_throughput",
298 "Name": "pvp_back2back",
300 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
303 "traffic_type" : "rfc2544_back2back",
310 "Deployment": "pvvp",
311 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
314 "traffic_type" : "rfc2544_throughput",
319 "Name": "pvvp_back2back",
321 "Deployment": "pvvp",
322 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
325 "traffic_type" : "rfc2544_back2back",
330 "Name": "phy2phy_cpu_load",
332 "Description": "LTD.CPU.RFC2544.0PacketLoss",
334 "tool" : "stress-ng",
341 "traffic_type" : "rfc2544_throughput",
346 "Name": "phy2phy_mem_load",
348 "Description": "LTD.Memory.RFC2544.0PacketLoss",
350 "tool" : "stress-ng",
357 "traffic_type" : "rfc2544_throughput",
362 "Name": "phy2phy_tput_vpp",
363 "Deployment": "clean",
364 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
365 "vSwitch" : "VppDpdkVhost",
368 "traffic_type" : "rfc2544_throughput",
371 "TestSteps": VPP_P2P,
374 "Name": "phy2phy_cont_vpp",
375 "Deployment": "clean",
376 "Description": "VPP: Phy2Phy Continuous Stream",
377 "vSwitch" : "VppDpdkVhost",
380 "traffic_type" : "rfc2544_continuous",
384 "TestSteps": VPP_P2P,
387 "Name": "phy2phy_back2back_vpp",
388 "Deployment": "clean",
389 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
390 "vSwitch" : "VppDpdkVhost",
393 "traffic_type" : "rfc2544_back2back",
396 "TestSteps": VPP_P2P,
399 "Name": "pvp_tput_vpp",
400 "Deployment": "clean",
401 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
402 "vSwitch" : "VppDpdkVhost",
405 "traffic_type" : "rfc2544_throughput",
408 "TestSteps": VPP_PVP,
411 "Name": "pvp_cont_vpp",
412 "Deployment": "clean",
413 "Description": "VPP: PVP Continuous Stream",
414 "vSwitch" : "VppDpdkVhost",
417 "traffic_type" : "rfc2544_continuous",
420 "TestSteps": VPP_PVP,
423 "Name": "pvp_back2back_vpp",
424 "Deployment": "clean",
425 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
426 "vSwitch" : "VppDpdkVhost",
429 "traffic_type" : "rfc2544_back2back",
432 "TestSteps": VPP_PVP,
435 "Name": "pvvp_tput_vpp",
436 "Deployment": "clean",
437 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
438 "vSwitch" : "VppDpdkVhost",
441 "traffic_type" : "rfc2544_throughput",
444 "TestSteps": VPP_PVVP,
447 "Name": "pvvp_cont_vpp",
448 "Deployment": "clean",
449 "Description": "VPP: PVP Continuous Stream",
450 "vSwitch" : "VppDpdkVhost",
453 "traffic_type" : "rfc2544_continuous",
456 "TestSteps": VPP_PVVP,
459 "Name": "pvvp_back2back_vpp",
460 "Deployment": "clean",
461 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
462 "vSwitch" : "VppDpdkVhost",
465 "traffic_type" : "rfc2544_back2back",
468 "TestSteps": VPP_PVVP,