Module Name: src
Committed By: maxv
Date: Tue Apr 10 16:12:30 UTC 2018
Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile mbuf.9
src/sys/kern: uipc_mbuf.c
src/sys/sys: mbuf.h
Log Message:
Remove m_getclr. It is unused, confusing (vs m_clget), and is a weak
implementation (eg you can't request a zeroed pkthdr mbuf).
To generate a diff of this commit:
cvs rdiff -u -r1.2186 -r1.2187 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.418 -r1.419 src/share/man/man9/Makefile
cvs rdiff -u -r1.56 -r1.57 src/share/man/man9/mbuf.9
cvs rdiff -u -r1.186 -r1.187 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.181 -r1.182 src/sys/sys/mbuf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2186 src/distrib/sets/lists/comp/mi:1.2187
--- src/distrib/sets/lists/comp/mi:1.2186 Wed Apr 4 04:43:46 2018
+++ src/distrib/sets/lists/comp/mi Tue Apr 10 16:12:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2186 2018/04/04 04:43:46 kre Exp $
+# $NetBSD: mi,v 1.2187 2018/04/10 16:12:29 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@@ -11059,7 +11059,7 @@
./usr/share/man/cat9/m_free.0 comp-sys-catman .cat
./usr/share/man/cat9/m_freem.0 comp-sys-catman .cat
./usr/share/man/cat9/m_get.0 comp-sys-catman .cat
-./usr/share/man/cat9/m_getclr.0 comp-sys-catman .cat
+./usr/share/man/cat9/m_getclr.0 comp-obsolete obsolete
./usr/share/man/cat9/m_gethdr.0 comp-sys-catman .cat
./usr/share/man/cat9/m_makewritable.0 comp-sys-catman .cat
./usr/share/man/cat9/m_prepend.0 comp-sys-catman .cat
@@ -18738,7 +18738,7 @@
./usr/share/man/html9/m_free.html comp-sys-htmlman html
./usr/share/man/html9/m_freem.html comp-sys-htmlman html
./usr/share/man/html9/m_get.html comp-sys-htmlman html
-./usr/share/man/html9/m_getclr.html comp-sys-htmlman html
+./usr/share/man/html9/m_getclr.html comp-obsolete obsolete
./usr/share/man/html9/m_gethdr.html comp-sys-htmlman html
./usr/share/man/html9/m_makewritable.html comp-sys-htmlman html
./usr/share/man/html9/m_prepend.html comp-sys-htmlman html
@@ -26571,7 +26571,7 @@
./usr/share/man/man9/m_free.9 comp-sys-man .man
./usr/share/man/man9/m_freem.9 comp-sys-man .man
./usr/share/man/man9/m_get.9 comp-sys-man .man
-./usr/share/man/man9/m_getclr.9 comp-sys-man .man
+./usr/share/man/man9/m_getclr.9 comp-obsolete obsolete
./usr/share/man/man9/m_gethdr.9 comp-sys-man .man
./usr/share/man/man9/m_makewritable.9 comp-sys-man .man
./usr/share/man/man9/m_prepend.9 comp-sys-man .man
Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.418 src/share/man/man9/Makefile:1.419
--- src/share/man/man9/Makefile:1.418 Wed Jan 17 02:45:38 2018
+++ src/share/man/man9/Makefile Tue Apr 10 16:12:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.418 2018/01/17 02:45:38 maya Exp $
+# $NetBSD: Makefile,v 1.419 2018/04/10 16:12:29 maxv Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -489,7 +489,7 @@ MLINKS+=malloc.9 malloc_type_detach.9
MLINKS+=malloc.9 MALLOC_DEFINE.9
MLINKS+=malloc.9 MALLOC_DECLARE.9
MLINKS+=mb.9 mb_memory.9 mb.9 mb_read.9 mb.9 mb_write.9
-MLINKS+=mbuf.9 m_get.9 mbuf.9 m_getclr.9 mbuf.9 m_gethdr.9 mbuf.9 m_devget.9 \
+MLINKS+=mbuf.9 m_get.9 mbuf.9 m_gethdr.9 mbuf.9 m_devget.9 \
mbuf.9 m_copym.9 mbuf.9 m_copypacket.9 mbuf.9 m_copydata.9 \
mbuf.9 m_copyback.9 mbuf.9 m_cat.9 mbuf.9 m_dup.9 mbuf.9 m_prepend.9 \
mbuf.9 m_copyback_cow.9 \
Index: src/share/man/man9/mbuf.9
diff -u src/share/man/man9/mbuf.9:1.56 src/share/man/man9/mbuf.9:1.57
--- src/share/man/man9/mbuf.9:1.56 Thu Jan 25 09:33:21 2018
+++ src/share/man/man9/mbuf.9 Tue Apr 10 16:12:29 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: mbuf.9,v 1.56 2018/01/25 09:33:21 maxv Exp $
+.\" $NetBSD: mbuf.9,v 1.57 2018/04/10 16:12:29 maxv Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,13 +27,12 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 25, 2018
+.Dd April 10, 2018
.Dt MBUF 9
.Os
.Sh NAME
.Nm mbuf ,
.Nm m_get ,
-.Nm m_getclr ,
.Nm m_gethdr ,
.Nm m_devget ,
.Nm m_copym ,
@@ -73,8 +72,6 @@
.Ft struct mbuf *
.Fn m_get "int nowait" "int type"
.Ft struct mbuf *
-.Fn m_getclr "int nowait" "int type"
-.Ft struct mbuf *
.Fn m_gethdr "int nowait" "int type"
.Ft struct mbuf *
.Fn m_devget "char *buf" "int totlen" "int off0" "struct ifnet *ifp" "void (*copy)(const void *, void *, size_t)"
@@ -251,17 +248,6 @@ means the call cannot fail, but may take
The
.Fa type
parameter is an mbuf type.
-.It Fn m_getclr "int nowait" "int type"
-Allocates an mbuf and initializes it to contain internal data, then
-zeros the data area.
-The
-.Fa nowait
-parameter is a choice of
-.Dv M_WAIT / M_DONTWAIT
-from caller.
-The
-.Fa type
-parameter is an mbuf type.
.It Fn m_gethdr "int nowait" "int type"
Allocates an mbuf and initializes it to contain a packet header and internal
data.
Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.186 src/sys/kern/uipc_mbuf.c:1.187
--- src/sys/kern/uipc_mbuf.c:1.186 Tue Apr 10 15:29:46 2018
+++ src/sys/kern/uipc_mbuf.c Tue Apr 10 16:12:30 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.186 2018/04/10 15:29:46 maxv Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.187 2018/04/10 16:12:30 maxv Exp $ */
/*
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.186 2018/04/10 15:29:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.187 2018/04/10 16:12:30 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -643,18 +643,6 @@ m_gethdr(int nowait, int type)
return m;
}
-struct mbuf *
-m_getclr(int nowait, int type)
-{
- struct mbuf *m;
-
- m = m_get(nowait, type);
- if (m == NULL)
- return NULL;
- memset(mtod(m, void *), 0, MLEN);
- return m;
-}
-
void
m_clget(struct mbuf *m, int nowait)
{
Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.181 src/sys/sys/mbuf.h:1.182
--- src/sys/sys/mbuf.h:1.181 Tue Apr 10 15:27:35 2018
+++ src/sys/sys/mbuf.h Tue Apr 10 16:12:30 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.181 2018/04/10 15:27:35 maxv Exp $ */
+/* $NetBSD: mbuf.h,v 1.182 2018/04/10 16:12:30 maxv Exp $ */
/*
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -841,7 +841,6 @@ struct mbuf *m_devget(char *, int, int,
void (*copy)(const void *, void *, size_t));
struct mbuf *m_dup(struct mbuf *, int, int, int);
struct mbuf *m_get(int, int);
-struct mbuf *m_getclr(int, int);
struct mbuf *m_gethdr(int, int);
struct mbuf *m_prepend(struct mbuf *,int, int);
struct mbuf *m_pulldown(struct mbuf *, int, int, int *);