diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2017-03-14 12:54:39 +0000 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2017-03-24 08:06:45 +0000 |
commit | 725033715118bc318fdd6aa3745c2c07ca714086 (patch) | |
tree | bae5202a755c6a21d59cb17277b469167e35baeb /tools/functions.py | |
parent | 0ccb44ca1f90200a2e41f25fcf499074c819002d (diff) |
multistream: Support huge number of streams
Restriction of 64K streams was limited only to L4 stream
type. In case of L3 and L2 stream type, it is possible to
define unlimited number of streams to be simulated
by traffic generator.
JIRA: VSPERF-498
Change-Id: I4ce3253299473127d135c01543999a8593b9556f
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Bill Michalowski <bmichalo@redhat.com>
Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com>
Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
Diffstat (limited to 'tools/functions.py')
-rw-r--r-- | tools/functions.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/functions.py b/tools/functions.py index d00200d9..05bde54f 100644 --- a/tools/functions.py +++ b/tools/functions.py @@ -21,6 +21,8 @@ import glob import shutil from conf import settings as S +MAX_L4_FLOWS = 65536 + # # Support functions # @@ -139,3 +141,15 @@ def settings_update_paths(): tools['dpdk_src'] = S.getValue('PATHS')['dpdk']['src']['path'] S.setValue('TOOLS', tools) + +def check_traffic(traffic): + """Check traffic definition and correct it if needed. + """ + # in case of UDP ports we have only 65536 (0-65535) unique options + if traffic['multistream'] > MAX_L4_FLOWS and \ + traffic['stream_type'] == 'L4': + logging.getLogger().warning('Requested amount of L4 flows %s is bigger than ' + 'number of transport protocol ports. It was set ' + 'to %s.', traffic['multistream'], MAX_L4_FLOWS) + traffic['multistream'] = MAX_L4_FLOWS + return traffic |