Date: Tue, 9 Oct 2012 18:02:10 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241377 - stable/7/sys/dev/e1000 Message-ID: <201210091802.q99I2AaZ048700@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <aboyer@averesystems.com> Reviewed by: Jack F Vogel <jfv@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210091802.q99I2AaZ048700>