summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2017-01-22 10:17:37 +0000
committerdlg <dlg@openbsd.org>2017-01-22 10:17:37 +0000
commit88a08f2af426247cf5e32d11f8df17f5717812a1 (patch)
tree55b694cef98ba8f92034f91f4eed28aafa059f2a /sys/dev/pv
parentsync (diff)
downloadwireguard-openbsd-88a08f2af426247cf5e32d11f8df17f5717812a1.tar.xz
wireguard-openbsd-88a08f2af426247cf5e32d11f8df17f5717812a1.zip
move counting if_opackets next to counting if_obytes in if_enqueue.
this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
Diffstat (limited to 'sys/dev/pv')
-rw-r--r--sys/dev/pv/if_hvn.c2
-rw-r--r--sys/dev/pv/if_vio.c3
-rw-r--r--sys/dev/pv/if_xnf.c3
3 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c
index 59f430e96a5..3fd0b1fb353 100644
--- a/sys/dev/pv/if_hvn.c
+++ b/sys/dev/pv/if_hvn.c
@@ -481,8 +481,6 @@ hvn_start(struct ifnet *ifp)
}
sc->sc_tx_next++;
-
- ifp->if_opackets++;
}
}
diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c
index 53354b25b72..1762e4325bb 100644
--- a/sys/dev/pv/if_vio.c
+++ b/sys/dev/pv/if_vio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vio.c,v 1.1 2017/01/21 11:21:28 reyk Exp $ */
+/* $OpenBSD: if_vio.c,v 1.2 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
@@ -1148,7 +1148,6 @@ vio_txeof(struct virtqueue *vq)
bus_dmamap_unload(vsc->sc_dmat, sc->sc_tx_dmamaps[slot]);
sc->sc_tx_mbufs[slot] = 0;
virtio_dequeue_commit(vq, slot);
- ifp->if_opackets++;
m_freem(m);
}
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c
index 0f05e521b4b..9838a8d645a 100644
--- a/sys/dev/pv/if_xnf.c
+++ b/sys/dev/pv/if_xnf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xnf.c,v 1.46 2017/01/05 13:23:51 mikeb Exp $ */
+/* $OpenBSD: if_xnf.c,v 1.47 2017/01/22 10:17:39 dlg Exp $ */
/*
* Copyright (c) 2015, 2016 Mike Belopuhov
@@ -510,7 +510,6 @@ xnf_start(struct ifnet *ifp)
m_freem(m);
continue;
}
- ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)