Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Nov 2002 22:39:47 -0500 
From:      Don Bowman <don@sandvine.com>
To:        "'freebsd-net@freebsd.org'" <freebsd-net@freebsd.org>
Subject:   bug in bge driver with ENOBUFS on 4.7
Message-ID:  <FE045D4D9F7AED4CBFF1B3B813C8533701022EBF@mail.sandvine.com>

next in thread | raw e-mail | index | archive | help
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




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