summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_input.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2010-05-09 20:32:00 +0000
committerkmacy <kmacy@FreeBSD.org>2010-05-09 20:32:00 +0000
commit9cddffd4052412240a90b2fe46064f3edbe2503c (patch)
treee9564bfe1f87215861fc27259d06c589d937820a /sys/netinet6/ip6_input.c
parenta4f5ad53c12ddff14c908f2bc5a5f9373be93d19 (diff)
downloadFreeBSD-src-9cddffd4052412240a90b2fe46064f3edbe2503c.zip
FreeBSD-src-9cddffd4052412240a90b2fe46064f3edbe2503c.tar.gz
Add flowtable support to IPv6
Tested by: qingli@ Reviewed by: qingli@ MFC after: 3 days
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r--sys/netinet6/ip6_input.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 42f9351..088e6fa 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
+#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -113,6 +114,12 @@ __FBSDID("$FreeBSD$");
#include <netinet6/ip6protosw.h>
+#ifdef FLOWTABLE
+#include <net/flowtable.h>
+extern VNET_DEFINE(int, ip6_output_flowtable_size);
+#define V_ip6_output_flowtable_size VNET(ip6_output_flowtable_size)
+#endif
+
extern struct domain inet6domain;
u_char ip6_protox[IPPROTO_MAX];
@@ -169,6 +176,12 @@ ip6_init(void)
nd6_init();
frag6_init();
+#ifdef FLOWTABLE
+ TUNABLE_INT_FETCH("net.inet6.ip6.output_flowtable_size",
+ &V_ip6_output_flowtable_size);
+ V_ip6_ft = flowtable_alloc("ipv6", V_ip6_output_flowtable_size, FL_PCPU);
+#endif
+
V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR;
/* Skip global initialization stuff for non-default instances. */
OpenPOWER on IntegriCloud