Merge "test_spec: LTD: MatchAction Performance testing"
[vswitchperf.git] / tools / pkt_gen / ixnet / ixnetrfc2544.tcl
index a74f2ef..e70ca87 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env tclsh
 
 # Copyright (c) 2014, Ixia
-# Copyright (c) 2015, Intel Corporation
+# Copyright (c) 2015-2016, Intel Corporation
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -83,13 +83,16 @@ proc startRfc2544Test { testSpec trafficSpec } {
 
     set duration                [dict get $testSpec duration]
 
+    # RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script):
+    # Test    => Trial
+    # Trial   => Iteration
     if {$binary} {
-        set numTrials           [dict get $testSpec trials]
+        set numTests            [dict get $testSpec tests]
         set frameRate           100
         set tolerance           [dict get $testSpec lossrate]
         set loadType            binary
     } else {
-        set numTrials           1
+        set numTests            1
         set frameRate           [dict get $testSpec framerate]
         set tolerance           0.0
         set loadType            custom
@@ -142,13 +145,14 @@ proc startRfc2544Test { testSpec trafficSpec } {
     # extract nested dictionaries
     set trafficSpec_l2          [dict get $trafficSpec l2]
     set trafficSpec_l3          [dict get $trafficSpec l3]
+    set trafficSpec_l4          [dict get $trafficSpec l4]
     set trafficSpec_vlan        [dict get $trafficSpec vlan]
 
     set frameSize               [dict get $trafficSpec_l2 framesize]
     set srcMac                  [dict get $trafficSpec_l2 srcmac]
     set dstMac                  [dict get $trafficSpec_l2 dstmac]
-    set srcPort                 [dict get $trafficSpec_l2 srcport]
-    set dstPort                 [dict get $trafficSpec_l2 dstport]
+    set srcPort                 [dict get $trafficSpec_l4 srcport]
+    set dstPort                 [dict get $trafficSpec_l4 dstport]
 
     set proto                   [dict get $trafficSpec_l3 proto]
     set srcIp                   [dict get $trafficSpec_l3 srcip]
@@ -157,7 +161,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
 
     if {$frameSize < 68 } {
         if {$rfc2544TestType == "back2back"} {
-            puts "WARNING: Packet size too small, packet size will be \
+            puts "INFO: Packet size too small, packet size will be \
                   increased to 68 for this test"
         }
     }
@@ -7777,7 +7781,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
          -framesize $frameSize \
          -reportTputRateUnit mbps \
          -duration $duration \
-         -numtrials $numTrials \
+         -numtrials $numTests \
          -trafficType constantLoading \
          -burstSize 1 \
          -framesPerBurstGap 1 \
@@ -7950,7 +7954,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
          -rfc2889ordering noOrdering \
          -floodedFramesEnabled False \
          -duration $duration \
-         -numtrials $numTrials \
+         -numtrials $numTests \
          -trafficType constantLoading \
          -burstSize 1 \
          -framesPerBurstGap 1 \