Small fixes and improvements on fabric.p4
- setting s_tag and c_tag for BNG as early as possible in the pipeline
- ingress_port_vlan was matching on inner_vlan_tag but that field could be not present

Change-Id: Id4d51159a314d45cec370471ed244a51fd74338b
diff --git a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java
index 86b893d..ae97a54 100644
--- a/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java
+++ b/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/pipeliner/FilteringObjectiveTranslator.java
@@ -161,6 +161,12 @@
         final boolean innerVlanValid = innerVlanCriterion != null
                 && !innerVlanCriterion.vlanId().equals(VlanId.NONE);
 
+        if (innerVlanValid && !capabilities.supportDoubleVlanTerm()) {
+            throw new FabricPipelinerException(
+                    "Found 2 VLAN IDs, but the pipeline does not support double VLAN termination",
+                    ObjectiveError.UNSUPPORTED);
+        }
+
         final PiCriterion piCriterion = PiCriterion.builder()
                 .matchExact(FabricConstants.HDR_VLAN_IS_VALID, outerVlanValid ? ONE : ZERO)
                 .build();