svn commit: r194549 - head/sys/sys

Robert Watson rwatson at FreeBSD.org
Sat Jun 20 18:27:20 UTC 2009


Author: rwatson
Date: Sat Jun 20 18:27:19 2009
New Revision: 194549
URL: http://svn.freebsd.org/changeset/base/194549

Log:
  Remove definition of dtom(), which converted a data pointer into a
  pointer to the containing mbuf.  This eliminates a strong assumption
  about the layout of network buffer memory, giving us greater
  flexibility to revise mbuf semantics in the future.

Modified:
  head/sys/sys/mbuf.h

Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h	Sat Jun 20 18:24:29 2009	(r194548)
+++ head/sys/sys/mbuf.h	Sat Jun 20 18:27:19 2009	(r194549)
@@ -60,12 +60,12 @@
 
 #ifdef _KERNEL
 /*-
- * Macros for type conversion:
+ * Macro for type conversion: convert mbuf pointer to data pointer of correct
+ * type:
+ *
  * mtod(m, t)	-- Convert mbuf pointer to data pointer of correct type.
- * dtom(x)	-- Convert data pointer within mbuf to mbuf pointer (XXX).
  */
 #define	mtod(m, t)	((t)((m)->m_data))
-#define	dtom(x)		((struct mbuf *)((intptr_t)(x) & ~(MSIZE-1)))
 
 /*
  * Argument structure passed to UMA routines during mbuf and packet


More information about the svn-src-head mailing list