Fix OF pipeline for local nexthop 56/20356/2
authorVishal Thapar <vishal.thapar@ericsson.com>
Thu, 14 May 2015 10:04:49 +0000 (15:34 +0530)
committerVishal Thapar <vishal.thapar@ericsson.com>
Thu, 14 May 2015 10:13:59 +0000 (15:43 +0530)
Change-Id: I949051e5b53cf287307fd4005b1a54bc614e9a78
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
fibmanager/fibmanager-impl/src/main/java/org/opendaylight/vpnservice/fibmanager/FibManager.java
nexthopmgr/nexthopmgr-impl/src/main/java/org/opendaylight/vpnservice/nexthopmgr/NexthopManager.java

index fed6b9b09f104eddebe29847c559e7c09e28d5e8..48e545595a80eaf3666ed0a9faa86f6546d57764 100644 (file)
@@ -70,8 +70,8 @@ public class FibManager extends AbstractDataChangeListener<VrfEntry> implements
   private IMdsalApiManager mdsalManager;
   private IVpnManager vpnmanager;
 
-  private static final short L3_FIB_TABLE = 20;
-  private static final short L3_LFIB_TABLE = 21;
+  private static final short L3_FIB_TABLE = 21;
+  private static final short L3_LFIB_TABLE = 20;
   private static final BigInteger COOKIE_VM_LFIB_TABLE = new BigInteger("8000002", 16);
   private static final BigInteger COOKIE_VM_FIB_TABLE =  new BigInteger("8000003", 16);
   private static final int DEFAULT_FIB_FLOW_PRIORITY = 10;
@@ -295,9 +295,9 @@ public class FibManager extends AbstractDataChangeListener<VrfEntry> implements
     List<ActionInfo> actionsInfos = new ArrayList<ActionInfo>();
 
     if(addOrRemove == NwConstants.ADD_FLOW) {
-      actionsInfos.add(new ActionInfo(ActionType.group, new String[] { String.valueOf(groupId)}));
       actionsInfos.add(new ActionInfo(ActionType.push_mpls, new String[] { null }));
       actionsInfos.add(new ActionInfo(ActionType.set_field_mpls_label, new String[] { Long.toString(vrfEntry.getLabel())}));
+      actionsInfos.add(new ActionInfo(ActionType.group, new String[] { String.valueOf(groupId)}));
       instructions.add(new InstructionInfo(InstructionType.write_actions, actionsInfos));
     }
 
index 5e565720f59df0f706c864c9546ee188d4d9edb5..29d5acd9bd677fcfd791664a264e651b6c385855 100644 (file)
@@ -170,7 +170,7 @@ public class NexthopManager implements L3nexthopService, AutoCloseable {
             // MAC re-write
             if (macAddress != null) {
                listActionInfo.add(0, new ActionInfo(ActionType.set_field_eth_dest, new String[]{macAddress}));
-               listActionInfo.add(new ActionInfo(ActionType.pop_mpls, new String[]{}));
+               listActionInfo.add(0, new ActionInfo(ActionType.pop_mpls, new String[]{}));
             } else {
                 //FIXME: Log message here.
                 LOG.debug("mac address for new local nexthop is null");