Author: sbruno Date: Sun Sep 23 22:53:39 2012 New Revision: 240879 URL: http://svn.freebsd.org/changeset/base/240879
Log: 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 <[email protected]> Reviewed by: Jack F Vogel <[email protected]> MFC after: 2 weeks Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Sep 23 20:31:52 2012 (r240878) +++ head/sys/dev/e1000/if_em.c Sun Sep 23 22:53:39 2012 (r240879) @@ -4436,7 +4436,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: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sun Sep 23 20:31:52 2012 (r240878) +++ head/sys/dev/e1000/if_igb.c Sun Sep 23 22:53:39 2012 (r240879) @@ -4759,7 +4759,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: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Sun Sep 23 20:31:52 2012 (r240878) +++ head/sys/dev/e1000/if_lem.c Sun Sep 23 22:53:39 2012 (r240879) @@ -3562,7 +3562,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; _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
