Use m_getcl() to allocate buffers for the receive ring.

MFC after: 3 days
This commit is contained in:
Luigi Rizzo 2002-08-05 00:21:24 +00:00
parent 7ffcf9ec77
commit 9e2518582d

View File

@ -1867,17 +1867,8 @@ fxp_add_rfabuf(struct fxp_softc *sc, struct mbuf *oldm)
struct mbuf *m;
struct fxp_rfa *rfa, *p_rfa;
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m != NULL) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
if (oldm == NULL)
return 1;
m = oldm;
m->m_data = m->m_ext.ext_buf;
}
} else {
m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) { /* try to recycle the old mbuf instead */
if (oldm == NULL)
return 1;
m = oldm;