summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2005-12-08 13:13:06 +0000
committerandre <andre@FreeBSD.org>2005-12-08 13:13:06 +0000
commit143b5d29e0d9125ec7b70a1abe48aebb3989b192 (patch)
treeef9ad18ce650bb77fc2801cc4bd0b25200db2c0f /sys/kern/uipc_mbuf.c
parent73cd477217779d7ee3e655b770b157dc8923c01c (diff)
downloadFreeBSD-src-143b5d29e0d9125ec7b70a1abe48aebb3989b192.zip
FreeBSD-src-143b5d29e0d9125ec7b70a1abe48aebb3989b192.tar.gz
Add an API for jumbo mbuf cluster allocation and also provide
4k clusters in addition to 9k and 16k ones. struct mbuf *m_getjcl(int how, short type, int flags, int size) void *m_cljget(struct mbuf *m, int how, int size) m_getjcl() returns an mbuf with a cluster of the specified size attached like m_getcl() does for 2k clusters. m_cljget() is different from m_clget() as it can allocate clusters without attaching them to an mbuf. In that case the return value is the pointer to the cluster of the requested size. If an mbuf was specified, it gets the cluster attached to it and the return value can be safely ignored. For size both take MCLBYTES, MJUM4BYTES, MJUM9BYTES, MJUM16BYTES. Reviewed by: glebius Tested by: glebius Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index e4b5483..96a027c 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -225,6 +225,9 @@ mb_free_ext(struct mbuf *m)
case EXT_CLUSTER:
uma_zfree(zone_clust, m->m_ext.ext_buf);
break;
+ case EXT_JUMBO4:
+ uma_zfree(zone_jumbo4, m->m_ext.ext_buf);
+ break;
case EXT_JUMBO9:
uma_zfree(zone_jumbo9, m->m_ext.ext_buf);
break;
OpenPOWER on IntegriCloud