Date: Sun, 23 Sep 2012 22:53:40 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240879 - head/sys/dev/e1000 Message-ID: <201209232253.q8NMrers094507@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <aboyer@averesystems.com> Reviewed by: Jack F Vogel <jfv@freebsd.org> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209232253.q8NMrers094507>