Date: Thu, 12 Mar 2015 01:05:54 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279896 - head/share/man/man9 Message-ID: <201503120105.t2C15sAF046199@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Mar 12 01:05:54 2015 New Revision: 279896 URL: https://svnweb.freebsd.org/changeset/base/279896 Log: Document m_collapse(). Reported by: kmacy Reviewed by: kmacy MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/mbuf.9 Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Thu Mar 12 01:03:04 2015 (r279895) +++ head/share/man/man9/mbuf.9 Thu Mar 12 01:05:54 2015 (r279896) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2015 +.Dd March 11, 2015 .Dt MBUF 9 .Os .\" @@ -141,6 +141,8 @@ .Ft struct mbuf * .Fn m_defrag "struct mbuf *m0" "int how" .Ft struct mbuf * +.Fn m_collapse "struct mbuf *m0" "int how" "int maxfrags" +.Ft struct mbuf * .Fn m_unshare "struct mbuf *m0" "int how" .\" .Sh DESCRIPTION @@ -983,6 +985,20 @@ depending on the caller's preference. This function is especially useful in network drivers, where certain long mbuf chains must be shortened before being added to TX descriptor lists. +.It Fn m_collapse m0 how maxfrags +Defragment an mbuf chain, returning a chain of at most +.Fa maxfrags +mbufs and clusters. +If allocation fails or the chain cannot be collapsed as requested, +.Dv NULL +will be returned, with the original chain possibly modified. +As with +.Fn m_defrag , +.Fa how +should be one of +.Dv M_WAITOK +or +.Dv M_NOWAIT . .It Fn m_unshare m0 how Create a version of the specified mbuf chain whose contents can be safely modified without affecting other users.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503120105.t2C15sAF046199>