summaryrefslogtreecommitdiffstats
path: root/sys/sys/mbuf.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-07-17 14:04:03 +0000
committerrwatson <rwatson@FreeBSD.org>2005-07-17 14:04:03 +0000
commit38dffb25ed020bf3bd3136f835904c8618803952 (patch)
tree9aa25437d2359619ec3fd7047a6c85ef26da0e20 /sys/sys/mbuf.h
parent82bb8e24de2d0f1c63aa8925bf17958bdbdf2153 (diff)
downloadFreeBSD-src-38dffb25ed020bf3bd3136f835904c8618803952.zip
FreeBSD-src-38dffb25ed020bf3bd3136f835904c8618803952.tar.gz
Define four constants, MBUF_{,MEM,CLUSTER,PACKET,TAG}_MEM_NAME, which
are string names for their respective UMA zones and malloc types, and are passed into uma_zcreate() and MALLOC_DEFINE(). Export them outside of _KERNEL in mbuf.h so that netstat can reference them. Change the names to improve consistency, with each zone/type associated with the mbuf allocator being prefixed mbuf_. MFC after: 1 week
Diffstat (limited to 'sys/sys/mbuf.h')
-rw-r--r--sys/sys/mbuf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index c514e0f..9fb385c 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -287,6 +287,16 @@ struct mbstat {
#define M_TRYWAIT M_WAITOK
#define M_WAIT M_WAITOK
+/*
+ * String names of mbuf-related UMA(9) and malloc(9) types. Exposed to
+ * !_KERNEL so that monitoring tools can look up the zones with
+ * libmemstat(3).
+ */
+#define MBUF_MEM_NAME "mbuf"
+#define MBUF_CLUSTER_MEM_NAME "mbuf_cluster"
+#define MBUF_PACKET_MEM_NAME "mbuf_packet"
+#define MBUF_TAG_MEM_NAME "mbuf_tag"
+
#ifdef _KERNEL
/*-
* mbuf external reference count management macros.
OpenPOWER on IntegriCloud