Date: Fri, 24 Apr 2015 21:38:19 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> 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 Message-ID: <201504242138.t3OLcJeW036607@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504242138.t3OLcJeW036607>