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