From 5d5fc10455b2f57321e2933f61b909af2ec73407 Mon Sep 17 00:00:00 2001 From: Dino Simeon Madarang Date: Thu, 28 Jan 2016 15:51:22 +0000 Subject: 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 Reviewed-by: Maryam Tahhan Reviewed-by: Billy O Mahony Reviewed-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Brian Castelli --- core/vswitch_controller_op2p.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'core') 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], -- cgit 1.2.3-korg