From owner-freebsd-alpha Sat Dec 14 19: 4:34 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 98EE037B401; Sat, 14 Dec 2002 19:04:32 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E898143EA9; Sat, 14 Dec 2002 19:04:31 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.6/8.12.6) with ESMTP id gBF34Vro013959 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 14 Dec 2002 22:04:31 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id gBF34Qn14014; Sat, 14 Dec 2002 22:04:26 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15867.61754.299505.858101@grasshopper.cs.duke.edu> Date: Sat, 14 Dec 2002 22:04:26 -0500 (EST) To: naddy@mips.inka.de (Christian Weisgerber) Cc: freebsd-alpha@FreeBSD.ORG, mux@FreeBSD.ORG Subject: Re: cvs commit: www/en/projects/busdma index.sgml style.css (fwd) In-Reply-To: References: <20021209194400.GA27086@elvis.mu.org> <15860.62239.549294.224934@grasshopper.cs.duke.edu> <20021214152341.GE27086@elvis.mu.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid 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 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! Drew --- if_xl.c.bak Sat Dec 14 22:01:30 2002 +++ if_xl.c Sat Dec 14 22:01:55 2002 @@ -2419,6 +2419,7 @@ mtod(m_new, caddr_t)); m_new->m_pkthdr.len = m_new->m_len = m_head->m_pkthdr.len; m_freem(m_head); + m_head = m_new; f = &c->xl_ptr->xl_frag[0]; bus_dmamap_load(sc->xl_tag, c->xl_map, mtod(m_new, void *), MCLBYTES, xl_dma_map_addr, &f->xl_addr, 0); @@ -2428,6 +2429,7 @@ c->xl_ptr->xl_next = 0; } + c->xl_mbuf = m_head; bus_dmamap_sync(sc->xl_tag, c->xl_map, BUS_DMASYNC_PREREAD); return(0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message