diff options
author | jmg <jmg@FreeBSD.org> | 2005-03-17 19:34:57 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2005-03-17 19:34:57 +0000 |
commit | 19da85af4a083ce6f05e67a3b9740ca3149f21c9 (patch) | |
tree | 82aef6788a453aea9f3b1916ad69603245947fb3 /share | |
parent | 755ffaa47d613fc8fe32776a907f4d8e7a8c9c4d (diff) | |
download | FreeBSD-src-19da85af4a083ce6f05e67a3b9740ca3149f21c9.zip FreeBSD-src-19da85af4a083ce6f05e67a3b9740ca3149f21c9.tar.gz |
add m_copyup function.. This can be used to help make our ip stack less
alignment restrictive, and help performance on some ethernet cards which
currently copy the entire packet a couple bytes to get the packet aligned
properly...
Wordsmithing by: dwhite
Obtained from: NetBSD (code only)
I'll clean it up later: rwatson
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/mbuf.9 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 0a7e580..e606232 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -95,6 +95,8 @@ .Ft struct mbuf * .Fn m_prepend "struct mbuf *mbuf" "int len" "int how" .Ft struct mbuf * +.Fn m_copyup "struct mbuf *mbuf" "int len" "int dstoff" +.Ft struct mbuf * .Fn m_pullup "struct mbuf *mbuf" "int len" .Ft struct mbuf * .Fn m_copym "struct mbuf *mbuf" "int offset" "int len" "int how" @@ -614,6 +616,33 @@ depending on the .Dv M_PKTHDR flag setting. .\" +.It Fn m_copyup mbuf len dstoff +Similar to +.Fn m_pullup +but copies +.Fa len +bytes of data into a new mbuf at +.Fa dstoff +bytes into the mbuf. +The +.Fa dstoff +argument aligns the data and leaves room for a link layer header. +Return the new +.Vt mbuf chain +on success, +and frees the +.Vt mbuf chain +and returns +.Dv NULL +on failure. +.Sy Note : +The function does not allocate +.Vt mbuf clusters , +so +.Fa len + dstoff +must be less than +.Dv MHLEN . +.\" .It Fn m_pullup mbuf len Arrange that the first .Fa len |