Make if_ierrors updated whenever any of the following counters are
updated. o Number of times NIC ran out of RX buffer descriptors o Number of inbound packet errors o Number of inbound packets that were chosen to be discarded Previously only the discarded packet counter was used to update if_ierrors. This change fixes wrong if_ierrors counter on BCM570[0-4] controllers. For BCM5705 and later controllers bge(4) already correctly counted it. Reported by: Eugene Grosbein <egrosbein <> rdtc dot ru>
This commit is contained in:
parent
ea9c3a30f3
commit
37ee7cc719
@ -4489,6 +4489,12 @@ bge_stats_update(struct bge_softc *sc)
|
||||
ifp->if_collisions += (uint32_t)(cnt - sc->bge_tx_collisions);
|
||||
sc->bge_tx_collisions = cnt;
|
||||
|
||||
cnt = READ_STAT(sc, stats, nicNoMoreRxBDs.bge_addr_lo);
|
||||
ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_nobds);
|
||||
sc->bge_rx_nobds = cnt;
|
||||
cnt = READ_STAT(sc, stats, ifInErrors.bge_addr_lo);
|
||||
ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_inerrs);
|
||||
sc->bge_rx_inerrs = cnt;
|
||||
cnt = READ_STAT(sc, stats, ifInDiscards.bge_addr_lo);
|
||||
ifp->if_ierrors += (uint32_t)(cnt - sc->bge_rx_discards);
|
||||
sc->bge_rx_discards = cnt;
|
||||
|
@ -2861,6 +2861,8 @@ struct bge_softc {
|
||||
int bge_csum_features;
|
||||
struct callout bge_stat_ch;
|
||||
uint32_t bge_rx_discards;
|
||||
uint32_t bge_rx_inerrs;
|
||||
uint32_t bge_rx_nobds;
|
||||
uint32_t bge_tx_discards;
|
||||
uint32_t bge_tx_collisions;
|
||||
#ifdef DEVICE_POLLING
|
||||
|
Loading…
x
Reference in New Issue
Block a user