Date: Fri, 9 Jan 2015 15:21:54 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276888 - head/sys/sys Message-ID: <201501091521.t09FLsfj019832@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Fri Jan 9 15:21:53 2015 New Revision: 276888 URL: https://svnweb.freebsd.org/changeset/base/276888 Log: Uninline M_SIZE() in m_align() to reduce direct use of MLEN and MHLEN. Differential Revision: https://reviews.freebsd.org/D1471 Reviewed by: glebius, bz, rpaulo Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri Jan 9 14:50:08 2015 (r276887) +++ head/sys/sys/mbuf.h Fri Jan 9 15:21:53 2015 (r276888) @@ -848,14 +848,7 @@ m_align(struct mbuf *m, int len) KASSERT(m->m_data == M_START(m), (msg, __func__)); - if (m->m_flags & M_EXT) { - adjust = m->m_ext.ext_size - len; - } else if (m->m_flags & M_PKTHDR) { - adjust = MHLEN - len; - } else { - adjust = MLEN - len; - } - + adjust = M_SIZE(m) - len; m->m_data += adjust &~ (sizeof(long)-1); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501091521.t09FLsfj019832>