aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sockbuf.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-10-09 11:57:53 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-10-09 11:57:53 +0000
commit1d2df300e9b591f03281c085bf18fcac9c67b4c9 (patch)
treef5a49eb40794fc5d8fcfb3ade6caa5b627ca38e1 /sys/sys/sockbuf.h
parentf677a9e2672665f4eb3dd4111c07ee8f1f954262 (diff)
downloadsrc-1d2df300e9b591f03281c085bf18fcac9c67b4c9.tar.gz
src-1d2df300e9b591f03281c085bf18fcac9c67b4c9.zip
- Substitute sbdrop_internal() with sbcut_internal(). The latter doesn't free
mbufs, but return chain of free mbufs to a caller. Caller can either reuse them or return to allocator in a batch manner. - Implement sbdrop()/sbdrop_locked() as a wrapper around sbcut_internal(). - Expose sbcut_locked() for outside usage. Sponsored by: Netflix Sponsored by: Nginx, Inc. Approved by: re (marius)
Notes
Notes: svn path=/head/; revision=256185
Diffstat (limited to 'sys/sys/sockbuf.h')
-rw-r--r--sys/sys/sockbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index 402a8f0749f7..e7162418e67b 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -140,6 +140,8 @@ struct mbuf *
void sbdestroy(struct sockbuf *sb, struct socket *so);
void sbdrop(struct sockbuf *sb, int len);
void sbdrop_locked(struct sockbuf *sb, int len);
+struct mbuf *
+ sbcut_locked(struct sockbuf *sb, int len);
void sbdroprecord(struct sockbuf *sb);
void sbdroprecord_locked(struct sockbuf *sb);
void sbflush(struct sockbuf *sb);