summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-03-19 23:07:04 +0000
committermarkj <markj@FreeBSD.org>2015-03-19 23:07:04 +0000
commit3ea05b558ba577d5c1c574a8161bc0d089290ea5 (patch)
tree5cd4498f1bc879fc225419b5a1dcdcdd18c1e23c /share
parentfc2b8b39295ae7b252b4d347ec1ae0f8809bcf28 (diff)
downloadFreeBSD-src-3ea05b558ba577d5c1c574a8161bc0d089290ea5.zip
FreeBSD-src-3ea05b558ba577d5c1c574a8161bc0d089290ea5.tar.gz
MFC r279896:
Document m_collapse().
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/mbuf.918
1 files changed, 17 insertions, 1 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9
index 42fe372..fd2dddc 100644
--- a/share/man/man9/mbuf.9
+++ b/share/man/man9/mbuf.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 13, 2012
+.Dd March 11, 2015
.Dt MBUF 9
.Os
.\"
@@ -136,6 +136,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
@@ -974,6 +976,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.
OpenPOWER on IntegriCloud