summaryrefslogtreecommitdiffstats
path: root/core/vswitch_controller_op2p.py
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2016-01-28 15:51:22 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-02-03 10:17:33 +0000
commit5d5fc10455b2f57321e2933f61b909af2ec73407 (patch)
tree440818ff2007466b22411fce0cf81380596eb225 /core/vswitch_controller_op2p.py
parent26d5dcc91e9bbf92a28892382094022997d07b5a (diff)
pkt_gen: Add IxNet support for GRE frames
Add option to generate GRE frames for testing GRE decapsulation tests. Recent changes: * Fix merge conflict * Updated userguides * Complete set of fields and working decap * Move GRE ixnet calls to if statement to reuse inner frame settings Change-Id: I0cf9243953a72a464ae4701a858e76aecbdb8528 JIRA: VSPERF-191 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'core/vswitch_controller_op2p.py')
-rw-r--r--core/vswitch_controller_op2p.py16
1 files changed, 10 insertions, 6 deletions
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],