1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Add option for disabling allocation from the packet zone

This commit is contained in:
Kip Macy 2007-04-14 20:16:03 +00:00
parent 38073c4181
commit f8bbd17f06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168733
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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.