Module Name: src
Committed By: liamjfoy
Date: Mon Mar 23 18:43:20 UTC 2009
Modified Files:
src/sys/netinet6: in6_proto.c ip6_flow.c ip6_var.h
Log Message:
Init ip6flow pool dynamically instead of using a linkset.
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/netinet6/in6_proto.c
cvs rdiff -u -r1.17 -r1.18 src/sys/netinet6/ip6_flow.c
cvs rdiff -u -r1.51 -r1.52 src/sys/netinet6/ip6_var.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/in6_proto.c
diff -u src/sys/netinet6/in6_proto.c:1.83 src/sys/netinet6/in6_proto.c:1.84
--- src/sys/netinet6/in6_proto.c:1.83 Tue Nov 25 18:28:06 2008
+++ src/sys/netinet6/in6_proto.c Mon Mar 23 18:43:20 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_proto.c,v 1.83 2008/11/25 18:28:06 pooka Exp $ */
+/* $NetBSD: in6_proto.c,v 1.84 2009/03/23 18:43:20 liamjfoy Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.83 2008/11/25 18:28:06 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.84 2009/03/23 18:43:20 liamjfoy Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -229,6 +229,7 @@
{ .pr_domain = &inet6domain,
.pr_protocol = IPPROTO_IPV6,
.pr_slowtimo = ip6flow_slowtimo,
+ .pr_init = ip6flow_poolinit,
},
#endif /* GATEWAY */
{ .pr_type = SOCK_RAW,
Index: src/sys/netinet6/ip6_flow.c
diff -u src/sys/netinet6/ip6_flow.c:1.17 src/sys/netinet6/ip6_flow.c:1.18
--- src/sys/netinet6/ip6_flow.c:1.17 Mon Apr 28 20:24:10 2008
+++ src/sys/netinet6/ip6_flow.c Mon Mar 23 18:43:20 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_flow.c,v 1.17 2008/04/28 20:24:10 martin Exp $ */
+/* $NetBSD: ip6_flow.c,v 1.18 2009/03/23 18:43:20 liamjfoy Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.17 2008/04/28 20:24:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.18 2009/03/23 18:43:20 liamjfoy Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,8 +77,7 @@
* ether/fddi_input -> ip6flow_fastfoward -> if_output
*/
-POOL_INIT(ip6flow_pool, sizeof(struct ip6flow), 0, 0, 0, "ip6flowpl", NULL,
- IPL_NET);
+static struct pool ip6flow_pool;
LIST_HEAD(ip6flowhead, ip6flow);
@@ -164,6 +163,14 @@
return NULL;
}
+void
+ip6flow_poolinit(void)
+{
+
+ pool_init(&ip6flow_pool, sizeof(struct ip6flow), 0, 0, 0, "ip6flowpl",
+ NULL, IPL_NET);
+}
+
/*
* Allocate memory and initialise lists. This function is called
* from ip6_init and called there after to resize the hash table.
Index: src/sys/netinet6/ip6_var.h
diff -u src/sys/netinet6/ip6_var.h:1.51 src/sys/netinet6/ip6_var.h:1.52
--- src/sys/netinet6/ip6_var.h:1.51 Wed Aug 6 15:01:23 2008
+++ src/sys/netinet6/ip6_var.h Mon Mar 23 18:43:20 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_var.h,v 1.51 2008/08/06 15:01:23 plunky Exp $ */
+/* $NetBSD: ip6_var.h,v 1.52 2009/03/23 18:43:20 liamjfoy Exp $ */
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
/*
@@ -361,6 +361,7 @@
void frag6_drain(void);
int ip6flow_init(int);
+void ip6flow_poolinit(void);
struct ip6flow *ip6flow_reap(int);
void ip6flow_create(const struct route *, struct mbuf *);
void ip6flow_slowtimo(void);