From owner-svn-src-all@FreeBSD.ORG Sun Sep 23 22:53:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77007106564A; Sun, 23 Sep 2012 22:53:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48F228FC18; Sun, 23 Sep 2012 22:53:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8NMreYM094512; Sun, 23 Sep 2012 22:53:40 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8NMrers094507; Sun, 23 Sep 2012 22:53:40 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201209232253.q8NMrers094507@svn.freebsd.org> From: Sean Bruno Date: Sun, 23 Sep 2012 22:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240879 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2012 22:53:40 -0000 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 Reviewed by: Jack F Vogel 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;