From 9e2518582d33bf3874adb6097d63825bd9a3d18a Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Mon, 5 Aug 2002 00:21:24 +0000 Subject: [PATCH] Use m_getcl() to allocate buffers for the receive ring. MFC after: 3 days --- sys/dev/fxp/if_fxp.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index bbcc987cd6b4..2e2d5027f011 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -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;