X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=vpnservice.git;a=blobdiff_plain;f=interfacemgr%2Finterfacemgr-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fvpnservice%2Finterfacemgr%2Fcommons%2FInterfaceManagerCommonUtils.java;h=7cc125d3b4a93e4f2f3fc7a0b27543b65e9e30d0;hp=0d134849438229e3bbe07d1bf28195b03b8d51af;hb=1b5c1e301efd0dba9da38375c614d18df011eeff;hpb=ba45d7db37822f2566c2f4969dd59f66e0349268 diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceManagerCommonUtils.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceManagerCommonUtils.java index 0d134849..7cc125d3 100644 --- a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceManagerCommonUtils.java +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/InterfaceManagerCommonUtils.java @@ -87,16 +87,21 @@ public class InterfaceManagerCommonUtils { return ifStateOptional.get(); } public static void makeTunnelIngressFlow(List> futures, IMdsalApiManager mdsalApiManager, - IfTunnel tunnel, BigInteger dpnId, long portNo, Interface iface, int addOrRemoveFlow) { + IfTunnel tunnel, BigInteger dpnId, long portNo, Interface iface, int ifIndex, int addOrRemoveFlow) { String flowRef = InterfaceManagerCommonUtils.getTunnelInterfaceFlowRef(dpnId, NwConstants.VLAN_INTERFACE_INGRESS_TABLE, iface.getName()); List matches = new ArrayList(); List mkInstructions = new ArrayList(); if (NwConstants.ADD_FLOW == addOrRemoveFlow) { matches.add(new MatchInfo(MatchFieldType.in_port, new BigInteger[] { dpnId, BigInteger.valueOf(portNo) })); + mkInstructions.add(new InstructionInfo( + InstructionType.write_metadata, new BigInteger[] { + MetaDataUtil.getLportTagMetaData(ifIndex), + MetaDataUtil.METADATA_MASK_LPORT_TAG})); short tableId = tunnel.getTunnelInterfaceType().isAssignableFrom(TunnelTypeMplsOverGre.class) ? NwConstants.L3_LFIB_TABLE : tunnel.isInternal() ? NwConstants.INTERNAL_TUNNEL_TABLE : NwConstants.EXTERNAL_TUNNEL_TABLE; - mkInstructions.add(new InstructionInfo(InstructionType.goto_table, new long[] {tableId}));} + mkInstructions.add(new InstructionInfo(InstructionType.goto_table, new long[] {tableId})); + } BigInteger COOKIE_VM_INGRESS_TABLE = new BigInteger("8000001", 16); FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpnId, NwConstants.VLAN_INTERFACE_INGRESS_TABLE, flowRef,