From f8bbd17f06d310e77cd490f704f73c897c108662 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Sat, 14 Apr 2007 20:16:03 +0000 Subject: [PATCH] Add option for disabling allocation from the packet zone --- sys/conf/options | 1 + sys/sys/mbuf.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/conf/options b/sys/conf/options index 638b2ba7ed9c..2a84d34b807e 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 58ad3a6d58d6..3d8857ce4ce8 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.