summaryrefslogtreecommitdiffstats
path: root/sys/sys/mbuf.h
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-01-25 11:52:56 +0000
committerglebius <glebius@FreeBSD.org>2013-01-25 11:52:56 +0000
commitff11706b2fb848c833874a27d918f24b88505bfb (patch)
tree40b66b6be0cafe2a06b3c31ae38473e492ccb136 /sys/sys/mbuf.h
parentdd0eb20382bcea2fc3cb1e28f4ff602a779604dc (diff)
downloadFreeBSD-src-ff11706b2fb848c833874a27d918f24b88505bfb.zip
FreeBSD-src-ff11706b2fb848c833874a27d918f24b88505bfb.tar.gz
In mbuf(9) API length is always integer. Thus, cast mbuf length
constants to be integers. Reviewed by: bde
Diffstat (limited to 'sys/sys/mbuf.h')
-rw-r--r--sys/sys/mbuf.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index e0be82c..af7f92b 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -52,11 +52,14 @@
* stored. Additionally, it is possible to allocate a separate buffer
* externally and attach it to the mbuf in a way similar to that of mbuf
* clusters.
+ *
+ * MLEN is data length in a normal mbuf.
+ * MHLEN is data length in an mbuf with pktheader.
+ * MINCLSIZE is a smallest amount of data that should be put into cluster.
*/
-#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */
-#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */
-#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */
-#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */
+#define MLEN ((int)(MSIZE - sizeof(struct m_hdr)))
+#define MHLEN ((int)(MLEN - sizeof(struct pkthdr)))
+#define MINCLSIZE (MHLEN + 1)
#ifdef _KERNEL
/*-
OpenPOWER on IntegriCloud