summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-06-12 20:46:36 +0000
committerbz <bz@FreeBSD.org>2009-06-12 20:46:36 +0000
commit64d1a840734da28ba4d1f2510cb98a5c811446f0 (patch)
tree5ff1b55ac9b7429ea017f9890d322a9ffbd67ae6 /sys/netinet/ip_input.c
parent0e4ff69bbaf0a890087aaa913e3afc146145e5d5 (diff)
downloadFreeBSD-src-64d1a840734da28ba4d1f2510cb98a5c811446f0.zip
FreeBSD-src-64d1a840734da28ba4d1f2510cb98a5c811446f0.tar.gz
Move the kernel option FLOWTABLE chacking from the header file to the
actual implementation. Remove the accessor functions for the compiled out case, just returning "unavail" values. Remove the kernel conditional from the header file as it is no longer needed, only leaving the externs. Hide the improperly virtualized SYSCTL/TUNABLE for the flowtable size under the kernel option as well. Reviewed by: rwatson
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index bdc0c6d..6af99b1 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -206,16 +206,19 @@ SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW,
SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW,
ipstealth, 0, "IP stealth mode, no TTL decrementation on forwarding");
#endif
+#ifdef FLOWTABLE
static int ip_output_flowtable_size = 2048;
TUNABLE_INT("net.inet.ip.output_flowtable_size", &ip_output_flowtable_size);
SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, output_flowtable_size,
CTLFLAG_RDTUN, ip_output_flowtable_size, 2048,
"number of entries in the per-cpu output flow caches");
+struct flowtable *ip_ft;
+#endif
+
#ifdef VIMAGE_GLOBALS
int fw_one_pass;
#endif
-struct flowtable *ip_ft;
static void ip_freef(struct ipqhead *, struct ipq *);
@@ -374,7 +377,9 @@ ip_init(void)
/* Initialize various other remaining things. */
IPQ_LOCK_INIT();
netisr_register(&ip_nh);
+#ifdef FLOWTABLE
ip_ft = flowtable_alloc(ip_output_flowtable_size, FL_PCPU);
+#endif
}
void
OpenPOWER on IntegriCloud