Author: sbruno Date: Tue Oct 9 18:02:09 2012 New Revision: 241377 URL: http://svn.freebsd.org/changeset/base/241377
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 <abo...@averesystems.com> Reviewed by: Jack F Vogel <j...@freebsd.org> Modified: stable/7/sys/dev/e1000/if_em.c stable/7/sys/dev/e1000/if_igb.c stable/7/sys/dev/e1000/if_lem.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_em.c Tue Oct 9 18:02:09 2012 (r241377) @@ -4064,7 +4064,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/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_igb.c Tue Oct 9 18:02:09 2012 (r241377) @@ -4152,7 +4152,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/7/sys/dev/e1000/if_lem.c ============================================================================== --- stable/7/sys/dev/e1000/if_lem.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_lem.c Tue Oct 9 18:02:09 2012 (r241377) @@ -3509,7 +3509,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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"