Fixed building of P4_14 test programs
Also checked in p4c compilation result (BMv2 JSON and p4info)
Change-Id: If1d2426e6ff275c01f63b3e300acd2b48197aa99
diff --git a/tools/test/p4src/p4-14/ecmp.p4 b/tools/test/p4src/p4-14/ecmp.p4
index 95af85f..f751049 100644
--- a/tools/test/p4src/p4-14/ecmp.p4
+++ b/tools/test/p4src/p4-14/ecmp.p4
@@ -8,6 +8,7 @@
fields {
groupId : 16;
selector : 16;
+ groupSize : 32; // Not used. Workaround to avoid p4c complaining about inferring type to groupSize.
}
}
@@ -27,12 +28,13 @@
input {
ecmp_hash_fields;
}
- algorithm : bmv2_hash;
- output_width : 64;
+ algorithm : crc32;
+ output_width : 32;
}
action ecmp_group(groupId, groupSize) {
modify_field(ecmp_metadata.groupId, groupId);
+ modify_field(ecmp_metadata.groupSize, groupSize);
modify_field_with_hash_based_offset(ecmp_metadata.selector, 0, ecmp_hash, groupSize);
}
@@ -47,7 +49,7 @@
set_egress_port;
ecmp_group;
send_to_cpu;
- _drop;
+ drop;
}
support_timeout: true;
}