Module Name: src Committed By: msaitoh Date: Wed Oct 30 07:26:28 UTC 2019
Modified Files: src/sys/dev/ic: aic6915.c elinkxl.c i82557.c src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_ste.c if_stge.c if_tl.c if_txp.c if_vte.c Log Message: if_percpuq(9) automatically increments if_ipackets, so don't add number of RX frames from device's statistics counter to if_ipackets to avoid double count. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/aic6915.c cvs rdiff -u -r1.132 -r1.133 src/sys/dev/ic/elinkxl.c cvs rdiff -u -r1.155 -r1.156 src/sys/dev/ic/i82557.c cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/if_alc.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/if_ale.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/if_ste.c cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_stge.c cvs rdiff -u -r1.116 -r1.117 src/sys/dev/pci/if_tl.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/if_txp.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/if_vte.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/aic6915.c diff -u src/sys/dev/ic/aic6915.c:1.39 src/sys/dev/ic/aic6915.c:1.40 --- src/sys/dev/ic/aic6915.c:1.39 Tue May 28 07:41:48 2019 +++ src/sys/dev/ic/aic6915.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aic6915.c,v 1.39 2019/05/28 07:41:48 msaitoh Exp $ */ +/* $NetBSD: aic6915.c,v 1.40 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.39 2019/05/28 07:41:48 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.40 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> @@ -855,8 +855,6 @@ sf_stats_update(struct sf_softc *sc) stats.TransmitAbortDueToExcessingDeferral + stats.FramesLostDueToInternalTransmitErrors; - ifp->if_ipackets += stats.ReceiveOKFrames; - ifp->if_ierrors += stats.ReceiveCRCErrors + stats.AlignmentErrors + stats.ReceiveFramesTooLong + stats.ReceiveFramesTooShort + stats.ReceiveFramesJabbersError + Index: src/sys/dev/ic/elinkxl.c diff -u src/sys/dev/ic/elinkxl.c:1.132 src/sys/dev/ic/elinkxl.c:1.133 --- src/sys/dev/ic/elinkxl.c:1.132 Fri Sep 13 07:55:06 2019 +++ src/sys/dev/ic/elinkxl.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxl.c,v 1.132 2019/09/13 07:55:06 msaitoh Exp $ */ +/* $NetBSD: elinkxl.c,v 1.133 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.132 2019/09/13 07:55:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.133 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1487,8 +1487,6 @@ ex_getstats(struct ex_softc *sc) GO_WINDOW(6); upperok = bus_space_read_1(iot, ioh, UPPER_FRAMES_OK); - ifp->if_ipackets += bus_space_read_1(iot, ioh, RX_FRAMES_OK); - ifp->if_ipackets += (upperok & 0x03) << 8; ifp->if_opackets += bus_space_read_1(iot, ioh, TX_FRAMES_OK); ifp->if_opackets += (upperok & 0x30) << 4; ifp->if_ierrors += bus_space_read_1(iot, ioh, RX_OVERRUNS); Index: src/sys/dev/ic/i82557.c diff -u src/sys/dev/ic/i82557.c:1.155 src/sys/dev/ic/i82557.c:1.156 --- src/sys/dev/ic/i82557.c:1.155 Fri Sep 20 09:00:50 2019 +++ src/sys/dev/ic/i82557.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.155 2019/09/20 09:00:50 maxv Exp $ */ +/* $NetBSD: i82557.c,v 1.156 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.155 2019/09/20 09:00:50 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.156 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1479,7 +1479,6 @@ fxp_tick(void *arg) ifp->if_opackets += le32toh(sp->tx_good); ifp->if_collisions += le32toh(sp->tx_total_collisions); if (sp->rx_good) { - ifp->if_ipackets += le32toh(sp->rx_good); sc->sc_rxidle = 0; } else if (sc->sc_flags & FXPF_RECV_WORKAROUND) { sc->sc_rxidle++; Index: src/sys/dev/pci/if_age.c diff -u src/sys/dev/pci/if_age.c:1.61 src/sys/dev/pci/if_age.c:1.62 --- src/sys/dev/pci/if_age.c:1.61 Fri Sep 20 08:58:25 2019 +++ src/sys/dev/pci/if_age.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_age.c,v 1.61 2019/09/20 08:58:25 maxv Exp $ */ +/* $NetBSD: if_age.c,v 1.62 2019/10/30 07:26:28 msaitoh Exp $ */ /* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */ /*- @@ -31,7 +31,7 @@ /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.61 2019/09/20 08:58:25 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.62 2019/10/30 07:26:28 msaitoh Exp $"); #include "vlan.h" @@ -2043,8 +2043,6 @@ age_stats_update(struct age_softc *sc) smb->tx_late_colls + smb->tx_underrun + smb->tx_pkts_truncated; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_desc_oflows + Index: src/sys/dev/pci/if_alc.c diff -u src/sys/dev/pci/if_alc.c:1.42 src/sys/dev/pci/if_alc.c:1.43 --- src/sys/dev/pci/if_alc.c:1.42 Thu Oct 17 09:13:48 2019 +++ src/sys/dev/pci/if_alc.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_alc.c,v 1.42 2019/10/17 09:13:48 msaitoh Exp $ */ +/* $NetBSD: if_alc.c,v 1.43 2019/10/30 07:26:28 msaitoh Exp $ */ /* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon <yong...@freebsd.org> @@ -2276,8 +2276,6 @@ alc_stats_update(struct alc_softc *sc) ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + smb->tx_underrun + smb->tx_pkts_truncated; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_rrs_errs + Index: src/sys/dev/pci/if_ale.c diff -u src/sys/dev/pci/if_ale.c:1.33 src/sys/dev/pci/if_ale.c:1.34 --- src/sys/dev/pci/if_ale.c:1.33 Tue Jul 9 08:46:59 2019 +++ src/sys/dev/pci/if_ale.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ale.c,v 1.33 2019/07/09 08:46:59 msaitoh Exp $ */ +/* $NetBSD: if_ale.c,v 1.34 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yong...@freebsd.org> @@ -32,7 +32,7 @@ /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.33 2019/07/09 08:46:59 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.34 2019/10/30 07:26:28 msaitoh Exp $"); #include "vlan.h" @@ -1273,8 +1273,6 @@ ale_stats_update(struct ale_softc *sc) ifp->if_oerrors += smb->tx_abort + smb->tx_late_colls + smb->tx_underrun; - ifp->if_ipackets += smb->rx_frames; - ifp->if_ierrors += smb->rx_crcerrs + smb->rx_lenerrs + smb->rx_runts + smb->rx_pkts_truncated + smb->rx_fifo_oflows + smb->rx_rrs_errs + Index: src/sys/dev/pci/if_ste.c diff -u src/sys/dev/pci/if_ste.c:1.56 src/sys/dev/pci/if_ste.c:1.57 --- src/sys/dev/pci/if_ste.c:1.56 Tue May 28 07:41:49 2019 +++ src/sys/dev/pci/if_ste.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ste.c,v 1.56 2019/05/28 07:41:49 msaitoh Exp $ */ +/* $NetBSD: if_ste.c,v 1.57 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.56 2019/05/28 07:41:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.57 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> @@ -1099,8 +1099,8 @@ ste_stats_update(struct ste_softc *sc) ifp->if_opackets += (u_int) bus_space_read_2(st, sh, STE_FramesTransmittedOK); - ifp->if_ipackets += - (u_int) bus_space_read_2(st, sh, STE_FramesReceivedOK); + + (u_int) bus_space_read_2(st, sh, STE_FramesReceivedOK); ifp->if_collisions += (u_int) bus_space_read_1(st, sh, STE_LateCollisions) + Index: src/sys/dev/pci/if_stge.c diff -u src/sys/dev/pci/if_stge.c:1.71 src/sys/dev/pci/if_stge.c:1.72 --- src/sys/dev/pci/if_stge.c:1.71 Mon Oct 7 11:53:40 2019 +++ src/sys/dev/pci/if_stge.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_stge.c,v 1.71 2019/10/07 11:53:40 msaitoh Exp $ */ +/* $NetBSD: if_stge.c,v 1.72 2019/10/30 07:26:28 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.71 2019/10/07 11:53:40 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.72 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> @@ -1295,8 +1295,7 @@ stge_stats_update(struct stge_softc *sc) (void) bus_space_read_4(st, sh, STGE_OctetRcvOk); - ifp->if_ipackets += - bus_space_read_4(st, sh, STGE_FramesRcvdOk); + (void) bus_space_read_4(st, sh, STGE_FramesRcvdOk); ifp->if_ierrors += (u_int) bus_space_read_2(st, sh, STGE_FramesLostRxErrors); Index: src/sys/dev/pci/if_tl.c diff -u src/sys/dev/pci/if_tl.c:1.116 src/sys/dev/pci/if_tl.c:1.117 --- src/sys/dev/pci/if_tl.c:1.116 Tue May 28 07:41:49 2019 +++ src/sys/dev/pci/if_tl.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tl.c,v 1.116 2019/05/28 07:41:49 msaitoh Exp $ */ +/* $NetBSD: if_tl.c,v 1.117 2019/10/30 07:26:28 msaitoh Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.116 2019/05/28 07:41:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.117 2019/10/30 07:26:28 msaitoh Exp $"); #undef TLDEBUG #define TL_PRIV_STATS @@ -1527,7 +1527,6 @@ tl_read_stats(tl_softc_t *sc) oerr_underr = reg >> 24; reg = tl_intreg_read(sc, TL_INT_STATS_RX); - ifp->if_ipackets += reg & 0x00ffffff; ierr_overr = reg >> 24; reg = tl_intreg_read(sc, TL_INT_STATS_FERR); Index: src/sys/dev/pci/if_txp.c diff -u src/sys/dev/pci/if_txp.c:1.59 src/sys/dev/pci/if_txp.c:1.60 --- src/sys/dev/pci/if_txp.c:1.59 Tue Jul 9 08:46:59 2019 +++ src/sys/dev/pci/if_txp.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_txp.c,v 1.59 2019/07/09 08:46:59 msaitoh Exp $ */ +/* $NetBSD: if_txp.c,v 1.60 2019/10/30 07:26:28 msaitoh Exp $ */ /* * Copyright (c) 2001 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.59 2019/07/09 08:46:59 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.60 2019/10/30 07:26:28 msaitoh Exp $"); #include "opt_inet.h" @@ -1373,7 +1373,6 @@ txp_tick(void *vsc) ifp->if_collisions += ext[0].ext_2 + ext[0].ext_3 + ext[1].ext_2 + ext[1].ext_3; ifp->if_opackets += rsp->rsp_par2; - ifp->if_ipackets += ext[2].ext_3; out: if (rsp != NULL) Index: src/sys/dev/pci/if_vte.c diff -u src/sys/dev/pci/if_vte.c:1.26 src/sys/dev/pci/if_vte.c:1.27 --- src/sys/dev/pci/if_vte.c:1.26 Tue May 28 07:41:49 2019 +++ src/sys/dev/pci/if_vte.c Wed Oct 30 07:26:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vte.c,v 1.26 2019/05/28 07:41:49 msaitoh Exp $ */ +/* $NetBSD: if_vte.c,v 1.27 2019/10/30 07:26:28 msaitoh Exp $ */ /* * Copyright (c) 2011 Manuel Bouyer. All rights reserved. @@ -55,7 +55,7 @@ /* Driver for DM&P Electronics, Inc, Vortex86 RDC R6040 FastEthernet. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.26 2019/05/28 07:41:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.27 2019/10/30 07:26:28 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -946,7 +946,6 @@ vte_stats_update(struct vte_softc *sc) /* Update ifp counters. */ ifp->if_opackets = stat->tx_frames; ifp->if_oerrors = stat->tx_late_colls + stat->tx_underruns; - ifp->if_ipackets = stat->rx_frames; ifp->if_ierrors = stat->rx_crcerrs + stat->rx_runts + stat->rx_long_frames + stat->rx_fifo_full; }