Date: Thu, 18 Sep 2014 20:44:54 +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: r271822 - head/sys/dev/pdq Message-ID: <201409182044.s8IKisWR054043@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Sep 18 20:44:53 2014 New Revision: 271822 URL: http://svnweb.freebsd.org/changeset/base/271822 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/pdq/pdq_ifsubr.c Modified: head/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- head/sys/dev/pdq/pdq_ifsubr.c Thu Sep 18 20:43:17 2014 (r271821) +++ head/sys/dev/pdq/pdq_ifsubr.c Thu Sep 18 20:44:53 2014 (r271822) @@ -229,7 +229,7 @@ pdq_os_receive_pdu( struct ifnet *ifp = PDQ_IFNET(sc); struct fddi_header *fh; - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if defined(PDQ_BUS_DMA) { /* @@ -251,8 +251,8 @@ pdq_os_receive_pdu( m->m_pkthdr.len = pktlen; fh = mtod(m, struct fddi_header *); if (drop || (fh->fddi_fc & (FDDIFC_L|FDDIFC_F)) != FDDIFC_LLC_ASYNC) { - ifp->if_iqdrops++; - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); PDQ_OS_DATABUF_FREE(pdq, m); return; } @@ -289,7 +289,7 @@ pdq_os_transmit_done( PDQ_BPF_MTAP(sc, m); #endif PDQ_OS_DATABUF_FREE(pdq, m); - PDQ_IFNET(sc)->if_opackets++; + if_inc_counter(PDQ_IFNET(sc), IFCOUNTER_OPACKETS, 1); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409182044.s8IKisWR054043>