summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-08-05 00:21:24 +0000
committerluigi <luigi@FreeBSD.org>2002-08-05 00:21:24 +0000
commit6e0282cae229cf6c5f070ff7c94ad62346f33b3e (patch)
tree32251bdcbcba3e2a4824237806a75cb17d017262 /sys
parent3b63a2bd2ba2519d666ad095db6bf3673247df6a (diff)
downloadFreeBSD-src-6e0282cae229cf6c5f070ff7c94ad62346f33b3e.zip
FreeBSD-src-6e0282cae229cf6c5f070ff7c94ad62346f33b3e.tar.gz
Use m_getcl() to allocate buffers for the receive ring.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fxp/if_fxp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index bbcc987..2e2d502 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;
OpenPOWER on IntegriCloud