From e2efa70e1c9672dd5296682a4551ee6983b48b9d Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 19 Sep 2014 09:20:34 +0000 Subject: [PATCH] Mechanically convert to if_inc_counter(). --- sys/powerpc/ps3/if_glc.c | 10 +++++----- sys/powerpc/pseries/phyp_llan.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/powerpc/ps3/if_glc.c b/sys/powerpc/ps3/if_glc.c index 3b34f1832e4c..a22429744158 100644 --- a/sys/powerpc/ps3/if_glc.c +++ b/sys/powerpc/ps3/if_glc.c @@ -731,7 +731,7 @@ glc_rxintr(struct glc_softc *sc) restart_rxdma = 1; if (sc->sc_rxdmadesc[i].rxerror & GELIC_RXERRORS) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto requeue; } @@ -747,11 +747,11 @@ glc_rxintr(struct glc_softc *sc) } if (glc_add_rxbuf(sc, i)) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto requeue; } - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); m->m_pkthdr.rcvif = ifp; m->m_len = sc->sc_rxdmadesc[i].valid_size; m->m_pkthdr.len = m->m_len; @@ -810,7 +810,7 @@ glc_txintr(struct glc_softc *sc) != 0) { lv1_net_stop_tx_dma(sc->sc_bus, sc->sc_dev, 0); kickstart = 1; - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } if (sc->sc_txdmadesc[txs->txs_lastdesc].cmd_stat & @@ -818,7 +818,7 @@ glc_txintr(struct glc_softc *sc) kickstart = 1; STAILQ_INSERT_TAIL(&sc->sc_txfreeq, txs, txs_q); - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); progress = 1; } diff --git a/sys/powerpc/pseries/phyp_llan.c b/sys/powerpc/pseries/phyp_llan.c index 51f2bb14fd3d..0b25f398fb83 100644 --- a/sys/powerpc/pseries/phyp_llan.c +++ b/sys/powerpc/pseries/phyp_llan.c @@ -345,13 +345,13 @@ llan_intr(void *xsc) /* llan_add_rxbuf does DMA sync and unload as well as requeue */ if (llan_add_rxbuf(sc, rx) != 0) { - sc->ifp->if_ierrors++; + if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); phyp_hcall(H_ADD_LOGICAL_LAN_BUFFER, sc->unit, rx->rx_bufdesc); continue; } - sc->ifp->if_ipackets++; + if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); m_adj(m, sc->rx_buf[sc->rx_dma_slot].offset); m->m_len = sc->rx_buf[sc->rx_dma_slot].length; m->m_pkthdr.rcvif = sc->ifp;