From owner-svn-src-user@FreeBSD.ORG Mon Nov 19 11:45:12 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A710B9E3; Mon, 19 Nov 2012 11:45:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0848FC17; Mon, 19 Nov 2012 11:45:11 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id qAJBjAOp062131; Mon, 19 Nov 2012 15:45:10 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id qAJBjASU062130; Mon, 19 Nov 2012 15:45:10 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 19 Nov 2012 15:45:10 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r243215 - user/andre/tcp_workqueue/sys/sys Message-ID: <20121119114510.GQ38060@FreeBSD.org> References: <201211181217.qAICH7aH021497@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201211181217.qAICH7aH021497@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 11:45:12 -0000 On Sun, Nov 18, 2012 at 12:17:07PM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Sun Nov 18 12:17:07 2012 A> New Revision: 243215 A> URL: http://svnweb.freebsd.org/changeset/base/243215 A> A> Log: A> Add mtodo(m, o, t) macro taking an additional offset into A> the mbuf data section before the casting to type 't'. IMHO, argument order of (m, t, o) is more intuitive, since matches order of mtod(). A> A> Modified: A> user/andre/tcp_workqueue/sys/sys/mbuf.h A> A> Modified: user/andre/tcp_workqueue/sys/sys/mbuf.h A> ============================================================================== A> --- user/andre/tcp_workqueue/sys/sys/mbuf.h Sun Nov 18 12:16:50 2012 (r243214) A> +++ user/andre/tcp_workqueue/sys/sys/mbuf.h Sun Nov 18 12:17:07 2012 (r243215) A> @@ -64,8 +64,10 @@ A> * type: A> * A> * mtod(m, t) -- Convert mbuf pointer to data pointer of correct type. A> + * mtodo(m, o, t) - Same as above but with offset 'o' into data. A> */ A> #define mtod(m, t) ((t)((m)->m_data)) A> +#define mtodo(m, o, t) ((t)(((m)->m_data) + (o))) A> A> /* A> * Argument structure passed to UMA routines during mbuf and packet -- Totus tuus, Glebius.