paths: Modify algorithm for PATHS verification
[vswitchperf.git] / conf / 03_traffic.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 # ############################
16 # Traffic gen configuration
17 # ############################
18
19 # log file for all traffic generator related commands
20 LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log'
21
22 # TRAFFIC dictionary defines traffic parameters used by all traffic generators.
23 # Detailed description of TRAFFIC dictionary items follows:
24 #
25 #    'traffic_type'  - One of the supported traffic types.
26 #                      E.g. rfc2544_throughput, rfc2544_back2back
27 #                      or rfc2544_continuous
28 #                      Data type: str
29 #                      Default value: "rfc2544_throughput".
30 #    'bidir'         - Specifies if generated traffic will be full-duplex (True)
31 #                      or half-duplex (False)
32 #                      Data type: str
33 #                      Supported values: "True", "False"
34 #                      Default value: "False".
35 #    'frame_rate'    - Defines desired percentage of frame rate used during
36 #                      continuous stream tests.
37 #                      Data type: int
38 #                      Default value: 100.
39 #    'multistream'   - Defines number of flows simulated by traffic generator.
40 #                      Value 0 disables multistream feature
41 #                      Data type: int
42 #                      Supported values: 0-65536 for 'L4' stream type
43 #                                        unlimited for 'L2' and 'L3' stream types
44 #                      Default value: 0.
45 #    'stream_type'   - Stream type is an extension of the "multistream" feature.
46 #                      If multistream is disabled, then stream type will be
47 #                      ignored. Stream type defines ISO OSI network layer used
48 #                      for simulation of multiple streams.
49 #                      Data type: str
50 #                      Supported values:
51 #                         "L2" - iteration of destination MAC address
52 #                         "L3" - iteration of destination IP address
53 #                         "L4" - iteration of destination port
54 #                                of selected transport protocol
55 #                      Default value: "L4".
56 #    'pre_installed_flows'
57 #                   -  Pre-installed flows is an extension of the "multistream"
58 #                      feature. If enabled, it will implicitly insert a flow
59 #                      for each stream. If multistream is disabled, then
60 #                      pre-installed flows will be ignored.
61 #                      Note: It is supported only for p2p deployment scenario.
62 #                      Data type: str
63 #                      Supported values:
64 #                         "Yes" - flows will be inserted into OVS
65 #                         "No"  - flows won't be inserted into OVS
66 #                      Default value: "No".
67 #    'flow_type'     - Defines flows complexity.
68 #                      Data type: str
69 #                      Supported values:
70 #                         "port" - flow is defined by ingress ports
71 #                         "IP"   - flow is defined by ingress ports
72 #                                  and src and dst IP addresses
73 #                      Default value: "port"
74 #    'l2'            - A dictionary with l2 network layer details. Supported
75 #                      values are:
76 #        'srcmac'    - Specifies source MAC address filled by traffic generator.
77 #                      NOTE: It can be modified by vsperf in some scenarios.
78 #                      Data type: str
79 #                      Default value: "00:00:00:00:00:00".
80 #        'dstmac'    - Specifies destination MAC address filled by traffic generator.
81 #                      NOTE: It can be modified by vsperf in some scenarios.
82 #                      Data type: str
83 #                      Default value: "00:00:00:00:00:00".
84 #        'framesize' - Specifies default frame size. This value should not be
85 #                      changed directly. It will be overridden during testcase
86 #                      execution by values specified by list TRAFFICGEN_PKT_SIZES.
87 #                      Data type: int
88 #                      Default value: 64
89 #    'l3'            - A dictionary with l3 network layer details. Supported
90 #                      values are:
91 #        'enabled'   - Specifies if l3 layer should be enabled or disabled.
92 #                      Data type: bool
93 #                      Default value: True
94 #                      NOTE: Supported only by IxNet trafficgen class
95 #        'srcip'     - Specifies source MAC address filled by traffic generator.
96 #                      NOTE: It can be modified by vsperf in some scenarios.
97 #                      Data type: str
98 #                      Default value: "1.1.1.1".
99 #        'dstip'     - Specifies destination MAC address filled by traffic generator.
100 #                      NOTE: It can be modified by vsperf in some scenarios.
101 #                      Data type: str
102 #                      Default value: "90.90.90.90".
103 #        'proto'     - Specifies deflaut protocol type.
104 #                      Please check particular traffic generator implementation
105 #                      for supported protocol types.
106 #                      Data type: str
107 #                      Default value: "udp".
108 #    'l4'            - A dictionary with l4 network layer details. Supported
109 #                      values are:
110 #        'enabled'   - Specifies if l4 layer should be enabled or disabled.
111 #                      Data type: bool
112 #                      Default value: True
113 #                      NOTE: Supported only by IxNet trafficgen class
114 #        'srcport'   - Specifies source port of selected transport protocol.
115 #                      NOTE: It can be modified by vsperf in some scenarios.
116 #                      Data type: int
117 #                      Default value: 3000
118 #        'dstport'   - Specifies destination port of selected transport protocol.
119 #                      NOTE: It can be modified by vsperf in some scenarios.
120 #                      Data type: int
121 #                      Default value: 3001
122 #    'vlan'          - A dictionary with vlan encapsulation details. Supported
123 #                      values are:
124 #        'enabled'   - Specifies if vlan encapsulation should be enabled or
125 #                      disabled.
126 #                      Data type: bool
127 #                      Default value: False
128 #        'id'        - Specifies vlan id.
129 #                      Data type: int (NOTE: must fit to 12 bits)
130 #                      Default value: 0
131 #        'priority'  - Specifies a vlan priority (PCP header field).
132 #                      Data type: int (NOTE: must fit to 3 bits)
133 #                      Default value: 0
134 #        'cfi'       - Specifies if frames can or cannot be dropped during
135 #                      congestion (DEI header field).
136 #                      Data type: int (NOTE: must fit to 1 bit)
137 #                      Default value: 0
138 TRAFFIC = {
139     'traffic_type' : 'rfc2544_throughput',
140     'frame_rate' : 100,
141     'bidir' : 'True',  # will be passed as string in title format to tgen
142     'multistream' : 0,
143     'stream_type' : 'L4',
144     'pre_installed_flows' : 'No',           # used by vswitch implementation
145     'flow_type' : 'port',                   # used by vswitch implementation
146
147     'l2': {
148         'framesize': 64,
149         'srcmac': '00:00:00:00:00:00',
150         'dstmac': '00:00:00:00:00:00',
151     },
152     'l3': {
153         'enabled': True,
154         'proto': 'udp',
155         'srcip': '1.1.1.1',
156         'dstip': '90.90.90.90',
157     },
158     'l4': {
159         'enabled': True,
160         'srcport': 3000,
161         'dstport': 3001,
162     },
163     'vlan': {
164         'enabled': False,
165         'id': 0,
166         'priority': 0,
167         'cfi': 0,
168     },
169 }
170
171 #path to traffic generators directory.
172 TRAFFICGEN_DIR = os.path.join(ROOT_DIR, 'tools/pkt_gen')
173
174 # traffic generator to use in tests
175 #TRAFFICGEN = 'TestCenter'
176 TRAFFICGEN = 'Dummy'
177 #TRAFFICGEN = 'IxNet'
178 #TRAFFICGEN = 'Ixia'
179 #TRAFFICGEN = 'Xena'
180 #TRAFFICGEN = 'Moongen'
181 #TRAFFICGEN = 'Trex'
182
183 # List of packet sizes to send.
184 # Expand like this: (64, 128, 256, 512, 1024)
185 TRAFFICGEN_PKT_SIZES = (64,)
186
187 TRAFFICGEN_DURATION = 30
188
189 TRAFFICGEN_RFC2544_TESTS = 1
190 TRAFFICGEN_RFC2889_TRIALS = 1
191 TRAFFICGEN_LOSSRATE = 0.0
192
193 ##############################
194 # DUMMY Configuration -- BEGIN
195
196 # By default, dummy traffic generator asks for "measured" values.
197 # Following dictionary allows to preconfigure these values and
198 # to avoid user interaction. It can be useful for automated
199 # integration tests.
200 # Example of values for continuous traffic type:
201 #   TRAFFICGEN_DUMMY_RESULTS{'frames rx': 500000,
202 #                            'frames tx': 500000,
203 #                            'rx rate %': 100,
204 #                            'tx rate %': 100,
205 #                            'frameloss %': 0,
206 #                            'min latency': 1,
207 #                            'max latency': 15,
208 #                            'avg latency': 2.5,
209 #                           }
210 #
211 TRAFFICGEN_DUMMY_RESULTS = {}
212
213 # DUMMY Configuration -- END
214 ############################
215
216 #############################
217 # IXIA Configuration -- BEGIN
218
219 # path to 'ixos' install path
220 TRAFFICGEN_IXIA_ROOT_DIR = '/opt/ixos'
221
222 # network address of IXIA chassis
223 TRAFFICGEN_IXIA_HOST = ''
224
225 TRAFFICGEN_IXIA_CARD = ''
226
227 TRAFFICGEN_IXIA_PORT1 = ''
228
229 TRAFFICGEN_IXIA_PORT2 = ''
230
231 TRAFFICGEN_IXNET_LIB_PATH = '/opt/ixnetwork/lib/IxTclNetwork'
232
233 # IxNetwork host IP address
234 TRAFFICGEN_IXNET_MACHINE = ''
235 TRAFFICGEN_IXNET_PORT = ''
236 TRAFFICGEN_IXNET_USER = ''
237 TRAFFICGEN_IXNET_CHASSIS = ''
238
239 # The result directory on $TRAFFICGEN_IXNET_MACHINE
240 TRAFFICGEN_IXNET_TESTER_RESULT_DIR = ''
241
242 # The result directory on DUT. This needs to map to the same directory
243 # as the previous one
244 TRAFFICGEN_IXNET_DUT_RESULT_DIR = ''
245
246 # directory with 3rd party scripts generated by IXIA tools
247 TRAFFICGEN_IXIA_3RD_PARTY = os.path.join(ROOT_DIR, '3rd_party/ixia')
248
249 # default TCL script, which will be used for IXNETWORK configuration
250 TRAFFICGEN_IXNET_TCL_SCRIPT = 'ixnetrfc2544.tcl'
251
252 # IXIA Configuration -- END
253 ###########################
254
255
256 ###########################################
257 # Spirent TestCenter Configuration -- BEGIN
258
259 # Path to Python 2 executable
260 TRAFFICGEN_STC_PYTHON2_PATH = "/bin/python2.7"
261
262 # Path to the location of the TestCenter files
263 TRAFFICGEN_STC_TESTCENTER_PATH = os.path.join(ROOT_DIR, 'tools/pkt_gen/testcenter')
264
265 # Name of the TestCenter RFC2544 Tput helper python script
266 TRAFFICGEN_STC_RFC2544_TPUT_TEST_FILE_NAME = "testcenter-rfc2544-throughput.py"
267
268 # Name of the Testcenter RFC2899 Tput Helper Python Scripts
269 TRAFFICGEN_STC_RFC2889_TEST_FILE_NAME = "testcenter-rfc2889-rest.py"
270
271 # 2889 Port Locations
272 TRAFFICGEN_STC_RFC2889_LOCATION = ""
273
274 # The address of the Spirent Lab Server to use
275 TRAFFICGEN_STC_LAB_SERVER_ADDR = ""
276
277 # The address of the Spirent License Server in your environment
278 TRAFFICGEN_STC_LICENSE_SERVER_ADDR = ""
279
280 # The address of the TestCenter chassis that holds the east port
281 TRAFFICGEN_STC_EAST_CHASSIS_ADDR = ""
282
283 # The slot number of the card that holds the east port
284 TRAFFICGEN_STC_EAST_SLOT_NUM = ""
285
286 # The port number on the card that holds the east port
287 TRAFFICGEN_STC_EAST_PORT_NUM = ""
288
289 # The address of the TestCenter chassis that holds the west port
290 TRAFFICGEN_STC_WEST_CHASSIS_ADDR = ""
291
292 # The slot number of the card that holds the west port
293 TRAFFICGEN_STC_WEST_SLOT_NUM = ""
294
295 # The port number on the card that holds the west port
296 TRAFFICGEN_STC_WEST_PORT_NUM = ""
297
298 # The friendly name to identify the Spirent Lab Server test session
299 TRAFFICGEN_STC_TEST_SESSION_NAME = "RFC2544 Tput"
300 # The directory to copy results to
301
302 TRAFFICGEN_STC_RESULTS_DIR = os.path.join(ROOT_DIR, "Results")
303 #  The prefix for the CSV results file
304
305 TRAFFICGEN_STC_CSV_RESULTS_FILE_PREFIX = "RFC2544_tput"
306 # The number of trials to execute during the test
307
308 TRAFFICGEN_STC_NUMBER_OF_TRIALS = "1"
309
310 # The duration of each trial executed during the test, in seconds
311 TRAFFICGEN_STC_TRIAL_DURATION_SEC = "60"
312
313 # The traffic pattern between endpoints, BACKBONE, MESH or PAIR
314 TRAFFICGEN_STC_TRAFFIC_PATTERN = "PAIR"
315
316 # The search mode used to find the throughput rate, COMBO, STEP or BINARY
317 TRAFFICGEN_STC_SEARCH_MODE = "BINARY"
318
319 # The learning mode used during the test, AUTO, L2_LEARNING, L3_LERNING, or NONE
320 TRAFFICGEN_STC_LEARNING_MODE = "AUTO"
321
322 # The minimum percent line rate that will be used during the test
323 TRAFFICGEN_STC_RATE_LOWER_LIMIT_PCT = "1.0"
324
325 # The maximum percent line rate that will be used during the test
326 TRAFFICGEN_STC_RATE_UPPER_LIMIT_PCT = "99.0"
327
328 # If SearchMode is BINARY, the percent line rate that will be used at the start of the test
329 TRAFFICGEN_STC_RATE_INITIAL_PCT = "99.0"
330
331 # When SearchMode is STEP, the percent increase in load per step
332 TRAFFICGEN_STC_RATE_STEP_PCT = "10.0"
333
334 # The minimum percentage of load adjustment between iterations
335 TRAFFICGEN_STC_RESOLUTION_PCT = "1.0"
336
337 # The frame size, in bytes
338 TRAFFICGEN_STC_FRAME_SIZE = "256"
339
340 # The maximum acceptable frame loss percent in any iteration
341 TRAFFICGEN_STC_ACCEPTABLE_FRAME_LOSS_PCT = "0.0"
342
343 # The address to assign to the first emulated device interface on the first east port
344 TRAFFICGEN_STC_EAST_INTF_ADDR = ""
345
346 # The gateway address to assign to the first emulated device interface on the first east port
347 TRAFFICGEN_STC_EAST_INTF_GATEWAY_ADDR = ""
348
349 # The address to assign to the first emulated device interface on the first west port
350 TRAFFICGEN_STC_WEST_INTF_ADDR = ""
351
352 # The gateway address to assign to the first emulated device interface on the first west port
353 TRAFFICGEN_STC_WEST_INTF_GATEWAY_ADDR = ""
354
355 # Print additional information to the terminal during the test
356 TRAFFICGEN_STC_VERBOSE = "True"
357
358 # Spirent TestCenter Configuration -- END
359 #########################################
360
361 #############################
362 # Xena Configuration -- BEGIN
363
364 # Xena traffic generator connection info
365 TRAFFICGEN_XENA_IP = ''
366 TRAFFICGEN_XENA_PORT1 = ''
367 TRAFFICGEN_XENA_PORT2 = ''
368 TRAFFICGEN_XENA_USER = ''
369 TRAFFICGEN_XENA_PASSWORD = ''
370 TRAFFICGEN_XENA_MODULE1 = ''
371 TRAFFICGEN_XENA_MODULE2 = ''
372
373 # Xena Port IP info
374 TRAFFICGEN_XENA_PORT0_IP = '192.168.199.10'
375 TRAFFICGEN_XENA_PORT0_CIDR = 24
376 TRAFFICGEN_XENA_PORT0_GATEWAY = '192.168.199.1'
377 TRAFFICGEN_XENA_PORT1_IP = '192.168.199.11'
378 TRAFFICGEN_XENA_PORT1_CIDR = 24
379 TRAFFICGEN_XENA_PORT1_GATEWAY = '192.168.199.1'
380
381 # Xena RFC 2544 options
382 # Please reference xena documentation before making changes to these settings
383 TRAFFICGEN_XENA_2544_TPUT_INIT_VALUE = '10.0'
384 TRAFFICGEN_XENA_2544_TPUT_MIN_VALUE = '0.1'
385 TRAFFICGEN_XENA_2544_TPUT_MAX_VALUE = '100.0'
386 TRAFFICGEN_XENA_2544_TPUT_VALUE_RESOLUTION = '0.5'
387 TRAFFICGEN_XENA_2544_TPUT_USEPASS_THRESHHOLD = 'false'
388 TRAFFICGEN_XENA_2544_TPUT_PASS_THRESHHOLD = '0.0'
389
390 # Xena RFC 2544 final verification options
391 TRAFFICGEN_XENA_RFC2544_VERIFY = False
392 TRAFFICGEN_XENA_RFC2544_VERIFY_DURATION = 120 # in seconds
393 # Number of verify attempts before giving up...
394 TRAFFICGEN_XENA_RFC2544_MAXIMUM_VERIFY_ATTEMPTS = 10
395 # Logic for restarting binary search, see documentation for details
396 TRAFFICGEN_XENA_RFC2544_BINARY_RESTART_SMART_SEARCH = True
397
398 # Xena Continuous traffic options
399 # Please reference xena documentation before making changes to these settings
400 TRAFFICGEN_XENA_CONT_PORT_LEARNING_ENABLED = True
401 TRAFFICGEN_XENA_CONT_PORT_LEARNING_DURATION = 3
402
403 # Xena Configuration -- END
404 ###########################
405
406 ###################################################
407 # MoonGen Configuration and Connection Info-- BEGIN
408
409 # Ex: TRAFFICGEN_MOONGEN_HOST_IP_ADDR = "192.10.1.1"
410 TRAFFICGEN_MOONGEN_HOST_IP_ADDR = ''
411 TRAFFICGEN_MOONGEN_USER = ''
412 TRAFFICGEN_MOONGEN_BASE_DIR = ''
413 TRAFFICGEN_MOONGEN_PORTS = ''
414 # Ex. 10 Gbps: TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10'
415 # Today only 10 Gbps is supported
416 TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = ''
417
418 # MoonGen Configuration and Connection Info-- END
419 #################################################
420
421 ################################################
422 # Trex Configuration and Connection Info-- BEGIN
423
424 # Example: TRAFFICGEN_TREX_HOST_IP_ADDR = "192.10.1.1"
425 # Example: TRAFFICGEN_TREX_USER = 'root'
426 # Example: TRAFFICGEN_TREX_BASE_DIR = '/traffic_gen/trex/'
427 # Example: TRAFFICGEN_TREX_PORT1 = '00:00:00:00:00:00'
428 TRAFFICGEN_TREX_HOST_IP_ADDR = ''
429 TRAFFICGEN_TREX_USER = ''
430 TRAFFICGEN_TREX_BASE_DIR = ''
431 TRAFFICGEN_TREX_PORT1 = ''
432 TRAFFICGEN_TREX_PORT2 = ''
433 # RFC2544 Throughput execution will end after threshold below is reached.
434 # It defines maximal difference between frame rate of successful (i.e. defined
435 # frameloss reached) and unsuccessful (i.e. frameloss exceeded) iterations.
436 TRAFFICGEN_TREX_RFC2544_TPUT_THRESHOLD = 0.05
437 # Latency statistics are collected by separate stream created for each interface.
438 # Parameter below defines frequency of packets used for latency measurement in PPS.
439 # Value 0 will disable latency specific streams.
440 TRAFFICGEN_TREX_LATENCY_PPS = 1000
441 # Example 10 Gbps: TRAFFICGEN_TREXINE_SPEED_GBPS = '10'
442 # Today only 10 Gbps is supported
443 TRAFFICGEN_TREX_LINE_SPEED_GBPS = '10'
444 # FOR SR-IOV or multistream layer 2 tests to work with T-Rex enable Promiscuous mode
445 TRAFFICGEN_TREX_PROMISCUOUS=False
446 PATHS['trafficgen'] = {
447     'Trex': {
448         'type' : 'src',
449         'src': {
450             'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/stl')
451     }
452   }
453 }
454 # TREX Configuration and Connection Info-- END
455 ##############################################