Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Nov 2012 12:17:07 +0000 (UTC)
From:      Andre Oppermann <andre@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r243215 - user/andre/tcp_workqueue/sys/sys
Message-ID:  <201211181217.qAICH7aH021497@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211181217.qAICH7aH021497>