summaryrefslogtreecommitdiffstats
path: root/sys/sys/sockbuf.h
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-10-09 11:57:53 +0000
committerglebius <glebius@FreeBSD.org>2013-10-09 11:57:53 +0000
commit0216035e665dc869f340e168960a39630e822232 (patch)
treef5a49eb40794fc5d8fcfb3ade6caa5b627ca38e1 /sys/sys/sockbuf.h
parentee2fafc6a903bcdb2569fc1d6c3ffce0f14c3ebd (diff)
downloadFreeBSD-src-0216035e665dc869f340e168960a39630e822232.zip
FreeBSD-src-0216035e665dc869f340e168960a39630e822232.tar.gz
- 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)
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 402a8f0..e716241 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);
OpenPOWER on IntegriCloud