#!/usr/bin/env tclsh
# Copyright (c) 2014, Ixia
-# Copyright (c) 2015-2016, Intel Corporation
+# Copyright (c) 2015-2017, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
set duration [dict get $testSpec duration]
+ set L2CountValue 1
+ set L2Increment False
+ set L3ValueType singleValue
+ set L3CountValue 1
+ set L4ValueType singleValue
+ set L4CountValue 1
+
# RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script):
# Test => Trial
# Trial => Iteration
}
set multipleStreams [dict get $testSpec multipleStreams]
+ set streamType [dict get $testSpec streamType]
+
if {($multipleStreams < 0)} {
- set multipleStreams 0
+ set multipleStreams 0
}
- 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
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 \
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 \
#
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]
#
set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.sourceAddress-2"
ixNet setMultiAttrs $sg_field \
- -singleValue {00:00:00:00:00:00} \
+ -singleValue $srcMac \
-seed {1} \
-optionalEnabled True \
-fullMesh False \
-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:00} \
+ -fieldValue $srcMac \
-auto False \
-randomMask {00:00:00:00:00:00} \
-trackingEnabled False \
-valueType singleValue \
-activeFieldChoice False \
- -startValue {00:00:00:00:00:00} \
+ -startValue $srcMac \
-countValue {1}
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
-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]
-valueList {{63}} \
-stepValue {63} \
-fixedBits {63} \
- -fieldValue {$srcPort} \
- -auto True \
+ -fieldValue $srcPort \
+ -auto False \
-randomMask {63} \
-trackingEnabled False \
-valueType singleValue \
-activeFieldChoice False \
- -startValue {63} \
+ -startValue $srcPort \
-countValue {1}
#
-auto False \
-randomMask {63} \
-trackingEnabled False \
- -valueType $multipleStreams \
+ -valueType $L4ValueType \
-activeFieldChoice False \
-startValue {0} \
- -countValue $numflows
+ -countValue $L4CountValue
#
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.length-3"
-trackingEnabled false \
-valueType singleValue \
-activeFieldChoice false \
- -startValue 60 \
+ -startValue 0 \
-countValue 1
set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3"