Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/dev Adopt <net/if_stat.h>



details:   https://anonhg.NetBSD.org/src/rev/a37e2ea2e93a
branches:  trunk
changeset: 969020:a37e2ea2e93a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 05 07:18:16 2020 +0000

description:
Adopt <net/if_stat.h>

diffstat:

 sys/arch/usermode/dev/if_veth.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 447a755e4b5d -r a37e2ea2e93a sys/arch/usermode/dev/if_veth.c
--- a/sys/arch/usermode/dev/if_veth.c   Wed Feb 05 06:39:13 2020 +0000
+++ b/sys/arch/usermode/dev/if_veth.c   Wed Feb 05 07:18:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_veth.c,v 1.13 2019/05/29 10:07:29 msaitoh Exp $ */
+/* $NetBSD: if_veth.c,v 1.14 2020/02/05 07:18:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.13 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_veth.c,v 1.14 2020/02/05 07:18:16 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -225,14 +225,14 @@
                MGETHDR(m, M_DONTWAIT, MT_DATA);
                if (m == NULL) {
                        vethprintf("MGETHDR failed (input error)\n");
-                       ++ifp->if_ierrors;
+                       if_statinc(ifp, if_ierrors);
                        continue;
                }
                if (len > MHLEN) {
                        MCLGET(m, M_DONTWAIT);
                        if ((m->m_flags & M_EXT) == 0) {
                                m_freem(m);
-                               ++ifp->if_ierrors;
+                               if_statinc(ifp, if_ierrors);
                                vethprintf("M_EXT not set (input error)\n");
                                continue;
                        }
@@ -297,9 +297,9 @@
                    m0->m_pkthdr.len);
                vethprintf("write returned %d\n", len);
                if (len > 0)
-                       ++ifp->if_opackets;
+                       if_statinc(ifp, if_opackets);
                else
-                       ++ifp->if_oerrors;
+                       if_statinc(ifp, if_oerrors);
                m_freem(m0);
        }
 }
@@ -316,7 +316,7 @@
 veth_watchdog(struct ifnet *ifp)
 {
        vethprintf("%s: %s flags=%x\n", __func__, ifp->if_xname, ifp->if_flags);
-       ++ifp->if_oerrors;
+       if_statinc(ifp, if_oerrors);
        veth_init(ifp);
 }
 



Home | Main Index | Thread Index | Old Index