From 0216035e665dc869f340e168960a39630e822232 Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 9 Oct 2013 11:57:53 +0000 Subject: - 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) --- sys/sys/sockbuf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/sys/sockbuf.h') 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); -- cgit v1.1