Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Nov 2009 01:13:38 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199035 - head/sys/dev/bge
Message-ID:  <200911080113.nA81Dcfe068996@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911080113.nA81Dcfe068996>