diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2019-10-30 07:26:28 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2019-10-30 07:26:28 +0000 |
| commit | 76f139f45971b4d19e7d2d2d8d3db0f0d52f98b6 (patch) | |
| tree | 21b22cec166890ca3f27fe91231039311ad7388f /sys/dev | |
| parent | a45d129bbf4cc24ad1b15b8b522d3463197853f1 (diff) | |
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.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/aic6915.c | 6 | ||||
| -rw-r--r-- | sys/dev/ic/elinkxl.c | 6 | ||||
| -rw-r--r-- | sys/dev/ic/i82557.c | 5 | ||||
| -rw-r--r-- | sys/dev/pci/if_age.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/if_alc.c | 4 | ||||
| -rw-r--r-- | sys/dev/pci/if_ale.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/if_ste.c | 8 | ||||
| -rw-r--r-- | sys/dev/pci/if_stge.c | 7 | ||||
| -rw-r--r-- | sys/dev/pci/if_tl.c | 5 | ||||
| -rw-r--r-- | sys/dev/pci/if_txp.c | 5 | ||||
| -rw-r--r-- | sys/dev/pci/if_vte.c | 5 |
11 files changed, 24 insertions, 39 deletions
diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 4fc0048790a..c35bf21ba9a 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -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 + diff --git a/sys/dev/ic/elinkxl.c b/sys/dev/ic/elinkxl.c index 2137e131b48..271e8944535 100644 --- a/sys/dev/ic/elinkxl.c +++ b/sys/dev/ic/elinkxl.c @@ -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); diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index afb95dd96a6..abfe2fba28c 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -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++; diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index 68c0c4cc0d4..a04c73e7e57 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -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 + diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 7fba1de1b5c..a1ef2f2951b 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -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 <yongari@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 + diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index f279a35a72e..1b25336428c 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -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 <yongari@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 + diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 1f77e425405..8ee1955e67b 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -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) + diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 77f22196aa7..ed045bb9be7 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -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); diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index b7216333864..4db68cdd656 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -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); diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index b7f29bba6f5..56d94695980 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -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) diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index cf97ab701b9..1d08bbfebb9 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -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; } |
