svn commit: r241376 - stable/8/sys/dev/e1000

Sean Bruno sbruno at FreeBSD.org
Tue Oct 9 18:02:06 UTC 2012


Author: sbruno
Date: Tue Oct  9 18:02:05 2012
New Revision: 241376
URL: http://svn.freebsd.org/changeset/base/241376

Log:
  MFC r240879
  
  This patch fixes a nit in the em, lem, and igb driver statistics.  Increment
  adapter->dropped_pkts instead of if_ierrors because if_ierrors is
  overwritten by hw stats collection.
  
  Submitted by: Andrew Boyer <aboyer at averesystems.com>
  Reviewed by:  Jack F Vogel <jfv at freebsd.org>

Modified:
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c
  stable/8/sys/dev/e1000/if_lem.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/dev/e1000/if_em.c
==============================================================================
--- stable/8/sys/dev/e1000/if_em.c	Tue Oct  9 17:06:31 2012	(r241375)
+++ stable/8/sys/dev/e1000/if_em.c	Tue Oct  9 18:02:05 2012	(r241376)
@@ -4336,7 +4336,7 @@ em_rxeof(struct rx_ring *rxr, int count,
 
 		if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) ||
 		    (rxr->discard == TRUE)) {
-			ifp->if_ierrors++;
+			adapter->dropped_pkts++;
 			++rxr->rx_discarded;
 			if (!eop) /* Catch subsequent segs */
 				rxr->discard = TRUE;

Modified: stable/8/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/8/sys/dev/e1000/if_igb.c	Tue Oct  9 17:06:31 2012	(r241375)
+++ stable/8/sys/dev/e1000/if_igb.c	Tue Oct  9 18:02:05 2012	(r241376)
@@ -4610,7 +4610,7 @@ igb_rxeof(struct igb_queue *que, int cou
 		/* Make sure all segments of a bad packet are discarded */
 		if (((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0) ||
 		    (rxr->discard)) {
-			ifp->if_ierrors++;
+			adapter->dropped_pkts++;
 			++rxr->rx_discarded;
 			if (!eop) /* Catch subsequent segs */
 				rxr->discard = TRUE;

Modified: stable/8/sys/dev/e1000/if_lem.c
==============================================================================
--- stable/8/sys/dev/e1000/if_lem.c	Tue Oct  9 17:06:31 2012	(r241375)
+++ stable/8/sys/dev/e1000/if_lem.c	Tue Oct  9 18:02:05 2012	(r241376)
@@ -3522,7 +3522,7 @@ skip:
 				adapter->lmp = NULL;
 			}
 		} else {
-			ifp->if_ierrors++;
+			adapter->dropped_pkts++;
 discard:
 			/* Reuse loaded DMA map and just update mbuf chain */
 			mp = adapter->rx_buffer_area[i].m_head;


More information about the svn-src-stable-8 mailing list