Module Name:    src
Committed By:   skrll
Date:           Wed Feb  5 07:18:16 UTC 2020

Modified Files:
        src/sys/arch/usermode/dev: if_veth.c

Log Message:
Adopt <net/if_stat.h>


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/usermode/dev/if_veth.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/arch/usermode/dev/if_veth.c
diff -u src/sys/arch/usermode/dev/if_veth.c:1.13 src/sys/arch/usermode/dev/if_veth.c:1.14
--- src/sys/arch/usermode/dev/if_veth.c:1.13	Wed May 29 10:07:29 2019
+++ src/sys/arch/usermode/dev/if_veth.c	Wed Feb  5 07:18:16 2020
@@ -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 <[email protected]>
@@ -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 @@ veth_softrx(void *priv)
 		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 @@ veth_start(struct ifnet *ifp)
 		    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 @@ static void
 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);
 }
 

Reply via email to