NoAction in ACL should be mapped to NOP
Change-Id: Ia3c9038eb726379ed2f95635c28ddf5794e646de
diff --git a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java
index 23580f4..d3137e5 100644
--- a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java
+++ b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricConstants.java
@@ -197,8 +197,8 @@
PiActionId.of("FabricEgress.process_int_transit.int_set_header_0003_i15");
public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0407_I2 =
PiActionId.of("FabricEgress.process_int_transit.int_set_header_0407_i2");
- public static final PiActionId FABRIC_EGRESS_PROCESS_INT_OUTER_ENCAP_INT_UPDATE_IPV4 =
- PiActionId.of("FabricEgress.process_int_outer_encap.int_update_ipv4");
+ public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0003_I5 =
+ PiActionId.of("FabricEgress.process_int_transit.int_set_header_0003_i5");
public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0003_I4 =
PiActionId.of("FabricEgress.process_int_transit.int_set_header_0003_i4");
public static final PiActionId FABRIC_EGRESS_PROCESS_INT_SINK_INT_SINK =
@@ -285,6 +285,8 @@
PiActionId.of("FabricIngress.next.output_simple");
public static final PiActionId FABRIC_INGRESS_FILTERING_DROP =
PiActionId.of("FabricIngress.filtering.drop");
+ public static final PiActionId FABRIC_EGRESS_PROCESS_INT_OUTER_ENCAP_INT_UPDATE_IPV4 =
+ PiActionId.of("FabricEgress.process_int_outer_encap.int_update_ipv4");
public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0003_I8 =
PiActionId.of("FabricEgress.process_int_transit.int_set_header_0003_i8");
public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0003_I9 =
@@ -314,8 +316,8 @@
PiActionId.of("FabricIngress.forwarding.set_next_id_multicast_v4");
public static final PiActionId FABRIC_INGRESS_NEXT_MPLS_ROUTING_V4_SIMPLE =
PiActionId.of("FabricIngress.next.mpls_routing_v4_simple");
- public static final PiActionId FABRIC_EGRESS_PROCESS_INT_TRANSIT_INT_SET_HEADER_0003_I5 =
- PiActionId.of("FabricEgress.process_int_transit.int_set_header_0003_i5");
+ public static final PiActionId FABRIC_INGRESS_FORWARDING_NOP_ACL =
+ PiActionId.of("FabricIngress.forwarding.nop_acl");
public static final PiActionId FABRIC_INGRESS_NEXT_L3_ROUTING_VLAN =
PiActionId.of("FabricIngress.next.l3_routing_vlan");
public static final PiActionId FABRIC_INGRESS_FORWARDING_SET_NEXT_ID_ACL =
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 79b3f48..ca00687 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
@@ -52,9 +52,9 @@
private static final Logger log = getLogger(FabricTreatmentInterpreter.class);
private static final String INVALID_TREATMENT = "Invalid treatment for %s block [%s]";
private static final String INVALID_TREATMENT_WITH_EXP = "Invalid treatment for %s block: %s [%s]";
- private static final PiAction NOP = PiAction.builder()
- .withId(FabricConstants.NOP)
- .build();
+ private static final PiAction NOP = PiAction.builder().withId(FabricConstants.NOP).build();
+ private static final PiAction NOP_ACL = PiAction.builder()
+ .withId(FabricConstants.FABRIC_INGRESS_FORWARDING_NOP_ACL).build();
private static final PiAction POP_VLAN = PiAction.builder()
.withId(FabricConstants.FABRIC_EGRESS_EGRESS_NEXT_POP_VLAN)
@@ -141,7 +141,11 @@
throws PiInterpreterException {
// Empty treatment, generate table entry with no action
if (treatment.equals(DefaultTrafficTreatment.emptyTreatment())) {
- return null;
+ if (tableId.equals(FabricConstants.FABRIC_INGRESS_FORWARDING_ACL)) {
+ return NOP_ACL;
+ } else {
+ return NOP;
+ }
}
PortNumber outPort = getOutputPort(treatment);
if (outPort == null