mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Mechanically convert to if_inc_counter().
This commit is contained in:
parent
e09fdb0282
commit
b1ed3d645b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=271813
@ -856,7 +856,7 @@ pcn_rxeof(sc)
|
||||
* comes up in the ring.
|
||||
*/
|
||||
if (cur_rx->pcn_rxstat & PCN_RXSTAT_ERR) {
|
||||
ifp->if_ierrors++;
|
||||
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
|
||||
pcn_newbuf(sc, i, m);
|
||||
PCN_INC(i, PCN_RX_LIST_CNT);
|
||||
continue;
|
||||
@ -865,7 +865,7 @@ pcn_rxeof(sc)
|
||||
if (pcn_newbuf(sc, i, NULL)) {
|
||||
/* Ran out of mbufs; recycle this one. */
|
||||
pcn_newbuf(sc, i, m);
|
||||
ifp->if_ierrors++;
|
||||
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
|
||||
PCN_INC(i, PCN_RX_LIST_CNT);
|
||||
continue;
|
||||
}
|
||||
@ -873,7 +873,7 @@ pcn_rxeof(sc)
|
||||
PCN_INC(i, PCN_RX_LIST_CNT);
|
||||
|
||||
/* No errors; receive the packet. */
|
||||
ifp->if_ipackets++;
|
||||
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
|
||||
m->m_len = m->m_pkthdr.len =
|
||||
cur_rx->pcn_rxlen - ETHER_CRC_LEN;
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
@ -921,17 +921,17 @@ pcn_txeof(sc)
|
||||
}
|
||||
|
||||
if (cur_tx->pcn_txctl & PCN_TXCTL_ERR) {
|
||||
ifp->if_oerrors++;
|
||||
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
|
||||
if (cur_tx->pcn_txstat & PCN_TXSTAT_EXDEF)
|
||||
ifp->if_collisions++;
|
||||
if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
|
||||
if (cur_tx->pcn_txstat & PCN_TXSTAT_RTRY)
|
||||
ifp->if_collisions++;
|
||||
if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
|
||||
}
|
||||
|
||||
ifp->if_collisions +=
|
||||
cur_tx->pcn_txstat & PCN_TXSTAT_TRC;
|
||||
if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
|
||||
cur_tx->pcn_txstat & PCN_TXSTAT_TRC);
|
||||
|
||||
ifp->if_opackets++;
|
||||
if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
|
||||
if (sc->pcn_cdata.pcn_tx_chain[idx] != NULL) {
|
||||
m_freem(sc->pcn_cdata.pcn_tx_chain[idx]);
|
||||
sc->pcn_cdata.pcn_tx_chain[idx] = NULL;
|
||||
@ -1436,7 +1436,7 @@ pcn_watchdog(struct pcn_softc *sc)
|
||||
PCN_LOCK_ASSERT(sc);
|
||||
ifp = sc->pcn_ifp;
|
||||
|
||||
ifp->if_oerrors++;
|
||||
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
|
||||
if_printf(ifp, "watchdog timeout\n");
|
||||
|
||||
pcn_stop(sc);
|
||||
|
Loading…
Reference in New Issue
Block a user