Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2013 22:59:47 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251872 - head/sys/dev/age
Message-ID:  <201306172259.r5HMxl7J077199@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Jun 17 22:59:47 2013
New Revision: 251872
URL: http://svnweb.freebsd.org/changeset/base/251872

Log:
  Be sure to actually decrement the "count" parameter for each processed
  descriptor so that we return when the threshold has been reached.
  
  Reviewed by:	yongari
  MFC after:	1 week

Modified:
  head/sys/dev/age/if_age.c

Modified: head/sys/dev/age/if_age.c
==============================================================================
--- head/sys/dev/age/if_age.c	Mon Jun 17 21:41:14 2013	(r251871)
+++ head/sys/dev/age/if_age.c	Mon Jun 17 22:59:47 2013	(r251872)
@@ -2478,7 +2478,7 @@ age_rxintr(struct age_softc *sc, int rr_
 	    sc->age_cdata.age_rx_ring_map, BUS_DMASYNC_POSTWRITE);
 
 	for (prog = 0; rr_cons != rr_prod; prog++) {
-		if (count <= 0)
+		if (count-- <= 0)
 			break;
 		rxrd = &sc->age_rdata.age_rr_ring[rr_cons];
 		nsegs = AGE_RX_NSEGS(le32toh(rxrd->index));



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