Minor refactoring for fabric.p4
Change-Id: I8c5bac678ead88bda42a0b49ea19d7c968bcc305
diff --git a/pipelines/fabric/src/main/resources/include/control/next.p4 b/pipelines/fabric/src/main/resources/include/control/next.p4
index a58e88e..79ac55b 100644
--- a/pipelines/fabric/src/main/resources/include/control/next.p4
+++ b/pipelines/fabric/src/main/resources/include/control/next.p4
@@ -25,6 +25,9 @@
inout fabric_metadata_t fabric_metadata,
inout standard_metadata_t standard_metadata) {
action_selector(HashAlgorithm.crc16, 32w64, 32w16) ecmp_selector;
+ direct_counter(CounterType.packets_and_bytes) simple_counter;
+ direct_counter(CounterType.packets_and_bytes) hashed_counter;
+ direct_counter(CounterType.packets_and_bytes) broadcast_counter;
action output(port_num_t port_num) {
standard_metadata.egress_spec = port_num;
@@ -92,7 +95,9 @@
output;
set_vlan_output;
l3_routing;
+ mpls_routing_v4;
}
+ counters = simple_counter;
}
table hashed {
@@ -112,6 +117,7 @@
}
implementation = ecmp_selector;
+ counters = hashed_counter;
}
/*
@@ -124,6 +130,7 @@
actions = {
set_mcast_group;
}
+ counters = broadcast_counter;
}
apply {