svn commit: r300262 - in head/sys: kern netinet6 sys
Mark Johnston
markj at FreeBSD.org
Fri May 20 04:45:10 UTC 2016
Author: markj
Date: Fri May 20 04:45:08 2016
New Revision: 300262
URL: https://svnweb.freebsd.org/changeset/base/300262
Log:
Move IPv6 malloc tag definitions into the IPv6 code.
Modified:
head/sys/kern/kern_malloc.c
head/sys/netinet6/ip6_output.c
head/sys/netinet6/nd6.c
head/sys/netinet6/nd6.h
head/sys/sys/malloc.h
Modified: head/sys/kern/kern_malloc.c
==============================================================================
--- head/sys/kern/kern_malloc.c Fri May 20 04:43:56 2016 (r300261)
+++ head/sys/kern/kern_malloc.c Fri May 20 04:45:08 2016 (r300262)
@@ -110,9 +110,6 @@ MALLOC_DEFINE(M_CACHE, "cache", "Various
MALLOC_DEFINE(M_DEVBUF, "devbuf", "device driver memory");
MALLOC_DEFINE(M_TEMP, "temp", "misc temporary data buffers");
-MALLOC_DEFINE(M_IP6OPT, "ip6opt", "IPv6 options");
-MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 Neighbor Discovery");
-
static struct malloc_type *kmemstatistics;
static int kmemcount;
Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c Fri May 20 04:43:56 2016 (r300261)
+++ head/sys/netinet6/ip6_output.c Fri May 20 04:45:08 2016 (r300262)
@@ -135,6 +135,8 @@ struct ip6_exthdrs {
struct mbuf *ip6e_dest2;
};
+static MALLOC_DEFINE(M_IP6OPT, "ip6opt", "IPv6 options");
+
static int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **,
struct ucred *, int);
static int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *,
Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c Fri May 20 04:43:56 2016 (r300261)
+++ head/sys/netinet6/nd6.c Fri May 20 04:45:08 2016 (r300262)
@@ -85,6 +85,8 @@ __FBSDID("$FreeBSD$");
#define SIN6(s) ((const struct sockaddr_in6 *)(s))
+MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 Neighbor Discovery");
+
/* timer values */
VNET_DEFINE(int, nd6_prune) = 1; /* walk list every 1 seconds */
VNET_DEFINE(int, nd6_delay) = 5; /* delay first probe time 5 second */
Modified: head/sys/netinet6/nd6.h
==============================================================================
--- head/sys/netinet6/nd6.h Fri May 20 04:43:56 2016 (r300261)
+++ head/sys/netinet6/nd6.h Fri May 20 04:45:08 2016 (r300262)
@@ -316,6 +316,10 @@ struct nd_pfxrouter {
LIST_HEAD(nd_prhead, nd_prefix);
+#ifdef MALLOC_DECLARE
+MALLOC_DECLARE(M_IP6NDP);
+#endif
+
/* nd6.c */
VNET_DECLARE(int, nd6_prune);
VNET_DECLARE(int, nd6_delay);
Modified: head/sys/sys/malloc.h
==============================================================================
--- head/sys/sys/malloc.h Fri May 20 04:43:56 2016 (r300261)
+++ head/sys/sys/malloc.h Fri May 20 04:45:08 2016 (r300262)
@@ -146,9 +146,6 @@ MALLOC_DECLARE(M_CACHE);
MALLOC_DECLARE(M_DEVBUF);
MALLOC_DECLARE(M_TEMP);
-MALLOC_DECLARE(M_IP6OPT); /* for INET6 */
-MALLOC_DECLARE(M_IP6NDP); /* for INET6 */
-
/*
* Deprecated macro versions of not-quite-malloc() and free().
*/
More information about the svn-src-all
mailing list