Drop packets on table miss in default.p4
Also fixed compiler warnings.
Change-Id: Ibbc6eee9bbd55f55e46fd5268a2dc206f04f14ea
diff --git a/tools/test/p4src/p4-16/default.p4 b/tools/test/p4src/p4-16/default.p4
index 302d068..b977d91 100644
--- a/tools/test/p4src/p4-16/default.p4
+++ b/tools/test/p4src/p4-16/default.p4
@@ -34,7 +34,7 @@
direct_counter(CounterType.packets) table0_counter;
direct_counter(CounterType.packets) ecmp_counter;
- action do_ecmp(inout metadata_t meta, ecmp_group_id_t ecmp_group_id) {
+ action do_ecmp(ecmp_group_id_t ecmp_group_id) {
meta.ecmp_group_id = ecmp_group_id;
}
@@ -53,16 +53,16 @@
actions = {
set_egress_port(standard_metadata);
send_to_cpu(standard_metadata);
- do_ecmp(meta);
+ do_ecmp();
drop(standard_metadata);
}
counters = table0_counter;
+ default_action = drop(standard_metadata);
}
action_selector(HashAlgorithm.crc16, 32w64, 32w16) ecmp_selector;
table ecmp {
support_timeout = false;
-
key = {
meta.ecmp_group_id : exact;
// Not for matching.