diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-07-01 11:44:13 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-07-01 11:44:13 +0000 |
commit | 59f693bd178fa7f6d7e655d5bd268521d4de55eb (patch) | |
tree | 080d2ba981e638997c9a37de30d721996ad9f63c /sys/dev | |
parent | e00ac454017001ebda2a76e98c13144d661d86d0 (diff) |
Do not use MINCLSIZE to figure out if a single mbuf or a mcluster should be
used. Instead use MHLEN and MLEN acordingly because MINCLSIZE is bigger than
a single mbuf now.
OK mglocker@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/pgt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index b3da4357569..d141e768054 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.48 2008/04/16 18:32:15 damien Exp $ */ +/* $OpenBSD: pgt.c,v 1.49 2008/07/01 11:44:12 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1329,7 +1329,7 @@ pgt_trap_received(struct pgt_softc *sc, uint32_t oid, void *trapdata, return; total = sizeof(oid) + size + sizeof(struct pgt_async_trap); - if (total >= MINCLSIZE) { + if (total > MLEN) { MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return; @@ -1518,7 +1518,7 @@ pgt_datarx_completion(struct pgt_softc *sc, enum pgt_queue pq) if (m == NULL) goto fail; - if (datalen >= MINCLSIZE) { + if (datalen > MHLEN) { MCLGET(m, M_DONTWAIT); if (!(m->m_flags & M_EXT)) { m_free(m); |