Linux Kernel
3.7.1
|
Data Fields | |
u8 | cnt_ptr |
u8 | link_down |
u8 | state |
u8 | mib_start |
u64 | counter [TOTAL_PORT_COUNTER_NUM] |
u32 | dropped [2] |
struct ksz_port_mib - Port MIB data structure : Current pointer to MIB counter index. : Indication the link has just gone down. : Connection status of the port. : The starting counter index. Some ports do not start at 0. : 64-bit MIB counter value. : Temporary buffer to remember last read packet dropped values.
MIB counters needs to be read periodically so that counters do not get overflowed and give incorrect values. A right balance is needed to satisfy this condition and not waste too much CPU time.
It is pointless to read MIB counters when the port is disconnected. The provides the connection status so that MIB counters are read only when the port is connected. The indicates the port is just disconnected so that all MIB counters are read one last time to update the information.
u64 counter[TOTAL_PORT_COUNTER_NUM] |