diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-04-14 20:16:03 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-04-14 20:16:03 +0000 |
commit | 69261f23063068403370053c155b911497247ccd (patch) | |
tree | f1b1a9015674bc3defb2247b6f38f7d2626ba078 | |
parent | 386fa3b37f80f6f88aea42952c395c34d11055b8 (diff) | |
download | FreeBSD-src-69261f23063068403370053c155b911497247ccd.zip FreeBSD-src-69261f23063068403370053c155b911497247ccd.tar.gz |
Add option for disabling allocation from the packet zone
-rw-r--r-- | sys/conf/options | 1 | ||||
-rw-r--r-- | sys/sys/mbuf.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/conf/options b/sys/conf/options index 638b2ba..2a84d34 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -127,6 +127,7 @@ MUTEX_WAKE_ALL NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NSWBUF_MIN opt_swap.h +MBUF_PACKET_ZONE_DISABLE opt_global.h PANIC_REBOOT_WAIT_TIME opt_panic.h PPC_DEBUG opt_ppc.h PPC_PROBE_CHIPSET opt_ppc.h diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 58ad3a6..3d8857c 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -451,6 +451,7 @@ m_gethdr(int how, short type) return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how))); } +#ifndef MBUF_PACKET_ZONE_DISABLE static __inline struct mbuf * m_getcl(int how, short type, int flags) { @@ -460,6 +461,9 @@ m_getcl(int how, short type, int flags) args.type = type; return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how))); } +#else +#define m_getcl(how, type, flags) m_getjcl(how, type, flags, MCLBYTES) +#endif /* * m_getjcl() returns an mbuf with a cluster of the specified size attached. |