From owner-cvs-all Mon Jul 5 19: 6:47 1999 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 618) id B10D214C94; Mon, 5 Jul 1999 19:06:43 -0700 (PDT) Subject: Re: cvs commit: src/sys/pci if_ti.c if_tireg.h In-Reply-To: <199907052107.OAA05881@implode.root.com> from David Greenman at "Jul 5, 1999 2: 7:28 pm" To: dg@root.com Date: Mon, 5 Jul 1999 19:06:43 -0700 (PDT) Cc: committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1437 Message-Id: <19990706020643.B10D214C94@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > >wpaul 1999/07/05 13:19:43 PDT > > > > Modified files: > > sys/pci if_ti.c if_tireg.h > > Log: > > Remove ti_refill_rx_rings() and associated stuff; replace dirty RX buffers > > in ti_rxeof() instead. This doesn't really seem to provide much in the > > way of a performance boost, and I'm pretty sure it can cause mbuf leakage > > in some extreme cases. > > Just to clarify - the old method may have mbuf leakage problems, or do mean > that the new method has problems? action: Bill stares blankly at dg. The name of the game is to fix things. I would never in a million years commit code to deliberately leak mbufs. ti_refill_rx_rings() could sometimes leak mbufs, and while testing with the SysKonnect card I decided that it doesn't really help all that much anyway, so I killed it. The problem with ti_refill_rx_rings() is that in some cases, ti_rxeof() will leave the current receive buffer in place instead of consuming it (e.g. if the received frame was bad). ti_refill_rx_rings() didn't check this condition and would clobber the mbuf pointer with a pointer to a new mbuf in its place. It also doesn't allow for recovery in the face of allocation failures. If we can't allocate a new buffer, we should leave the old one in place and tank the packet. But by the time we get to refill routine, we may have had to toss several packets and we can no longer fill in the empty descriptors. -Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message