Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Adopt <net/if_stats.h>.
details: https://anonhg.NetBSD.org/src/rev/2e2bef6082ae
branches: trunk
changeset: 744433:2e2bef6082ae
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Feb 01 12:55:22 2020 +0000
description:
Adopt <net/if_stats.h>.
XXX This driver needs some work in this regard (practually no
stats are reported).
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 38295533dd30 -r 2e2bef6082ae sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Sat Feb 01 12:55:13 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Sat Feb 01 12:55:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.221 2020/01/21 14:55:55 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.222 2020/02/01 12:55:22 thorpej Exp $ */
/******************************************************************************
@@ -1701,11 +1701,13 @@
* adapter->stats counters. It's required to make ifconfig -z
* (SOICZIFDATA) work.
*/
- ifp->if_collisions = 0;
+ /* XXX Actually, just fill in the per-cpu stats, please !!! */
/* Rx Errors */
- ifp->if_iqdrops += total_missed_rx;
- ifp->if_ierrors += crcerrs + rlec;
+ net_stat_ref_t nsr = IF_STAT_GETREF(ifp);
+ if_statadd_ref(nsr, if_iqdrops, total_missed_rx);
+ if_statadd_ref(nsr, if_ierrors, crcerrs + rlec);
+ IF_STAT_PUTREF(ifp);
} /* ixgbe_update_stats_counters */
/************************************************************************
Home |
Main Index |
Thread Index |
Old Index