svn commit: r243215 - user/andre/tcp_workqueue/sys/sys

Andre Oppermann andre at FreeBSD.org
Sun Nov 18 12:17:08 UTC 2012


Author: andre
Date: Sun Nov 18 12:17:07 2012
New Revision: 243215
URL: http://svnweb.freebsd.org/changeset/base/243215

Log:
  Add mtodo(m, o, t) macro taking an additional offset into
  the mbuf data section before the casting to type 't'.

Modified:
  user/andre/tcp_workqueue/sys/sys/mbuf.h

Modified: user/andre/tcp_workqueue/sys/sys/mbuf.h
==============================================================================
--- user/andre/tcp_workqueue/sys/sys/mbuf.h	Sun Nov 18 12:16:50 2012	(r243214)
+++ user/andre/tcp_workqueue/sys/sys/mbuf.h	Sun Nov 18 12:17:07 2012	(r243215)
@@ -64,8 +64,10 @@
  * type:
  *
  * mtod(m, t)	-- Convert mbuf pointer to data pointer of correct type.
+ * mtodo(m, o, t) - Same as above but with offset 'o' into data.
  */
 #define	mtod(m, t)	((t)((m)->m_data))
+#define	mtodo(m, o, t)	((t)(((m)->m_data) + (o)))
 
 /*
  * Argument structure passed to UMA routines during mbuf and packet


More information about the svn-src-user mailing list