summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2016-01-29 13:55:53 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-02-03 10:17:51 +0000
commit4b8014e83855e1da674d3115237c2556742cbdad (patch)
treecd9e9246a066f942425ada847199f7318957b90e /tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
parent5d5fc10455b2f57321e2933f61b909af2ec73407 (diff)
pkt_gen: Add support for generating GENEVE frames
Add option to generate GENEVE frames for decapsulation tests. IxNet 7.3X does not have a native support of GENEVE protocol. The template, GeneveIxNetTemplate.xml_ClearText.xml, should be imported into IxNET for this testcase to work. Recent changes: * Updated dependency * Updated userguide * Move inner frame variables & srcport/dstport to L4 Change-Id: I90f5fb256b51ae44bc1bc7983c599c9dbbffea08 JIRA: VSPERF-192 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Mark D. Gray <mark.d.gray@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl')
-rwxr-xr-xtools/pkt_gen/ixnet/ixnetrfc2544v2.tcl87
1 files changed, 85 insertions, 2 deletions
diff --git a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
index c94e85a3..83aa3afc 100755
--- a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
+++ b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
@@ -152,7 +152,9 @@ proc startRfc2544Test { testSpec trafficSpec } {
}
# VXLAN
- set vxlan_enabled [dict exists $trafficSpec_l4 vni]
+ set vxlan_enabled [dict exists $trafficSpec_l4 vni]
+ set geneve_enabled [dict exists $trafficSpec_l4 geneve_vni]
+
if { $vxlan_enabled } {
puts "VXLAN is enabled. Setting VXLAN variables"
set vni [dict get $trafficSpec_l4 vni]
@@ -164,6 +166,17 @@ proc startRfc2544Test { testSpec trafficSpec } {
set inner_proto [string tolower $inner_proto]
set inner_srcport [dict get $trafficSpec_l4 inner_srcport]
set inner_dstport [dict get $trafficSpec_l4 inner_dstport]
+ } elseif { $geneve_enabled } {
+ puts "GENEVE is enabled. Setting GENEVE variables"
+ set geneve_vni [dict get $trafficSpec_l4 geneve_vni]
+ set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac]
+ set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac]
+ set inner_srcip [dict get $trafficSpec_l4 inner_srcip]
+ set inner_dstip [dict get $trafficSpec_l4 inner_dstip]
+ set inner_proto [dict get $trafficSpec_l4 inner_proto]
+ set inner_proto [string tolower $inner_proto]
+ set inner_srcport [dict get $trafficSpec_l4 inner_srcport]
+ set inner_dstport [dict get $trafficSpec_l4 inner_dstport]
}
set gre_enabled False
@@ -2024,7 +2037,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
set gre_enabled True
}
- if { $vxlan_enabled || $gre_enabled } {
+ if { $vxlan_enabled || $gre_enabled || $geneve_enabled } {
# VXLAN and GRE have similar inner frame data so we set unique fields
# for each protocol then set the common fields.
@@ -2100,6 +2113,76 @@ proc startRfc2544Test { testSpec trafficSpec } {
-randomMask 0 \
-startValue 0
+ } elseif { $geneve_enabled } {
+ # GENEVE START
+ #
+ set sg_stack $ixNetSG_Stack(2)/stack:"geneve-$stack_number"
+ sg_commit
+ set sg_stack [lindex [ixNet remapIds $sg_stack] 0]
+ set ixNetSG_Stack(3) $sg_stack
+ incr stack_number
+
+ set sg_field $ixNetSG_Stack(3)/field:"geneve.header.version-1"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x00] \
+ -stepValue 0x00 \
+ -fixedBits 0x00 \
+ -fieldValue 0 \
+ -randomMask 0x00 \
+ -startValue 0x00
+
+ set sg_field $ixNetSG_Stack(3)/field:"geneve.header.optionsLength-2"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x00] \
+ -stepValue 0x00 \
+ -fixedBits 0x00 \
+ -fieldValue 0 \
+ -randomMask 0x00 \
+ -startValue 0x00
+
+
+ set sg_field $ixNetSG_Stack(3)/field:"geneve.header.flags-3"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x00] \
+ -stepValue 0x00 \
+ -fixedBits 0x00 \
+ -fieldValue 0 \
+ -randomMask 0x00 \
+ -startValue 0x00
+
+ set sg_field $ixNetSG_Stack(3)/field:"geneve.header.protocolType-4"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 6558 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x6558] \
+ -stepValue 0x6558 \
+ -fixedBits 0x6558 \
+ -fieldValue 6558 \
+ -randomMask 0x6558 \
+ -startValue 0x6558
+
+ set sg_field $ixNetSG_Stack(3)/field:"geneve.header.vni-5"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
} elseif { $gre_enabled } {
puts "Setting GRE attributes"
# GRE START