Egress statistics

Egress statistics are supported for the three RIB-API tunnel tables (IPv4, IPv6, and MPLS). The counters are attached to the NHLFE of each next hop. Counters are effectively allocated by the system at the time that the instance is programmed in the data-path. Counters are maintained even if an instance is deprogrammed and values are not reset. This means that, if an instance is reprogrammed, traffic counting resumes at the point where it last stopped. Traffic counters are released and thus traffic statistics are lost when the instance or entry is removed from the database.

No retry mechanism is available for egress statistics. The system maintains a state per next-hop and per instance identifying whether or not allocation of statistic indices is successful. If the system is not able to allocate all the desired indices on a specified instance due to a lack of resources, then the user should disable egress statistics on that instance. This action frees enough statistic indices and re-enables egress statistics on the desired entry. The selection of which other construct to release statistic indices from is beyond the scope of this document.