summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/test/vpp_vxlan_tunnel.py
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-04-21 19:56:34 +0200
committerDamjan Marion <dmarion@me.com>2021-04-23 19:23:12 +0000
commit3e38422ab905d26ab1625c74268e30c94327ea54 (patch)
tree97e49ff2cebdf78a508bb530c6293f5980f7e160 /src/vnet/vxlan/test/vpp_vxlan_tunnel.py
parent893bc97ed6eb426dd8c0dc9489a810e206b3fcf6 (diff)
vxlan: Fix L3 mode
Type: fix Partially revert fix SEGV reported in VPP-1962 [commit a4b0541f64eef02fa0d003d8f831cfdeb45d3668] This adds an is_l3 option to choose between L2 & L3 mode add tunnel creation time Change-Id: Ia2c91a1099074b7d23fc031b78ed0f68628eeabe Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/vxlan/test/vpp_vxlan_tunnel.py')
-rw-r--r--src/vnet/vxlan/test/vpp_vxlan_tunnel.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/vxlan/test/vpp_vxlan_tunnel.py b/src/vnet/vxlan/test/vpp_vxlan_tunnel.py
index dce5ab86c07..d7e087da6f8 100644
--- a/src/vnet/vxlan/test/vpp_vxlan_tunnel.py
+++ b/src/vnet/vxlan/test/vpp_vxlan_tunnel.py
@@ -38,7 +38,7 @@ class VppVxlanTunnel(VppInterface):
mcast_itf=None,
mcast_sw_if_index=INDEX_INVALID,
decap_next_index=INDEX_INVALID,
- encap_vrf_id=None, instance=0xffffffff):
+ encap_vrf_id=None, instance=0xffffffff, is_l3=False):
""" Create VXLAN Tunnel interface """
super(VppVxlanTunnel, self).__init__(test)
self.src = src
@@ -51,16 +51,17 @@ class VppVxlanTunnel(VppInterface):
self.encap_vrf_id = encap_vrf_id
self.decap_next_index = decap_next_index
self.instance = instance
+ self.is_l3 = is_l3
if (self.mcast_itf):
self.mcast_sw_if_index = self.mcast_itf.sw_if_index
def add_vpp_config(self):
- reply = self.test.vapi.vxlan_add_del_tunnel_v2(
+ reply = self.test.vapi.vxlan_add_del_tunnel_v3(
is_add=1, src_address=self.src, dst_address=self.dst, vni=self.vni,
src_port=self.src_port, dst_port=self.dst_port,
mcast_sw_if_index=self.mcast_sw_if_index,
- encap_vrf_id=self.encap_vrf_id,
+ encap_vrf_id=self.encap_vrf_id, is_l3=self.is_l3,
instance=self.instance, decap_next_index=self.decap_next_index)
self.set_sw_if_index(reply.sw_if_index)
self._test.registry.register(self, self._test.logger)