mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Mechanically convert to if_inc_counter().
This commit is contained in:
parent
10b77d668c
commit
b821756ba2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271830
@ -608,7 +608,7 @@ bm_rxintr(void *xsc)
|
||||
m = sc->sc_rxsoft[i].rxs_mbuf;
|
||||
|
||||
if (bm_add_rxbuf(sc, i)) {
|
||||
ifp->if_ierrors++;
|
||||
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
|
||||
m = NULL;
|
||||
continue;
|
||||
}
|
||||
@ -616,7 +616,7 @@ bm_rxintr(void *xsc)
|
||||
if (m == NULL)
|
||||
continue;
|
||||
|
||||
ifp->if_ipackets++;
|
||||
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
m->m_len -= (dbdma_get_residuals(sc->sc_rxdma, i) + 2);
|
||||
m->m_pkthdr.len = m->m_len;
|
||||
@ -678,7 +678,7 @@ bm_txintr(void *xsc)
|
||||
|
||||
STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q);
|
||||
|
||||
ifp->if_opackets++;
|
||||
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
|
||||
progress = 1;
|
||||
}
|
||||
|
||||
@ -1196,12 +1196,13 @@ bm_tick(void *arg)
|
||||
struct bm_softc *sc = arg;
|
||||
|
||||
/* Read error counters */
|
||||
sc->sc_ifp->if_collisions += CSR_READ_2(sc, BM_TX_NCCNT) +
|
||||
CSR_READ_2(sc, BM_TX_FCCNT) + CSR_READ_2(sc, BM_TX_EXCNT) +
|
||||
CSR_READ_2(sc, BM_TX_LTCNT);
|
||||
if_inc_counter(sc->sc_ifp, IFCOUNTER_COLLISIONS,
|
||||
CSR_READ_2(sc, BM_TX_NCCNT) + CSR_READ_2(sc, BM_TX_FCCNT) +
|
||||
CSR_READ_2(sc, BM_TX_EXCNT) + CSR_READ_2(sc, BM_TX_LTCNT));
|
||||
|
||||
sc->sc_ifp->if_ierrors += CSR_READ_2(sc, BM_RX_LECNT) +
|
||||
CSR_READ_2(sc, BM_RX_AECNT) + CSR_READ_2(sc, BM_RX_FECNT);
|
||||
if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS,
|
||||
CSR_READ_2(sc, BM_RX_LECNT) + CSR_READ_2(sc, BM_RX_AECNT) +
|
||||
CSR_READ_2(sc, BM_RX_FECNT));
|
||||
|
||||
/* Zero collision counters */
|
||||
CSR_WRITE_2(sc, BM_TX_NCCNT, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user