Fix vrf metadata not to override the SH bit 37/43937/1
authorTali <tali.ben-meir@hpe.com>
Mon, 15 Aug 2016 06:59:30 +0000 (09:59 +0300)
committerTali <tali.ben-meir@hpe.com>
Mon, 15 Aug 2016 06:59:30 +0000 (09:59 +0300)
The original fix for this issue was deleted as part of
https://git.opendaylight.org/gerrit/#/c/43306/ (performance improvements)

Change-Id: I23ab430e7f7a7ed289c2619a88261e11259e1fef
Signed-off-by: Tali <tali.ben-meir@hpe.com>
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java

index b6261c9c322e9139539814201ba015b56ea912d7..ef019d8b8425d694689261771681bb4a141e00af 100644 (file)
@@ -524,7 +524,7 @@ public class VpnInterfaceManager extends AbstractDataChangeListener<VpnInterface
                         List<Instruction> instructions = new ArrayList<Instruction>();
 
                         instructions.add(MDSALUtil.buildAndGetWriteMetadaInstruction(
-                                BigInteger.valueOf(vpnId), MetaDataUtil.METADATA_MASK_VRFID, ++instructionKey));
+                                MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID, ++instructionKey));
                         instructions.add(MDSALUtil.buildAndGetGotoTableInstruction(NwConstants.L3_FIB_TABLE, ++instructionKey));
 
                         BoundServices
@@ -1017,7 +1017,7 @@ public class VpnInterfaceManager extends AbstractDataChangeListener<VpnInterface
             LOG.debug("Sending cleanup event for dpn {} in VPN {}", dpnId, vpnName);
             fibManager.cleanUpDpnForVpn(dpnId, vpnId, rd, new DpnEnterExitVpnWorker(dpnId, vpnName, rd, false /* exited */));
         }
-    }  
+    }
 
     void handleVpnsExportingRoutes(String vpnName, String vpnRd) {
         List<VpnInstance> vpnsToExportRoute = getVpnsExportingMyRoute(vpnName);
@@ -1121,11 +1121,11 @@ public class VpnInterfaceManager extends AbstractDataChangeListener<VpnInterface
         }
     }
 
-    protected void processVpnInterfaceDown(BigInteger dpId, 
+    protected void processVpnInterfaceDown(BigInteger dpId,
                                            String interfaceName,
                                            int lPortTag,
                                            boolean isInterfaceStateDown,
-                                           boolean isConfigRemoval, 
+                                           boolean isConfigRemoval,
                                            WriteTransaction writeConfigTxn,
                                            WriteTransaction writeOperTxn,
                                            WriteTransaction writeInvTxn) {