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 Fix a bug that if_obytes and if_omcasts ar...
details: https://anonhg.NetBSD.org/src/rev/f11e67e876ff
branches: trunk
changeset: 353472:f11e67e876ff
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon May 08 10:00:41 2017 +0000
description:
Fix a bug that if_obytes and if_omcasts aren't counted. This bug was added
in ixgbe.c rev. 1.27 by me. Reported by Uwe Toenjes.
diffstat:
sys/dev/pci/ixgbe/ix_txrx.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r d173a08fcd78 -r f11e67e876ff sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c Mon May 08 09:25:03 2017 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c Mon May 08 10:00:41 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/
-/*$NetBSD: ix_txrx.c,v 1.22 2017/03/02 05:35:01 msaitoh Exp $*/
+/*$NetBSD: ix_txrx.c,v 1.23 2017/05/08 10:00:41 msaitoh Exp $*/
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -333,6 +333,7 @@
{
struct m_tag *mtag;
struct adapter *adapter = txr->adapter;
+ struct ifnet *ifp = adapter->ifp;
struct ethercom *ec = &adapter->osdep.ec;
u32 olinfo_status = 0, cmd_type_len;
int i, j, error;
@@ -481,6 +482,13 @@
++txr->total_packets.ev_count;
IXGBE_WRITE_REG(&adapter->hw, txr->tail, i);
+ /*
+ * XXXX NOMPSAFE: ifp->if_data should be percpu.
+ */
+ ifp->if_obytes += m_head->m_pkthdr.len;
+ if (m_head->m_flags & M_MCAST)
+ ifp->if_omcasts++;
+
/* Mark queue as having work */
if (txr->busy == 0)
txr->busy = 1;
Home |
Main Index |
Thread Index |
Old Index