From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 21:38:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B76CBB9E; Fri, 24 Apr 2015 21:38:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A688516C5; Fri, 24 Apr 2015 21:38:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OLcJRi036608; Fri, 24 Apr 2015 21:38:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OLcJeW036607; Fri, 24 Apr 2015 21:38:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504242138.t3OLcJeW036607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 21:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281951 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 21:38:19 -0000 Author: ngie Date: Fri Apr 24 21:38:18 2015 New Revision: 281951 URL: https://svnweb.freebsd.org/changeset/base/281951 Log: Backport MHSIZE/MPKTHSIZE equivalents from head These macros are equivalent to the ones on head, except they are only exposed when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed to userland as well This is for improved forwards compatibility with mbuf(9) macros in head@r277203+, and is required for a clean MFC of r279393 This is a direct commit to stable/10 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D2126 Reviewed by: glebius, rwatson Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/sys/mbuf.h Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Fri Apr 24 21:05:29 2015 (r281950) +++ stable/10/sys/sys/mbuf.h Fri Apr 24 21:38:18 2015 (r281951) @@ -206,6 +206,16 @@ struct mbuf { #define m_pktdat M_dat.MH.MH_dat.MH_databuf #define m_dat M_dat.M_databuf +/* + * NOTE: forwards compatibility definitions for mbuf(9) + * + * These aren't 1:1 with the macros in r277203; in particular they're exposed + * to both userland and kernel, whereas this is exposed to just _KERNEL -- to + * avoid disruption with existing KBI/KPIs + */ +#define MHSIZE offsetof(struct mbuf, m_dat) +#define MPKTHSIZE offsetof(struct mbuf, m_pktdat) + /* * mbuf flags of global significance and layer crossing. * Those of only protocol/layer specific significance are to be mapped