Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2010 17:10:23 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r213208 - stable/8/sys/dev/bge
Message-ID:  <201009271710.o8RHAN1A042981@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon Sep 27 17:10:22 2010
New Revision: 213208
URL: http://svn.freebsd.org/changeset/base/213208

Log:
  MFC r212755:
    Fix incorrect RX BD producer updates. The producer index was
    already updated after allocating mbuf so driver had to use the last
    index instead of using next producer index. This should fix driver
    hang which may happen under high network load.
  
    Reported by:	Igor Sysoev <is <> rambler-co dot ru>, Vlad Galu <dudu <> dudu dot ro>
    Tested by:	Igor Sysoev <is <> rambler-co dot ru>, Vlad Galu <dudu <> dudu dot ro>

Modified:
  stable/8/sys/dev/bge/if_bge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==============================================================================
--- stable/8/sys/dev/bge/if_bge.c	Mon Sep 27 16:48:56 2010	(r213207)
+++ stable/8/sys/dev/bge/if_bge.c	Mon Sep 27 17:10:22 2010	(r213208)
@@ -3470,9 +3470,11 @@ bge_rxeof(struct bge_softc *sc, uint16_t
 	sc->bge_rx_saved_considx = rx_cons;
 	bge_writembx(sc, BGE_MBX_RX_CONS0_LO, sc->bge_rx_saved_considx);
 	if (stdcnt)
-		bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, sc->bge_std);
+		bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, (sc->bge_std +
+		    BGE_STD_RX_RING_CNT - 1) % BGE_STD_RX_RING_CNT);
 	if (jumbocnt)
-		bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, sc->bge_jumbo);
+		bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, (sc->bge_jumbo +
+		    BGE_JUMBO_RX_RING_CNT - 1) % BGE_JUMBO_RX_RING_CNT);
 #ifdef notyet
 	/*
 	 * This register wraps very quickly under heavy packet drops.



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