Module Name: src
Committed By: thorpej
Date: Wed Jan 29 05:55:16 UTC 2020
Modified Files:
src/sys/dev/hyperv: if_hvn.c
Log Message:
Adopt <net/if_stats.h>.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/hyperv/if_hvn.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/dev/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.15 src/sys/dev/hyperv/if_hvn.c:1.16
--- src/sys/dev/hyperv/if_hvn.c:1.15 Fri Dec 27 05:59:53 2019
+++ src/sys/dev/hyperv/if_hvn.c Wed Jan 29 05:55:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_hvn.c,v 1.15 2019/12/27 05:59:53 nonaka Exp $ */
+/* $NetBSD: if_hvn.c,v 1.16 2020/01/29 05:55:16 thorpej Exp $ */
/* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */
/*-
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.15 2019/12/27 05:59:53 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.16 2020/01/29 05:55:16 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -498,7 +498,7 @@ hvn_start(struct ifnet *ifp)
if (hvn_encap(sc, m, &txd)) {
/* the chain is too large */
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
m_freem(m);
continue;
}
@@ -507,7 +507,7 @@ hvn_start(struct ifnet *ifp)
if (hvn_rndis_output(sc, txd)) {
hvn_decap(sc, txd);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
m_freem(m);
continue;
}
@@ -678,7 +678,7 @@ hvn_txeof(struct hvn_softc *sc, uint64_t
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap);
m_freem(m);
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
txd->txd_ready = 1;
@@ -1560,7 +1560,7 @@ hvn_rxeof(struct hvn_softc *sc, uint8_t
if ((m = hvn_devget(sc, buf + RNDIS_HEADER_OFFSET + pkt->rm_dataoffset,
pkt->rm_datalen)) == NULL) {
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}