Date: Fri, 19 Sep 2014 09:20:34 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271860 - in head/sys/powerpc: ps3 pseries Message-ID: <201409190920.s8J9KY2X008597@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Sep 19 09:20:34 2014 New Revision: 271860 URL: http://svnweb.freebsd.org/changeset/base/271860 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/powerpc/ps3/if_glc.c head/sys/powerpc/pseries/phyp_llan.c Modified: head/sys/powerpc/ps3/if_glc.c ============================================================================== --- head/sys/powerpc/ps3/if_glc.c Fri Sep 19 09:20:16 2014 (r271859) +++ head/sys/powerpc/ps3/if_glc.c Fri Sep 19 09:20:34 2014 (r271860) @@ -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; } Modified: head/sys/powerpc/pseries/phyp_llan.c ============================================================================== --- head/sys/powerpc/pseries/phyp_llan.c Fri Sep 19 09:20:16 2014 (r271859) +++ head/sys/powerpc/pseries/phyp_llan.c Fri Sep 19 09:20:34 2014 (r271860) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409190920.s8J9KY2X008597>