aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/integration/03_traffic.conf23
-rw-r--r--core/vswitch_controller_op2p.py16
-rwxr-xr-xdocs/userguide/integration.rst43
-rw-r--r--testcases/testcase.py17
-rwxr-xr-xtools/pkt_gen/ixnet/ixnetrfc2544v2.tcl476
5 files changed, 451 insertions, 124 deletions
diff --git a/conf/integration/03_traffic.conf b/conf/integration/03_traffic.conf
index b59a2d09..7a890ad3 100644
--- a/conf/integration/03_traffic.conf
+++ b/conf/integration/03_traffic.conf
@@ -70,3 +70,26 @@ VXLAN_FRAME_l4 = {'srcport': 4789,
'protocolpad': '',
'protocolpadbytes': '',
}
+
+GRE_FRAME_L2 = {'srcmac': '',
+ 'dstmac': '',
+ }
+
+GRE_FRAME_L3 = {'proto': 'gre',
+ 'packetsize': 64,
+ 'srcip': TRAFFICGEN_PORT1_IP,
+ 'dstip': '',
+ }
+
+GRE_FRAME_l4 = {'srcport': 0,
+ 'dstport': 0,
+ 'inner_srcmac': '',
+ 'inner_dstmac': '',
+ 'inner_srcip': '',
+ 'inner_dstip': '',
+ 'inner_proto': 'tcp',
+ 'inner_srcport': 3000,
+ 'inner_dstport': 3001,
+ 'protocolpad': '',
+ 'protocolpadbytes': '',
+ }
diff --git a/core/vswitch_controller_op2p.py b/core/vswitch_controller_op2p.py
index ac817153..609e5d95 100644
--- a/core/vswitch_controller_op2p.py
+++ b/core/vswitch_controller_op2p.py
@@ -144,12 +144,16 @@ class VswitchControllerOP2P(IVswitchController):
self._vswitch.add_switch(bridge_ext)
self._vswitch.add_phy_port(bridge)
(_, phy2_number) = self._vswitch.add_phy_port(bridge_ext)
- vxlan_vni = 'options:key=' + settings.getValue('VXLAN_VNI')
- (_, phy3_number) = self._vswitch.add_tunnel_port(bridge_ext,
- tgen_ip1,
- tunnel_type,
- params=[vxlan_vni])
-
+ if tunnel_type == "vxlan":
+ vxlan_vni = 'options:key=' + settings.getValue('VXLAN_VNI')
+ (_, phy3_number) = self._vswitch.add_tunnel_port(bridge_ext,
+ tgen_ip1,
+ tunnel_type,
+ params=[vxlan_vni])
+ else:
+ (_, phy3_number) = self._vswitch.add_tunnel_port(bridge_ext,
+ tgen_ip1,
+ tunnel_type)
tasks.run_task(['sudo', 'ip', 'addr', 'add',
bridge_ext_ip,
'dev', bridge_ext],
diff --git a/docs/userguide/integration.rst b/docs/userguide/integration.rst
index f4120e4e..bca8eaaf 100755
--- a/docs/userguide/integration.rst
+++ b/docs/userguide/integration.rst
@@ -141,4 +141,47 @@ To run VXLAN decapsulation tests:
./vsperf --conf-file user_settings.py --run-integration overlay_p2p_decap_cont
+Executing GRE decapsulation tests
+---------------------------------
+To run GRE decapsulation tests:
+
+1. Set the variables used in "Executing Tunnel encapsulation tests"
+
+2. Set IXNET_TCL_SCRIPT, GRE_FRAME_L2, GRE_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
+
+ .. code-block:: console
+
+ IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
+
+ GRE_FRAME_L2 = {'srcmac':
+ '01:02:03:04:05:06',
+ 'dstmac':
+ '<DUT's NIC2 MAC>',
+ }
+
+ GRE_FRAME_L3 = {'proto': 'gre',
+ 'packetsize': 64,
+ 'srcip': '1.1.1.1',
+ 'dstip': '192.168.240.1',
+ }
+
+ GRE_FRAME_L4 = {'srcport': 0,
+ 'dstport': 0
+ 'inner_srcmac': '01:02:03:04:05:06',
+ 'inner_dstmac': '06:05:04:03:02:01',
+ 'inner_srcip': '192.168.0.10',
+ 'inner_dstip': '192.168.240.9',
+ 'inner_proto': 'udp',
+ 'inner_srcport': 3000,
+ 'inner_dstport': 3001,
+ }
+
+ # The receiving NIC of GRE traffic
+ DUT_NIC1_MAC = '<mac address>'
+
+3. Run test:
+
+ .. code-block:: console
+
+ ./vsperf --conf-file user_settings.py --test-param 'tunnel_type=gre' --run-integration overlay_p2p_decap_cont
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 0c64a34f..6fa1092e 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -65,15 +65,17 @@ class TestCase(object):
self._frame_mod = cfg.get('Frame Modification', None)
self._performance_test = performance_test
- tunnel_type = None
+ self._tunnel_type = None
self._tunnel_operation = None
if self.deployment == 'op2p':
self._tunnel_operation = cfg['Tunnel Operation']
if 'Tunnel Type' in cfg:
- tunnel_type = cfg['Tunnel Type']
- tunnel_type = get_test_param('tunnel_type', tunnel_type)
+ self._tunnel_type = cfg['Tunnel Type']
+ self._tunnel_type = get_test_param('tunnel_type',
+ self._tunnel_type)
+
# identify guest loopback method, so it can be added into reports
self.guest_loopback = []
@@ -113,7 +115,7 @@ class TestCase(object):
self._traffic.update({'traffic_type': traffic_type,
'flow_type': cfg.get('Flow Type', 'port'),
'bidir': bidirectional,
- 'tunnel_type': tunnel_type,
+ 'tunnel_type': self._tunnel_type,
'multistream': int(multistream),
'stream_type': stream_type,
'pre_installed_flows' : pre_installed_flows,
@@ -154,9 +156,10 @@ class TestCase(object):
S.getValue('TRAFFICGEN_PORT2_IP')})
if self._tunnel_operation == "decapsulation":
- self._traffic['l2'] = S.getValue('VXLAN_FRAME_L2')
- self._traffic['l3'] = S.getValue('VXLAN_FRAME_L3')
- self._traffic['l4'] = S.getValue('VXLAN_FRAME_L4')
+ self._traffic['l2'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L2')
+ self._traffic['l3'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L3')
+ self._traffic['l4'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L4')
+
self._logger.debug("Controllers:")
loader = Loader()
diff --git a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
index 05899aa5..c94e85a3 100755
--- a/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
+++ b/tools/pkt_gen/ixnet/ixnetrfc2544v2.tcl
@@ -140,11 +140,17 @@ proc startRfc2544Test { testSpec trafficSpec } {
set srcPort [dict get $trafficSpec_l4 srcport]
set dstPort [dict get $trafficSpec_l4 dstport]
+ # Tested protocols: udp, tcp, gre
set proto [dict get $trafficSpec_l3 proto]
set proto [string tolower $proto]
set srcIp [dict get $trafficSpec_l3 srcip]
set dstIp [dict get $trafficSpec_l3 dstip]
+ set proto_value 17
+ if { [string compare $proto "tcp"] == 0 } {
+ set proto_value 6
+ }
+
# VXLAN
set vxlan_enabled [dict exists $trafficSpec_l4 vni]
if { $vxlan_enabled } {
@@ -160,6 +166,21 @@ proc startRfc2544Test { testSpec trafficSpec } {
set inner_dstport [dict get $trafficSpec_l4 inner_dstport]
}
+ set gre_enabled False
+ if { [string compare $proto "gre"] == 0 } {
+ puts "GRE is enabled. Setting GRE variables"
+ set proto_value 47
+ set gre_enabled True
+ 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]
+ }
+
if {$frameSize < 68 } {
if {$rfc2544TestType == "back2back"} {
puts "WARNING: Packet size too small, packet size will be \
@@ -1463,7 +1484,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
#
set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.protocol-25"
ixNet setMultiAttrs $sg_field \
- -singleValue {17} \
+ -singleValue {$proto_value} \
-seed {1} \
-optionalEnabled True \
-fullMesh False \
@@ -1565,14 +1586,21 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue {0} \
-countValue {1}
+ # Suffix for stack names
+ # This variable should be incremented after setting sg_stack like:
+ # set sg_stack $ixNetSG_Stack(2)/stack:"protocolnamehere-$stack_number"
+ # incr stack_number
+
+ set stack_number 3
if { [string compare $proto "udp"] == 0 } {
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"
#
- set sg_stack $ixNetSG_Stack(2)/stack:"udp-3"
+ set sg_stack $ixNetSG_Stack(2)/stack:"udp-$stack_number"
sg_commit
set sg_stack [lindex [ixNet remapIds $sg_stack] 0]
set ixNetSG_Stack(3) $sg_stack
+ incr stack_number
#
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.srcPort-1"
@@ -1657,9 +1685,15 @@ proc startRfc2544Test { testSpec trafficSpec } {
-activeFieldChoice False \
-startValue {0} \
-countValue {1}
- } else {
+ } elseif { [string compare $proto "tcp"] == 0 } {
# TCP
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.srcPort-1"
+ set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$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:"tcp.header.srcPort-1"
ixNet setMultiAttrs $sg_field \
-singleValue $srcPort \
-seed 1 \
@@ -1677,7 +1711,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 60 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.dstPort-2"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2"
ixNet setMultiAttrs $sg_field \
-singleValue $dstPort \
-seed 1 \
@@ -1695,7 +1729,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 60 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.sequenceNumber-3"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1713,7 +1747,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x00000000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.acknowledgementNumber-4"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1731,7 +1765,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x00000000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.dataOffset-5"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5"
ixNet setMultiAttrs $sg_field \
-singleValue 5 \
-seed 1 \
@@ -1749,7 +1783,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 5 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.reserved-6"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1767,7 +1801,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.ecn.nsBit-7"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1785,7 +1819,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.ecn.cwrBit-8"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1803,7 +1837,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.ecn.ecnEchoBit-9"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1821,7 +1855,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.urgBit-10"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1839,7 +1873,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.ackBit-11"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1857,7 +1891,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.pshBit-12"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1875,7 +1909,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.rstBit-13"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1893,7 +1927,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.synBit-14"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1911,7 +1945,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.controlBits.finBit-15"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1929,7 +1963,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.window-16"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1947,7 +1981,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x0000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.checksum-17"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1965,7 +1999,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x0000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-3"/field:"tcp.header.urgentPtr-18"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -1984,80 +2018,287 @@ proc startRfc2544Test { testSpec trafficSpec } {
-countValue 1
sg_commit
set sg_field [lindex [ixNet remapIds $sg_field] 0]
+
+ } elseif { [string compare $proto "gre"] == 0 } {
+ # GRE
+ set gre_enabled True
}
- if { $vxlan_enabled } {
- # VXLAN START
- #
- # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"
- #
- set sg_stack $ixNetSG_Stack(2)/stack:"vxlan-4"
- sg_commit
- set sg_stack [lindex [ixNet remapIds $sg_stack] 0]
- set ixNetSG_Stack(3) $sg_stack
+ if { $vxlan_enabled || $gre_enabled } {
+ # VXLAN and GRE have similar inner frame data so we set unique fields
+ # for each protocol then set the common fields.
- #
- # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.flags-1
- #
- set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.flags-1"
- ixNet setMultiAttrs $sg_field \
- -singleValue 8 \
- -seed 1 \
- -optionalEnabled true \
- -valueList [list 0x08] \
- -stepValue 0x08 \
- -fixedBits 0x08 \
- -fieldValue 8 \
- -randomMask 0x08 \
- -startValue 0x08
#
- # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved-2
- #
- set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved-2"
- ixNet setMultiAttrs $sg_field \
- -singleValue 0 \
- -seed 1 \
- -optionalEnabled true \
- -valueList [list 0] \
- -stepValue 0 \
- -fixedBits 0 \
- -fieldValue 0 \
- -randomMask 0 \
- -startValue 0
+ if { $vxlan_enabled } {
+ # VXLAN START
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"
+ #
+ set sg_stack $ixNetSG_Stack(2)/stack:"vxlan-$stack_number"
+ sg_commit
+ set sg_stack [lindex [ixNet remapIds $sg_stack] 0]
+ set ixNetSG_Stack(3) $sg_stack
+ incr stack_number
- #
- # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.vni-3"
- #
- set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.vni-3"
- ixNet setMultiAttrs $sg_field \
- -singleValue $vni \
- -seed 1 \
- -optionalEnabled true \
- -valueList [list 1234] \
- -stepValue 1234 \
- -fixedBits 1234 \
- -fieldValue $vni \
- -randomMask 1234 \
- -startValue 1234
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.flags-1
+ #
+ set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.flags-1"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 8 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x08] \
+ -stepValue 0x08 \
+ -fixedBits 0x08 \
+ -fieldValue 8 \
+ -randomMask 0x08 \
+ -startValue 0x08
- #
- # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved8-4"
- #
- set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved8-4"
- ixNet setMultiAttrs $sg_field \
- -singleValue 0 \
- -seed 1 \
- -optionalEnabled true \
- -valueList [list 0] \
- -stepValue 0 \
- -fixedBits 0 \
- -fieldValue 0 \
- -randomMask 0 \
- -startValue 0
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved-2
+ #
+ set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved-2"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.vni-3"
+ #
+ set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.vni-3"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue $vni \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 1234] \
+ -stepValue 1234 \
+ -fixedBits 1234 \
+ -fieldValue $vni \
+ -randomMask 1234 \
+ -startValue 1234
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved8-4"
+ #
+ set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved8-4"
+ 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
+ #
+ # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"gre-3"
+ #
+ set sg_stack $ixNetSG_Stack(2)/stack:"gre-$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:"gre.header.checksumPresent-1"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue "0:No\ Checksum" \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved1-2"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyPresent-3"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue "0:No\ Key\ field" \
+ -randomMask 0 \
+ -startValue 0
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequencePresent-4"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue "0:No\ sequence\ number\ field" \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved2-5"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.version-6"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.protocol-7"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 6558 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0x0] \
+ -stepValue 0x0 \
+ -fixedBits 0x0 \
+ -fieldValue 6558 \
+ -auto true \
+ -randomMask 0x0 \
+ -startValue 0x0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.checksum-8"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -auto true \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.reserved-9"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.noChecksum-10"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -activeFieldChoice true \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.key-11"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.noKey-12"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -activeFieldChoice true \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.sequenceNum-13"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -startValue 0
+
+ set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.noSequenceNum-14"
+ ixNet setMultiAttrs $sg_field \
+ -singleValue 0 \
+ -seed 1 \
+ -optionalEnabled true \
+ -valueList [list 0] \
+ -stepValue 0 \
+ -fixedBits 0 \
+ -fieldValue 0 \
+ -randomMask 0 \
+ -activeFieldChoice true \
+ -startValue 0
+
+ sg_commit
+ set sg_field [lindex [ixNet remapIds $sg_field] 0]
+
+ }
+
+ # Common fields for VXLAN and GRE
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.destinationAddress-1"
- set sg_field $ixNetSG_Stack(2)/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.destinationAddress-1"
+ set sg_stack $ixNetSG_Stack(2)/stack:"ethernetNoFCS-$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:"ethernetNoFCS.header.destinationAddress-1"
ixNet setMultiAttrs $sg_field \
-singleValue $inner_dstmac \
-seed 1 \
@@ -2069,7 +2310,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-randomMask 00:00:00:00:00:00 \
-startValue 00:00:00:00:00:00
- set sg_field $ixNetSG_Stack(2)/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.sourceAddress-2"
+ set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.sourceAddress-2"
ixNet setMultiAttrs $sg_field \
-singleValue $inner_srcmac \
-seed 1 \
@@ -2081,7 +2322,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-randomMask 00:00:00:00:00:00 \
-startValue 00:00:00:00:00:00
- set sg_field $ixNetSG_Stack(2)/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.etherType-3"
+ set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.etherType-3"
ixNet setMultiAttrs $sg_field \
-singleValue 800 \
-seed 1 \
@@ -2094,10 +2335,11 @@ proc startRfc2544Test { testSpec trafficSpec } {
-randomMask 0xFFFF \
-startValue 0xFFFF
- set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-6"
+ set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-$stack_number"
sg_commit
set sg_stack [lindex [ixNet remapIds $sg_stack] 0]
set ixNetSG_Stack(3) $sg_stack
+ incr stack_number
#
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-6"/field:"ipv4.header.version-1"/
@@ -2366,11 +2608,12 @@ proc startRfc2544Test { testSpec trafficSpec } {
set sg_field [lindex [ixNet remapIds $sg_field] 0]
if { [string compare $inner_proto "udp"] == 0 } {
- # INNER UDP
- set sg_stack $ixNetSG_Stack(2)/stack:"udp-7"
+ # INNER UDP
+ set sg_stack $ixNetSG_Stack(2)/stack:"udp-$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:"udp.header.srcPort-1"
ixNet setMultiAttrs $sg_field \
@@ -2428,7 +2671,13 @@ proc startRfc2544Test { testSpec trafficSpec } {
} else {
# INNER TCP
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.srcPort-1"
+ set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$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:"tcp.header.srcPort-1"
ixNet setMultiAttrs $sg_field \
-singleValue $inner_srcport \
-seed 1 \
@@ -2446,7 +2695,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 60 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.dstPort-2"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2"
ixNet setMultiAttrs $sg_field \
-singleValue $inner_dstport \
-seed 1 \
@@ -2464,7 +2713,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 60 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.sequenceNumber-3"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2482,7 +2731,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x00000000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.acknowledgementNumber-4"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2500,7 +2749,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x00000000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.dataOffset-5"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5"
ixNet setMultiAttrs $sg_field \
-singleValue 5 \
-seed 1 \
@@ -2518,7 +2767,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 5 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.reserved-6"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2536,7 +2785,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.ecn.nsBit-7"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2554,7 +2803,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.ecn.cwrBit-8"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2572,7 +2821,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.ecn.ecnEchoBit-9"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2590,7 +2839,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.urgBit-10"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2608,7 +2857,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.ackBit-11"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2626,7 +2875,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.pshBit-12"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2644,7 +2893,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.rstBit-13"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2662,7 +2911,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.synBit-14"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2680,7 +2929,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.controlBits.finBit-15"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2698,7 +2947,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.window-16"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2716,7 +2965,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x0000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.checksum-17"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2734,7 +2983,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-startValue 0x0000 \
-countValue 1
- set sg_field $ixNetSG_Stack(2)/stack:"tcp-7"/field:"tcp.header.urgentPtr-18"
+ set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2756,8 +3005,13 @@ proc startRfc2544Test { testSpec trafficSpec } {
}
+ set sg_stack $ixNetSG_Stack(2)/stack:"fcs-$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(2)/stack:"fcs-8"/field:"ethernet.fcs-1"
+ set sg_field $ixNetSG_Stack(3)/field:"ethernet.fcs-1"
ixNet setMultiAttrs $sg_field \
-singleValue 0 \
-seed 1 \
@@ -2770,7 +3024,7 @@ proc startRfc2544Test { testSpec trafficSpec } {
-randomMask 0 \
-startValue 0
- # VXLAN END
+ # VXLAN/GRE END
} else {
# configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"fcs-4"
#