IXP1200 Network Processor Family ATM
4.8.2.3Global Counter Enable and Flags
Global Counter Enable and Flags
COUNTERS_ENABLE_MASK is the global counter enable and is set via a #define statement in system_config.h:
#define Statement | Description |
|
|
COUNTERS_ENABLE_MASK 0xFFFFFFFF | Enable all counters (default). |
|
|
COUNTERS_ENABLE_MASK 0 | Disable all counters. |
|
|
To enable a counter for a command:
1.Ensure that the COUNTERS_ENABLE_MASK is set to enable.
2.Set the individual command’s IN_ENABLE_FLAGS parameter to match the COUNTERS_ENABLE_MASK definition.
Counter Flags
The counters are enabled by membership in the “counter groups” enumerated in the table; the counter groups are enabled by having their corresponding bit set in the
COUNTERS_ENABLE_MASK.
The default COUNTERS_ENABLE_MASK enables all the error counters and disables all the normal counters in an effort to record abnormal events without a measurable performance impact.
For example, the following definition enables just the cell and packet drop related counters.
#define COUNTERS_ENABLE_MASK (COUNT_CELL_DROP COUNT_PACKET_DROP)
For the benefit of counters_print(), system_config.h also defines a string for each counter. For example:
#define COUNTER_STRING2 "ATM_RX_CELL_DROP_VC_CLOSED"
While this could be any string, in the interest of brevity, generally just the name of the associated counter handle is used.
The counters are partitioned into 10 groups - each group with a unique flag:
Counter | Group | Description |
|
|
|
COUNT_CELL | (1 << 1) | normal |
|
|
|
COUNT_CELL_DROP | (1 << 2) | dropped cells |
|
|
|
COUNT_PACKET | (1 << 3) | normal |
|
|
|
COUNT_PACKET_DROP | (1 << 4) | dropped packets |
|
|
|
COUNT_BUFFER | (1 << 5) | normal buffer (push/pop) activity |
|
|
|
COUNT_BUFFER_FAIL | (1 << 6) | buffer subsystem failures |
|
|
|
COUNT_QUEUE | (1 << 7) | normal enqueue/dequeue events |
|
|
|
48 | Application Note |
Modified on: 3/20/02,