Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Adopt <net/if_stats.h>



details:   https://anonhg.NetBSD.org/src/rev/7fc597b1d313
branches:  trunk
changeset: 744532:7fc597b1d313
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 05 08:33:19 2020 +0000

description:
Adopt <net/if_stats.h>

diffstat:

 sys/arch/acorn32/podulebus/if_ie.c  |  6 +++---
 sys/arch/mac68k/nubus/if_ae_nubus.c |  6 +++---
 sys/dev/marvell/if_gfe.c            |  6 +++---
 sys/dev/marvell/if_mvxpe.c          |  8 ++++----
 sys/dev/qbus/if_dmc.c               |  6 +++---
 5 files changed, 16 insertions(+), 16 deletions(-)

diffs (139 lines):

diff -r d1fc87e1adba -r 7fc597b1d313 sys/arch/acorn32/podulebus/if_ie.c
--- a/sys/arch/acorn32/podulebus/if_ie.c        Wed Feb 05 08:22:23 2020 +0000
+++ b/sys/arch/acorn32/podulebus/if_ie.c        Wed Feb 05 08:33:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.47 2020/02/05 08:22:23 skrll Exp $ */
+/* $NetBSD: if_ie.c,v 1.48 2020/02/05 08:33:19 skrll Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.47 2020/02/05 08:22:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.48 2020/02/05 08:33:19 skrll Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -1545,7 +1545,7 @@
            printf ( "ie: DMA underrun\n" );
        if ( status & IE_XS_EXCMAX )
            printf ( "ie: too many collisions\n" );
-       ifp->if_collisions+=16;
+       if_statadd(ifp, if_collisions, 16);
     }
     /* Done with the buffer */
     sc->xmit_free++;
diff -r d1fc87e1adba -r 7fc597b1d313 sys/arch/mac68k/nubus/if_ae_nubus.c
--- a/sys/arch/mac68k/nubus/if_ae_nubus.c       Wed Feb 05 08:22:23 2020 +0000
+++ b/sys/arch/mac68k/nubus/if_ae_nubus.c       Wed Feb 05 08:33:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ae_nubus.c,v 1.41 2009/01/16 23:43:46 tsutsui Exp $ */
+/*     $NetBSD: if_ae_nubus.c,v 1.42 2020/02/05 08:36:34 skrll Exp $   */
 
 /*
  * Copyright (C) 1997 Scott Reynolds
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ae_nubus.c,v 1.41 2009/01/16 23:43:46 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ae_nubus.c,v 1.42 2020/02/05 08:36:34 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -502,7 +502,7 @@
        (*via2itab[1])((void *)1);
 
        log(LOG_ERR, "%s: device timeout\n", device_xname(sc->sc_dev));
-       ++ifp->if_oerrors;
+       if_statinc(ifp, if_oerrors);
 
        dp8390_reset(sc);
 }
diff -r d1fc87e1adba -r 7fc597b1d313 sys/dev/marvell/if_gfe.c
--- a/sys/dev/marvell/if_gfe.c  Wed Feb 05 08:22:23 2020 +0000
+++ b/sys/dev/marvell/if_gfe.c  Wed Feb 05 08:33:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gfe.c,v 1.55 2020/02/04 07:36:55 skrll Exp $        */
+/*     $NetBSD: if_gfe.c,v 1.56 2020/02/05 08:34:48 skrll Exp $        */
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.55 2020/02/04 07:36:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.56 2020/02/05 08:34:48 skrll Exp $");
 
 #include "opt_inet.h"
 
@@ -906,7 +906,7 @@
                    (buflen > sc->sc_max_frame_length)) {
                        GE_DPRINTF(sc, ("!"));
                        --rxq->rxq_active;
-                       ifp->if_ipackets++;
+                       if_statinc(ifp, if_ipackets);
                        if_statinc(ifp, if_ierrors);
                        goto give_it_back;
                }
diff -r d1fc87e1adba -r 7fc597b1d313 sys/dev/marvell/if_mvxpe.c
--- a/sys/dev/marvell/if_mvxpe.c        Wed Feb 05 08:22:23 2020 +0000
+++ b/sys/dev/marvell/if_mvxpe.c        Wed Feb 05 08:33:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mvxpe.c,v 1.32 2020/02/04 07:36:55 skrll Exp $      */
+/*     $NetBSD: if_mvxpe.c,v 1.33 2020/02/05 08:34:48 skrll Exp $      */
 /*
  * Copyright (c) 2015 Internet Initiative Japan Inc.
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.32 2020/02/04 07:36:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.33 2020/02/05 08:34:48 skrll Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -3264,10 +3264,10 @@
 
                switch (mvxpe_mib_list[i].ext) {
                case MVXPE_MIBEXT_IF_OERRORS:
-                       ifp->if_oerrors += val;
+                       if_statadd(ifp, if_oerrors,  val);
                        break;
                case MVXPE_MIBEXT_IF_IERRORS:
-                       ifp->if_ierrors += val;
+                       if_statadd(ifp, if_ierrors,  val);
                        break;
                case MVXPE_MIBEXT_IF_COLLISIONS:
                        if_statadd(ifp, if_collisions, val);
diff -r d1fc87e1adba -r 7fc597b1d313 sys/dev/qbus/if_dmc.c
--- a/sys/dev/qbus/if_dmc.c     Wed Feb 05 08:22:23 2020 +0000
+++ b/sys/dev/qbus/if_dmc.c     Wed Feb 05 08:33:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $        */
+/*     $NetBSD: if_dmc.c,v 1.28 2020/02/05 08:35:10 skrll Exp $        */
 /*
  * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.27 2020/02/04 07:37:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.28 2020/02/05 08:35:10 skrll Exp $");
 
 #undef DMCDEBUG        /* for base table dump on fatal error */
 
@@ -580,7 +580,7 @@
                         * Pass packet to type specific
                         * higher-level input routine.
                         */
-                       ifp->if_ipackets++;
+                       if_statinc(ifp, if_ipackets);
                        /* find location in dmcuba struct */
                        ifrw= &sc->sc_ifr[0];
                        for (rp = &sc->sc_rbufs[0]; rp < &sc->sc_rbufs[NRCV]; rp++) {



Home | Main Index | Thread Index | Old Index