Date: Sat, 20 Jun 2009 18:27:19 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194549 - head/sys/sys Message-ID: <200906201827.n5KIRJFD083486@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906201827.n5KIRJFD083486>