ONOS-7058 Refactored default pipeconfs in new pipelines directory
- Minimal refactoring of P4 programs
- Removed symlinks to BMv2 JSON/P4Info
- Bumped p4c commit (which fixes known parser bug)
- Renamed "default" pipeconf to "basic" (ONOS-6818)
Change-Id: I319f8b142ab22dba9b15457e28cd62d17f78a423
diff --git a/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslator.java b/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslator.java
index c0fd846..0a4ffbb 100644
--- a/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslator.java
+++ b/core/net/src/main/java/org/onosproject/net/pi/impl/PiFlowRuleTranslator.java
@@ -286,6 +286,15 @@
fieldModel.field().type().name(),
fieldModel.field().header().index());
+ // FIXME: workaround until ONOS-7066 is resolved
+ if (fieldId.id().startsWith("scalars")) {
+ String newFieldId = fieldId.id()
+ .replace("scalars.", "")
+ .replace("_t.", ".");
+ String[] piecies = newFieldId.split("\\.");
+ fieldId = PiHeaderFieldId.of(piecies[0], piecies[1]);
+ }
+
int bitWidth = fieldModel.field().type().bitWidth();
int fieldByteWidth = (int) Math.ceil((double) bitWidth / 8);