From owner-svn-src-all@FreeBSD.ORG Sun Nov 8 01:13:38 2009 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 EC4351065670; Sun, 8 Nov 2009 01:13:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB47C8FC08; Sun, 8 Nov 2009 01:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA81DcKe068998; Sun, 8 Nov 2009 01:13:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA81Dcfe068996; Sun, 8 Nov 2009 01:13:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911080113.nA81Dcfe068996@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 8 Nov 2009 01:13:38 +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: r199035 - head/sys/dev/bge 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, 08 Nov 2009 01:13:39 -0000 Author: yongari Date: Sun Nov 8 01:13:38 2009 New Revision: 199035 URL: http://svn.freebsd.org/changeset/base/199035 Log: Don't count input errors twice, we always read input errors from MAC in bge_tick. Previously it used to show more number of input errors. I noticed actual input errors were less than 8% even for 64 bytes UDP frames generated by netperf. Since we always access BGE_RXLP_LOCSTAT_IFIN_DROPS register in bge_tick, remove useless code protected by #ifdef notyet. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Nov 8 00:50:12 2009 (r199034) +++ head/sys/dev/bge/if_bge.c Sun Nov 8 01:13:38 2009 (r199035) @@ -3196,7 +3196,6 @@ bge_rxeof(struct bge_softc *sc) m = sc->bge_cdata.bge_rx_jumbo_chain[rxidx]; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); - ifp->if_ierrors++; continue; } if (bge_newbuf_jumbo(sc, rxidx) != 0) { @@ -3209,7 +3208,6 @@ bge_rxeof(struct bge_softc *sc) stdcnt++; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); - ifp->if_ierrors++; continue; } m = sc->bge_cdata.bge_rx_std_chain[rxidx]; @@ -3291,14 +3289,6 @@ bge_rxeof(struct bge_softc *sc) bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, sc->bge_std); if (jumbocnt) bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, sc->bge_jumbo); -#ifdef notyet - /* - * This register wraps very quickly under heavy packet drops. - * If you need correct statistics, you can enable this check. - */ - if (BGE_IS_5705_PLUS(sc)) - ifp->if_ierrors += CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS); -#endif return (rx_npkts); }