X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=3rd_party%2Fixia%2Fixnetrfc2544v2.tcl;h=b5c0fe2a2a54b397d2d1b0b504f483d928e1b69c;hb=8a1b74a4fdbafdef256cec64501f1ec751f03b9f;hp=539c5a5b80ae79b80ce99dd9edc46afc1359f70c;hpb=64248beecb230957f77811c37e9f099917c0bc4f;p=vswitchperf.git diff --git a/3rd_party/ixia/ixnetrfc2544v2.tcl b/3rd_party/ixia/ixnetrfc2544v2.tcl index 539c5a5b..b5c0fe2a 100755 --- a/3rd_party/ixia/ixnetrfc2544v2.tcl +++ b/3rd_party/ixia/ixnetrfc2544v2.tcl @@ -1,7 +1,7 @@ #!/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 @@ -83,6 +83,13 @@ proc startRfc2544Test { testSpec trafficSpec } { 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 @@ -109,20 +116,23 @@ 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 } - 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 @@ -746,9 +756,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 \ @@ -1126,9 +1136,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 \ @@ -1402,20 +1412,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] @@ -1425,20 +1435,20 @@ proc startRfc2544Test { testSpec trafficSpec } { # 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] @@ -1568,16 +1578,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] @@ -1630,13 +1640,13 @@ proc startRfc2544Test { testSpec trafficSpec } { -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} # @@ -1655,10 +1665,10 @@ proc startRfc2544Test { testSpec trafficSpec } { -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" @@ -1742,7 +1752,7 @@ proc startRfc2544Test { testSpec trafficSpec } { -trackingEnabled false \ -valueType singleValue \ -activeFieldChoice false \ - -startValue 60 \ + -startValue 0 \ -countValue 1 set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3"