Refactor fabric.p4 INT support to allow compilation on more P4 targets
Also use constant entries for instruction mask tables to avoid
programming them at runtime.
Change-Id: Ia1ab1ecd42a433daec171f9a30bcdba3b8484061
diff --git a/pipelines/fabric/src/main/resources/include/control/packetio.p4 b/pipelines/fabric/src/main/resources/include/control/packetio.p4
index 1086dac..a77d82a 100644
--- a/pipelines/fabric/src/main/resources/include/control/packetio.p4
+++ b/pipelines/fabric/src/main/resources/include/control/packetio.p4
@@ -26,6 +26,7 @@
standard_metadata.egress_spec = hdr.packet_out.egress_port;
hdr.packet_out.setInvalid();
fabric_metadata.is_controller_packet_out = _TRUE;
+ // No need for ingress processing, straight to egress.
exit;
}
}
@@ -41,7 +42,7 @@
}
apply {
if (fabric_metadata.is_controller_packet_out == _TRUE) {
- // No need to process through the rest of the pipeline.
+ // Transmit right away.
exit;
}
if (standard_metadata.egress_port == CPU_PORT) {