Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/d477785c5092
branches:  trunk
changeset: 968953:d477785c5092
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 01 22:38:31 2020 +0000

description:
Adopt <net/if_stats.h>.

diffstat:

 sys/rump/net/lib/libshmif/if_shmem.c |  8 ++++----
 sys/rump/net/lib/libvirtif/if_virt.c |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 00356c2fd29f -r d477785c5092 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c      Sat Feb 01 22:38:05 2020 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c      Sat Feb 01 22:38:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_shmem.c,v 1.76 2018/12/12 01:51:32 rin Exp $        */
+/*     $NetBSD: if_shmem.c,v 1.77 2020/02/01 22:38:31 thorpej Exp $    */
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.76 2018/12/12 01:51:32 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.77 2020/02/01 22:38:31 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -561,7 +561,7 @@
 
                m = ether_sw_offload_tx(ifp, m);
                if (m == NULL) {
-                       ifp->if_oerrors++;
+                       if_statinc(ifp, if_oerrors);
                        break;
                }
 
@@ -630,7 +630,7 @@
        shmif_unlockbus(busmem);
 
        m_freem(m0);
-       ifp->if_opackets++;
+       if_statinc(ifp, if_opackets);
 
        DPRINTF(("shmif_start: send %d bytes at off %d\n", pktsize,
            busmem->shm_last));
diff -r 00356c2fd29f -r d477785c5092 sys/rump/net/lib/libvirtif/if_virt.c
--- a/sys/rump/net/lib/libvirtif/if_virt.c      Sat Feb 01 22:38:05 2020 +0000
+++ b/sys/rump/net/lib/libvirtif/if_virt.c      Sat Feb 01 22:38:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_virt.c,v 1.57 2018/06/26 06:48:03 msaitoh Exp $     */
+/*     $NetBSD: if_virt.c,v 1.58 2020/02/01 22:45:01 thorpej Exp $     */
 
 /*
  * Copyright (c) 2008, 2013 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.57 2018/06/26 06:48:03 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.58 2020/02/01 22:45:01 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -325,7 +325,7 @@
                VIFHYPER_SEND(sc->sc_viu, io, i);
 
                m_freem(m0);
-               ifp->if_opackets++;
+               if_statinc(ifp, if_opackets);
        }
 
        ifp->if_flags &= ~IFF_OACTIVE;



Home | Main Index | Thread Index | Old Index