summaryrefslogtreecommitdiffstats
path: root/share/man/man9/mbuf.9
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2006-03-15 21:11:11 +0000
committersam <sam@FreeBSD.org>2006-03-15 21:11:11 +0000
commitbf44b2399142c5c19044b8ec077d24f575b4837d (patch)
tree37e73e0739c8cc965722137151fcc6b048436675 /share/man/man9/mbuf.9
parent1be90b4811c008a8b0eaf81db44a8b3d0ecf04b9 (diff)
downloadFreeBSD-src-bf44b2399142c5c19044b8ec077d24f575b4837d.zip
FreeBSD-src-bf44b2399142c5c19044b8ec077d24f575b4837d.tar.gz
promote fast ipsec's m_clone routine for public use; it is renamed
m_unshare and the caller can now control how mbufs are allocated Reviewed by: andre, luigi, mlaier MFC after: 1 week
Diffstat (limited to 'share/man/man9/mbuf.9')
-rw-r--r--share/man/man9/mbuf.924
1 files changed, 23 insertions, 1 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9
index 1074d85..e80df0d 100644
--- a/share/man/man9/mbuf.9
+++ b/share/man/man9/mbuf.9
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 18, 2005
+.Dd March 15, 2006
.Dt MBUF 9
.Os
.\"
@@ -132,6 +132,8 @@
.Fn m_getptr "struct mbuf *mbuf" "int loc" "int *off"
.Ft struct mbuf *
.Fn m_defrag "struct mbuf *m0" "int how"
+.Ft struct mbuf *
+.Fn m_unshare "struct mbuf *m0" "int how"
.\"
.Sh DESCRIPTION
An
@@ -886,6 +888,26 @@ 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_unshare m0 how
+Create a version of the specified mbuf chain whose
+contents can be safely modified without affecting other users.
+If allocation fails and this operation can not be completed,
+.Dv NULL
+will be returned.
+The original mbuf chain is always reclaimed and the reference
+count of any shared mbuf clusters is decremented.
+.Fa how
+should be either
+.Dv M_TRYWAIT
+or
+.Dv M_DONTWAIT ,
+depending on the caller's preference.
+As a side-effect of this process the returned
+mbuf chain may be compacted.
+.Pp
+This function is especially useful in the transmit path of
+network code, when data must be encrypted or otherwise
+altered prior to transmission.
.El
.Sh HARDWARE-ASSISTED CHECKSUM CALCULATION
This section currently applies to TCP/IP only.
OpenPOWER on IntegriCloud