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.
78 # "Test Modifier": [FrameMod|Other],
79 # "Dependency": [Test_Case_Name |None],
82 # VPP specific macros used in TC defintions
85 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
86 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
87 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
88 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True],
89 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True],
90 ['trafficgen', 'send_traffic', {}],
91 ['vswitch', 'dump_connections', 'int_br0'],
92 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True],
93 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True],
94 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
95 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
96 ['vswitch', 'del_switch', 'int_br0'],
99 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
100 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
101 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
102 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
103 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
104 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
105 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True],
106 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True],
107 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
109 ['trafficgen', 'send_traffic', {}],
111 ['vswitch', 'dump_connections', 'int_br0'],
112 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
113 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True],
114 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True],
115 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
116 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
117 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
118 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
119 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
120 ['vswitch', 'del_switch', 'int_br0'],
123 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
124 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
125 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
126 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
127 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
128 ['vswitch', 'add_vport', 'int_br0'], # STEP 5
129 ['vswitch', 'add_vport', 'int_br0'], # STEP 6
130 ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
131 ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True],
132 ['vswitch', 'add_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True],
133 ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True],
134 ['vswitch', 'add_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True],
135 ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
138 ['trafficgen', 'send_traffic', {}],
141 ['vswitch', 'dump_connections', 'int_br0'],
142 ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True],
143 ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True],
144 ['vswitch', 'del_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True],
145 ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True],
146 ['vswitch', 'del_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True],
147 ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True],
148 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
149 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
150 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'],
151 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
152 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'],
153 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
154 ['vswitch', 'del_switch', 'int_br0'],
158 # Generic performance TC definitions
160 PERFORMANCE_TESTS = [
162 "Name": "phy2phy_tput",
164 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
167 "traffic_type" : "rfc2544_throughput",
172 "Name": "phy2phy_forwarding",
174 "Description": "LTD.Forwarding.RFC2889.MaxForwardingRate",
177 "traffic_type" : "rfc2889_forwarding",
182 "Name": "phy2phy_learning",
184 "Description": "LTD.AddrLearning.RFC2889.AddrLearningRate",
187 "traffic_type" : "rfc2889_learning",
192 "Name": "phy2phy_caching",
194 "Description": "LTD.AddrCaching.RFC2889.AddrCachingCapacity",
197 "traffic_type" : "rfc2889_caching",
204 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
207 "traffic_type" : "rfc2544_back2back",
212 "Name": "phy2phy_tput_mod_vlan",
214 "Frame Modification": "vlan",
215 "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification",
218 "traffic_type" : "rfc2544_throughput",
223 "Name": "phy2phy_cont",
225 "Description": "Phy2Phy Continuous Stream",
228 "traffic_type" : "rfc2544_continuous",
236 "Description": "PVP Continuous Stream",
239 "traffic_type" : "rfc2544_continuous",
246 "Deployment": "pvvp",
247 "Description": "PVVP Continuous Stream",
250 "traffic_type" : "rfc2544_continuous",
257 "Deployment": "pvpv",
258 "Description": "Two VMs in parallel with Continuous Stream",
261 "traffic_type" : "rfc2544_continuous",
267 "Name": "phy2phy_scalability",
269 "Description": "LTD.Scalability.Flows.RFC2544.0PacketLoss",
272 "traffic_type" : "rfc2544_throughput",
273 "multistream" : 8000,
280 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
283 "traffic_type" : "rfc2544_throughput",
288 "Name": "pvp_back2back",
290 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
293 "traffic_type" : "rfc2544_back2back",
300 "Deployment": "pvvp",
301 "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
304 "traffic_type" : "rfc2544_throughput",
309 "Name": "pvvp_back2back",
311 "Deployment": "pvvp",
312 "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
315 "traffic_type" : "rfc2544_back2back",
320 "Name": "phy2phy_cpu_load",
322 "Description": "LTD.CPU.RFC2544.0PacketLoss",
324 "tool" : "stress-ng",
331 "traffic_type" : "rfc2544_throughput",
336 "Name": "phy2phy_mem_load",
338 "Description": "LTD.Memory.RFC2544.0PacketLoss",
340 "tool" : "stress-ng",
347 "traffic_type" : "rfc2544_throughput",
352 "Name": "phy2phy_tput_vpp",
353 "Deployment": "clean",
354 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
355 "vSwitch" : "VppDpdkVhost",
358 "traffic_type" : "rfc2544_throughput",
361 "TestSteps": VPP_P2P,
364 "Name": "phy2phy_cont_vpp",
365 "Deployment": "clean",
366 "Description": "VPP: Phy2Phy Continuous Stream",
367 "vSwitch" : "VppDpdkVhost",
370 "traffic_type" : "rfc2544_continuous",
374 "TestSteps": VPP_P2P,
377 "Name": "phy2phy_back2back_vpp",
378 "Deployment": "clean",
379 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
380 "vSwitch" : "VppDpdkVhost",
383 "traffic_type" : "rfc2544_back2back",
386 "TestSteps": VPP_P2P,
389 "Name": "pvp_tput_vpp",
390 "Deployment": "clean",
391 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
392 "vSwitch" : "VppDpdkVhost",
395 "traffic_type" : "rfc2544_throughput",
398 "TestSteps": VPP_PVP,
401 "Name": "pvp_cont_vpp",
402 "Deployment": "clean",
403 "Description": "VPP: PVP Continuous Stream",
404 "vSwitch" : "VppDpdkVhost",
407 "traffic_type" : "rfc2544_continuous",
410 "TestSteps": VPP_PVP,
413 "Name": "pvp_back2back_vpp",
414 "Deployment": "clean",
415 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
416 "vSwitch" : "VppDpdkVhost",
419 "traffic_type" : "rfc2544_back2back",
422 "TestSteps": VPP_PVP,
425 "Name": "pvvp_tput_vpp",
426 "Deployment": "clean",
427 "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio",
428 "vSwitch" : "VppDpdkVhost",
431 "traffic_type" : "rfc2544_throughput",
434 "TestSteps": VPP_PVVP,
437 "Name": "pvvp_cont_vpp",
438 "Deployment": "clean",
439 "Description": "VPP: PVP Continuous Stream",
440 "vSwitch" : "VppDpdkVhost",
443 "traffic_type" : "rfc2544_continuous",
446 "TestSteps": VPP_PVVP,
449 "Name": "pvvp_back2back_vpp",
450 "Deployment": "clean",
451 "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames",
452 "vSwitch" : "VppDpdkVhost",
455 "traffic_type" : "rfc2544_back2back",
458 "TestSteps": VPP_PVVP,