Initialize the USED flag in new external receive buffers to 0, not to 1.

We put them directly onto the free list instead of calling the
external mbuf free routine (that routine would have cleaned the flag).

This fixes a bug which manifests itself in falsely reporting a lot of used
buffers when configuring the interface down.
This commit is contained in:
harti 2003-11-05 11:15:47 +00:00
parent 61d4a5e43e
commit 18063d10db

View File

@ -231,7 +231,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group)
for (i = 0; i < MBUF0_PER_PAGE; i++, c++) {
c->hdr.pageno = sc->mbuf_npages;
c->hdr.chunkno = i;
c->hdr.flags = MBUF_USED;
c->hdr.flags = 0;
hatm_ext_free(&sc->mbuf_list[0],
(struct mbufx_free *)c);
}
@ -246,7 +246,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group)
for (i = 0; i < MBUF1_PER_PAGE; i++, c++) {
c->hdr.pageno = sc->mbuf_npages;
c->hdr.chunkno = i;
c->hdr.flags = MBUF_USED;
c->hdr.flags = 0;
hatm_ext_free(&sc->mbuf_list[1],
(struct mbufx_free *)c);
}