Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
src: vmx(4): compute if_ibytes using rxq->vxrxq_stats.vmrxs_ibytes.
details: https://anonhg.NetBSD.org/src/rev/95a723e5301c
branches: trunk
changeset: 318230:95a723e5301c
user: nonaka <nonaka%NetBSD.org@localhost>
date: Mon Apr 16 09:12:52 2018 +0000
description:
vmx(4): compute if_ibytes using rxq->vxrxq_stats.vmrxs_ibytes.
diffstat:
sys/arch/x86/pci/if_vmx.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r ad6c9f8b3e5f -r 95a723e5301c sys/arch/x86/pci/if_vmx.c
--- a/sys/arch/x86/pci/if_vmx.c Mon Apr 16 09:10:42 2018 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Mon Apr 16 09:12:52 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vmx.c,v 1.23 2018/04/16 09:10:42 nonaka Exp $ */
+/* $NetBSD: if_vmx.c,v 1.24 2018/04/16 09:12:52 nonaka Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.23 2018/04/16 09:10:42 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.24 2018/04/16 09:12:52 nonaka Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -2894,6 +2894,7 @@
case SIOCGIFDATA:
case SIOCZIFDATA:
ifp->if_ipackets = 0;
+ ifp->if_ibytes = 0;
ifp->if_iqdrops = 0;
ifp->if_ierrors = 0;
for (int i = 0; i < sc->vmx_nrxqueues; i++) {
@@ -2901,6 +2902,7 @@
VMXNET3_RXQ_LOCK(rxq);
ifp->if_ipackets += rxq->vxrxq_stats.vmrxs_ipackets;
+ ifp->if_ibytes += rxq->vxrxq_stats.vmrxs_ibytes;
ifp->if_iqdrops += rxq->vxrxq_stats.vmrxs_iqdrops;
ifp->if_ierrors += rxq->vxrxq_stats.vmrxs_ierrors;
if (cmd == SIOCZIFDATA) {
Home |
Main Index |
Thread Index |
Old Index