From owner-freebsd-stable Sat Nov 9 19:39:52 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F53E37B404 for ; Sat, 9 Nov 2002 19:39:51 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54AD943E42 for ; Sat, 9 Nov 2002 19:39:50 -0800 (PST) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id <42S9V8ZH>; Sat, 9 Nov 2002 22:39:49 -0500 Message-ID: From: Don Bowman To: "'freebsd-net@freebsd.org'" Subject: bug in bge driver with ENOBUFS on 4.7 Date: Sat, 9 Nov 2002 22:39:47 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In bge_rxeof(), there can end up being a condition which causes the driver to endlessly interrupt. if (bge_newbuf_std(sc, sc->bge_std, NULL) == ENOBUFS) { ifp->if_ierrors++; bge_newbuf_std(sc, sc->bge_std, m); continue; } happens. Now, bge_newbuf_std returns ENOBUFS. 'm' is also NULL. This causes the received packet to not be dequeued, and the driver will then go straight back into interrupt as the chip will reassert the interrupt as soon as we return. Suggestions on a fix? I'm not sure why I ran out of mbufs, I have kern.ipc.nmbclusters: 90000 kern.ipc.nmbufs: 280000 (kgdb) p/x mbstat $11 = {m_mbufs = 0x3a0, m_clusters = 0x39c, m_spare = 0x0, m_clfree = 0x212, m_drops = 0x0, m_wait = 0x0, m_drain = 0x0, m_mcfail = 0x0, m_mpfail = 0x0, m_msize = 0x100, m_mclbytes = 0x800, m_minclsize = 0xd5, m_mlen = 0xec, m_mhlen = 0xd4} but bge_newbuf_std() does this: if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) { return(ENOBUFS); } and then returns ENOBUFS. This is with 4.7-RELEASE. --don (don@sandvine.com www.sandvine.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message