summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mbuf.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-08-24 13:15:42 +0000
committerandre <andre@FreeBSD.org>2013-08-24 13:15:42 +0000
commit817be10f1c2c92e0673cb372ae147817a30f922b (patch)
treee03c662cce205e4663aa5f84ea52766f0d649838 /sys/kern/kern_mbuf.c
parentb9a332b6b2d49d14c1362a93fe3d917544bef915 (diff)
downloadFreeBSD-src-817be10f1c2c92e0673cb372ae147817a30f922b.zip
FreeBSD-src-817be10f1c2c92e0673cb372ae147817a30f922b.tar.gz
dd a 24 bits wide ext_flags field to m_ext by reducing ext_type
to 8 bits. ext_type is an enumerator and the number of types we have is a mere dozen. A couple of ext_types are renumbered to fit within 8 bits. EXT_VENDOR[1-4] and EXT_EXP[1-4] types for vendor-internal and experimental local mapping. The ext_flags field is currently unused but has a couple of flags already defined for future use. Again vendor and experimental flags are provided for local mapping. EXT_FLAG_BITS is provided for the printf(9) %b identifier. Initialize and copy ext_flags in the relevant mbuf functions. Improve alignment and packing of struct m_ext on 32 and 64 archs by carefully sorting the fields.
Diffstat (limited to 'sys/kern/kern_mbuf.c')
-rw-r--r--sys/kern/kern_mbuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index c01f432..85d62ea 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -547,6 +547,7 @@ mb_ctor_clust(void *mem, int size, void *arg, int how)
m->m_ext.ext_arg2 = NULL;
m->m_ext.ext_size = size;
m->m_ext.ext_type = type;
+ m->m_ext.ext_flags = 0;
m->m_ext.ref_cnt = refcnt;
}
OpenPOWER on IntegriCloud