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