From owner-freebsd-alpha Sun Dec 15 8:13:15 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 827D937B401 for ; Sun, 15 Dec 2002 08:13:14 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05F6843ED1 for ; Sun, 15 Dec 2002 08:13:14 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id A4BDBAE1C6; Sun, 15 Dec 2002 08:13:08 -0800 (PST) Date: Sun, 15 Dec 2002 08:13:08 -0800 From: Maxime Henrion To: Andrew Gallatin Cc: Christian Weisgerber , freebsd-alpha@FreeBSD.ORG Subject: Re: cvs commit: www/en/projects/busdma index.sgml style.css (fwd) Message-ID: <20021215161308.GL27086@elvis.mu.org> References: <20021209194400.GA27086@elvis.mu.org> <15860.62239.549294.224934@grasshopper.cs.duke.edu> <20021214152341.GE27086@elvis.mu.org> <15867.61754.299505.858101@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15867.61754.299505.858101@grasshopper.cs.duke.edu> User-Agent: Mutt/1.4i Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Andrew Gallatin wrote: > > Christian Weisgerber writes: > > All mbufs or mbuf clusters exhausted, please see tuning(7). > > I have > > xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0x10000-0x1007f mem 0x41322000-0x4132 207f irq 10 at device 11.0 on pci0 > > So the problem must be in the code path for the older cards.. > (my 905B uses different transmit and encap functions) > > Ah, I see it. The mbuf does not seem to be recorded in the ring if > the dmamap_load_mbuf succeeds in xl_encap(). Can you try the > following untested patch, please? (on top of Maxime's earlier patch). > > Interesting.. I see one nasty pre-existing condition that might cause > a memory leak. What happens if xl_encap() fails? Ugh, that should > be fixed too! I have uploaded a new patch. It should fix the mbuf leak problem, makes it so bus_dmamap_create() and bus_dmamap_destroy() are called only one time and not everytime we map a new mbuf as you suggested, adds some missing error handling in the xl_encap() and xl_encap_90xB() functions and fixes a few minor nits. The URL is still http://mu.org/~mux/if_xl.patch. If people with cards prior than 90xB could test it, it would help me a lot since I don't have any of those cards. Also, I'm interested in benchmarks before/after applying this patch. I think and hope there shouldn't be any measurable difference :-). Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message