From owner-svn-src-all@FreeBSD.ORG Sat Nov 7 02:10:59 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 6AA4C1065676; Sat, 7 Nov 2009 02:10:59 +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 59B848FC28; Sat, 7 Nov 2009 02:10:59 +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 nA72AxId034703; Sat, 7 Nov 2009 02:10:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA72AxTm034701; Sat, 7 Nov 2009 02:10:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911070210.nA72AxTm034701@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 Nov 2009 02:10:59 +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: r199014 - 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: Sat, 07 Nov 2009 02:10:59 -0000 Author: yongari Date: Sat Nov 7 02:10:59 2009 New Revision: 199014 URL: http://svn.freebsd.org/changeset/base/199014 Log: Fix I mssied in r199011. Rx ring index also should be updated. If we fill Rx ring full instead of half we can simplify this logic but this requires more experimentation. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Nov 7 01:18:03 2009 (r199013) +++ head/sys/dev/bge/if_bge.c Sat Nov 7 02:10:59 2009 (r199014) @@ -1046,9 +1046,11 @@ bge_init_rx_ring_std(struct bge_softc *s { int error, i; + sc->bge_std = 0; for (i = 0; i < BGE_SSLOTS; i++) { if ((error = bge_newbuf_std(sc, i)) != 0) return (error); + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, @@ -1087,9 +1089,11 @@ bge_init_rx_ring_jumbo(struct bge_softc struct bge_rcb *rcb; int error, i; + sc->bge_jumbo = 0; for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) { if ((error = bge_newbuf_jumbo(sc, i)) != 0) return (error); + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); }; bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, @@ -3198,6 +3202,7 @@ bge_rxeof(struct bge_softc *sc) ifp->if_iqdrops++; continue; } + BGE_INC(sc->bge_jumbo, BGE_JUMBO_RX_RING_CNT); } else { stdcnt++; if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { @@ -3211,6 +3216,7 @@ bge_rxeof(struct bge_softc *sc) ifp->if_iqdrops++; continue; } + BGE_INC(sc->bge_std, BGE_STD_RX_RING_CNT); } ifp->if_ipackets++;