aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2015-12-03 12:58:03 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-12-09 14:15:14 +0000
commit39ee5533feb7028f6fb7fce604f66b4451d434c7 (patch)
tree9f073f8b07d34f9267319c292705a65bf555341d
parenta05bfbc0bd553f761962634609d626085b3b3beb (diff)
testcase: scalability testcase enhancements
Streams used by scalability testcases can be simulated at different network layers by modification of destination MAC address (L2), destination IP address (L3) or destination UDP port (L4). It is possible to define number and type of the streams by testcase definition by options "MultiStream" and "Stream Type" or by CLI parameters "multistream" and "stream_type". CLI options override testcase definition. Number of streams, their types, used transport protocol and indication of pre-installed flows are written to both result CSV file and MD file with test report. Default transport protocol was changed to UDP because IxNetwork configuration script doesn't support TCP yet. Change-Id: I1ff9ab7756d38f65b1a7730397507c5a5ff5a3d1 JIRA: VSPERF-81 JIRA: VSPERF-82 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
-rwxr-xr-xconf/01_testcases.conf12
-rw-r--r--core/results/results_constants.py4
-rw-r--r--testcases/testcase.py18
-rwxr-xr-xtools/pkt_gen/ixnet/ixnet.py3
-rw-r--r--tools/pkt_gen/ixnet/ixnetrfc2544.tcl80
-rw-r--r--tools/pkt_gen/trafficgen/trafficgenhelper.py2
6 files changed, 83 insertions, 36 deletions
diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf
index a35c395e..fd268bed 100755
--- a/conf/01_testcases.conf
+++ b/conf/01_testcases.conf
@@ -31,6 +31,18 @@
# "MultiStream": 0-65535 # Optional. Defines number of flows simulated
# # by traffic generator. Value 0 disables
# # MultiStream feature
+# # It can be overridden by cli option multistream.
+# "Stream Type": ["L2"|"L3"|"L4"] # Optional. Stream Type is an extension
+# # of the "MultiStream" feature. If MultiStream
+# # is disabled, then Stream Type will be ignored.
+# # Stream Type defines ISO OSI network layer
+# # used for simulation of multiple streams.
+# # It can be overridden by cli option stream_type.
+# # Values:
+# # "L2" - iteration of destination MAC address
+# # "L3" - iteration of destination IP address
+# # "L4" - iteration of destination UDP port
+# # Default value is "L4".
# "Flow Type": ["port"|"IP"] # Optional. Defines flows complexity. In case
# # it isn't specified, then "port" will be used.
# # Values:
diff --git a/core/results/results_constants.py b/core/results/results_constants.py
index 58086e32..8f139f14 100644
--- a/core/results/results_constants.py
+++ b/core/results/results_constants.py
@@ -21,6 +21,7 @@ class ResultsConstants(object):
ID = 'id'
PACKET_SIZE = 'packet_size'
DEPLOYMENT = 'deployment'
+ TRAFFIC_TYPE = 'traffic_type'
GUEST_LOOPBACK = 'guest_loopback_app'
UNKNOWN_VALUE = "Unknown"
@@ -52,6 +53,9 @@ class ResultsConstants(object):
B2B_FRAMES = 'b2b_frames'
B2B_FRAME_LOSS_FRAMES = 'b2b_frame_loss_frames'
B2B_FRAME_LOSS_PERCENT = 'b2b_frame_loss_percent'
+ SCAL_STREAM_COUNT = 'stream_count'
+ SCAL_STREAM_TYPE = 'match_type'
+ SCAL_PRE_INSTALLED_FLOWS = 'pre-installed_flows'
@staticmethod
def get_traffic_constants():
diff --git a/testcases/testcase.py b/testcases/testcase.py
index b3ff2812..1bb7aba5 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -63,6 +63,15 @@ class TestCase(object):
else:
self.guest_loopback = S.getValue('GUEST_LOOPBACK').copy()
+ # read configuration of streams; CLI parameter takes precedence to
+ # testcase definition
+ multistream = cfg.get('MultiStream', 0)
+ multistream = get_test_param('multistream', multistream)
+ stream_type = cfg.get('Stream Type', 'L4')
+ stream_type = get_test_param('stream_type', stream_type)
+ pre_installed_flows = False # placeholder for VSPERF-83 implementation
+
+
# check if test requires background load and which generator it uses
self._load_cfg = cfg.get('Load', None)
if self._load_cfg and 'tool' in self._load_cfg:
@@ -80,7 +89,9 @@ class TestCase(object):
self._traffic.update({'traffic_type': cfg['Traffic Type'],
'flow_type': cfg.get('Flow Type', 'port'),
'bidir': cfg['biDirectional'],
- 'multistream': cfg.get('MultiStream', 0),
+ 'multistream': int(multistream),
+ 'stream_type': stream_type,
+ 'pre_installed_flows' : pre_installed_flows,
'frame_rate': int(framerate)})
# OVS Vanilla requires guest VM MAC address and IPs to work
@@ -238,6 +249,11 @@ class TestCase(object):
for item in results:
item[ResultsConstants.ID] = self.name
item[ResultsConstants.DEPLOYMENT] = self.deployment
+ item[ResultsConstants.TRAFFIC_TYPE] = self._traffic['l3']['proto']
+ if self._traffic['multistream']:
+ item[ResultsConstants.SCAL_STREAM_COUNT] = self._traffic['multistream']
+ item[ResultsConstants.SCAL_STREAM_TYPE] = self._traffic['stream_type']
+ item[ResultsConstants.SCAL_PRE_INSTALLED_FLOWS] = self._traffic['pre_installed_flows']
if len(self.guest_loopback):
item[ResultsConstants.GUEST_LOOPBACK] = ' '.join(self.guest_loopback)
diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py
index aaedf05a..a4836330 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -218,6 +218,7 @@ class IxNet(trafficgen.ITrafficGenerator):
'duration': duration,
'framerate': traffic['frame_rate'],
'multipleStreams': traffic['multistream'],
+ 'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
}
self._params['traffic'] = self.traffic_defaults.copy()
@@ -271,6 +272,7 @@ class IxNet(trafficgen.ITrafficGenerator):
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
+ 'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
}
self._params['traffic'] = self.traffic_defaults.copy()
@@ -403,6 +405,7 @@ class IxNet(trafficgen.ITrafficGenerator):
'duration': duration,
'lossrate': lossrate,
'multipleStreams': traffic['multistream'],
+ 'streamType': traffic['stream_type'],
'rfc2544TestType': 'back2back',
}
self._params['traffic'] = self.traffic_defaults.copy()
diff --git a/tools/pkt_gen/ixnet/ixnetrfc2544.tcl b/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
index f6df0713..3bd169c0 100644
--- a/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
+++ b/tools/pkt_gen/ixnet/ixnetrfc2544.tcl
@@ -97,6 +97,13 @@ proc startRfc2544Test { testSpec trafficSpec } {
set learningFrames True
+ set L2CountValue 1
+ set L2Increment False
+ set L3ValueType singleValue
+ set L3CountValue 1
+ set L4ValueType singleValue
+ set L4CountValue 1
+
if {$learningFrames} {
set learningFrequency oncePerTest
set fastPathEnable True
@@ -106,20 +113,25 @@ proc startRfc2544Test { testSpec trafficSpec } {
}
set multipleStreams [dict get $testSpec multipleStreams]
+ set streamType [dict get $testSpec streamType]
+
if {($multipleStreams < 0)} {
- set multipleStreams 0
+ set multipleStreams 0
+ } elseif {($multipleStreams > 65535)} {
+ set multipleStreams 65535
}
- set numflows 64000
if {$multipleStreams} {
- if {($multipleStreams > 65535)} {
- set numflows 65535
+ if {($streamType == "L2")} {
+ set L2CountValue $multipleStreams
+ set L2Increment True
+ } elseif {($streamType == "L3")} {
+ set L3ValueType increment
+ set L3CountValue $multipleStreams
} else {
- set numflows $multipleStreams
+ set L4ValueType increment
+ set L4CountValue $multipleStreams
}
- set multipleStreams increment
- } else {
- set multipleStreams singleValue
}
set fastConvergence True
@@ -692,9 +704,9 @@ proc startRfc2544Test { testSpec trafficSpec } {
set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan]
ixNet setMultiAttrs $sg_lan \
-atmEncapsulation ::ixNet::OBJ-null \
- -count 1 \
+ -count $L2CountValue \
-countPerVc 1 \
- -enableIncrementMac False \
+ -enableIncrementMac $L2Increment \
-enableIncrementVlan False \
-enableSiteId False \
-enableVlan False \
@@ -1072,9 +1084,9 @@ proc startRfc2544Test { testSpec trafficSpec } {
set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan]
ixNet setMultiAttrs $sg_lan \
-atmEncapsulation ::ixNet::OBJ-null \
- -count 1 \
+ -count $L2CountValue \
-countPerVc 1 \
- -enableIncrementMac False \
+ -enableIncrementMac $L2Increment \
-enableIncrementVlan False \
-enableSiteId False \
-enableVlan False \
@@ -1348,20 +1360,20 @@ proc startRfc2544Test { testSpec trafficSpec } {
#
set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.destinationAddress-1"
ixNet setMultiAttrs $sg_field \
- -singleValue {00:00:00:00:00:00} \
+ -singleValue $dstMac \
-seed {1} \
-optionalEnabled True \
-fullMesh False \
-valueList {{00:00:00:00:00:00}} \
- -stepValue {00:00:00:00:00:00} \
+ -stepValue {00:00:00:00:00:01} \
-fixedBits {00:00:00:00:00:00} \
- -fieldValue {00:00:00:00:00:00} \
+ -fieldValue $dstMac \
-auto False \
-randomMask {00:00:00:00:00:00} \
-trackingEnabled False \
-valueType singleValue \
-activeFieldChoice False \
- -startValue {00:00:00:00:00:00} \
+ -startValue $dstMac \
-countValue {1}
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
@@ -2074,16 +2086,16 @@ proc startRfc2544Test { testSpec trafficSpec } {
-optionalEnabled True \
-fullMesh False \
-valueList {{0.0.0.0}} \
- -stepValue {0.0.0.0} \
+ -stepValue {0.0.0.1} \
-fixedBits {0.0.0.0} \
-fieldValue $dstIp \
-auto False \
-randomMask {0.0.0.0} \
-trackingEnabled False \
- -valueType singleValue \
+ -valueType $L3ValueType \
-activeFieldChoice False \
- -startValue {0.0.0.0} \
- -countValue {1}
+ -startValue $dstIp \
+ -countValue $L3CountValue
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
@@ -2824,10 +2836,10 @@ proc startRfc2544Test { testSpec trafficSpec } {
-auto False \
-randomMask {63} \
-trackingEnabled False \
- -valueType $multipleStreams \
+ -valueType $L4ValueType \
-activeFieldChoice False \
-startValue {0} \
- -countValue $numflows
+ -countValue $L4CountValue
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
@@ -2983,20 +2995,20 @@ proc startRfc2544Test { testSpec trafficSpec } {
#
set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.destinationAddress-1"
ixNet setMultiAttrs $sg_field \
- -singleValue {00:01:00:05:08:00} \
+ -singleValue $dstMac \
-seed {1} \
-optionalEnabled True \
-fullMesh False \
- -valueList {{LearntInfo}} \
- -stepValue {00:00:00:00:00:00} \
+ -valueList {{00:00:00:00:00:00}} \
+ -stepValue {00:00:00:00:00:01} \
-fixedBits {00:00:00:00:00:00} \
- -fieldValue {00:01:00:05:08:00} \
+ -fieldValue $dstMac \
-auto False \
-randomMask {00:00:00:00:00:00} \
-trackingEnabled False \
-valueType singleValue \
-activeFieldChoice False \
- -startValue {00:00:00:00:00:00} \
+ -startValue $dstMac \
-countValue {1}
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
@@ -3010,7 +3022,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-seed {1} \
-optionalEnabled True \
-fullMesh False \
- -valueList {{LearntInfo}} \
+ -valueList {{00:00:00:00:00:00}} \
-stepValue {00:00:00:00:00:00} \
-fixedBits {00:00:00:00:00:00} \
-fieldValue {00:00:00:00:00:01} \
@@ -3709,16 +3721,16 @@ proc startRfc2544Test { testSpec trafficSpec } {
-optionalEnabled True \
-fullMesh False \
-valueList {{0.0.0.0}} \
- -stepValue {0.0.0.0} \
+ -stepValue {0.0.0.1} \
-fixedBits {0.0.0.0} \
-fieldValue $dstIp \
-auto False \
-randomMask {0.0.0.0} \
-trackingEnabled False \
- -valueType singleValue \
+ -valueType $L3ValueType \
-activeFieldChoice False \
- -startValue {0.0.0.0} \
- -countValue {1}
+ -startValue $dstIp \
+ -countValue $L3CountValue
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
@@ -4459,10 +4471,10 @@ proc startRfc2544Test { testSpec trafficSpec } {
-auto False \
-randomMask {63} \
-trackingEnabled False \
- -valueType $multipleStreams \
+ -valueType $L4ValueType \
-activeFieldChoice False \
-startValue {0} \
- -countValue $numflows
+ -countValue $L4CountValue
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
diff --git a/tools/pkt_gen/trafficgen/trafficgenhelper.py b/tools/pkt_gen/trafficgen/trafficgenhelper.py
index 2cd2d2b1..8577da26 100644
--- a/tools/pkt_gen/trafficgen/trafficgenhelper.py
+++ b/tools/pkt_gen/trafficgen/trafficgenhelper.py
@@ -29,7 +29,7 @@ TRAFFIC_DEFAULTS = {
'dstport': 3001,
},
'l3': {
- 'proto': 'tcp',
+ 'proto': 'udp',
'srcip': '1.1.1.1',
'dstip': '90.90.90.90',
},