Xconnect support for fabric.p4 pipeliner

Change-Id: I3bd802ccbc34561b71862a160bab67adeccc2891
diff --git a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
index 4248111..bca8424 100644
--- a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
+++ b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
@@ -108,6 +108,8 @@
             return mapNextHashedOrSimpleTreatment(treatment, tableId, false);
         } else if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_SIMPLE) {
             return mapNextHashedOrSimpleTreatment(treatment, tableId, true);
+        } else if (tableId == FabricConstants.FABRIC_INGRESS_NEXT_XCONNECT) {
+            return mapNextXconnect(treatment, tableId);
         }
         throw new PiInterpreterException(format(
                 "Treatment mapping not supported for table '%s'", tableId));
@@ -174,6 +176,18 @@
         }
     }
 
+    private static PiAction mapNextXconnect(
+            TrafficTreatment treatment, PiTableId tableId)
+            throws PiInterpreterException {
+        final PortNumber outPort = ((OutputInstruction) instructionOrFail(
+                treatment, OUTPUT, tableId)).port();
+        return PiAction.builder()
+                .withId(FabricConstants.FABRIC_INGRESS_NEXT_OUTPUT_XCONNECT)
+                .withParameter(new PiActionParam(
+                        FabricConstants.PORT_NUM, outPort.toLong()))
+                .build();
+    }
+
     static PiAction mapAclTreatment(TrafficTreatment treatment, PiTableId tableId)
             throws PiInterpreterException {
         if (isNoAction(treatment)) {