diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-04 15:14:47 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-04 15:14:47 +0000 |
commit | ed41469327bef074f42d569aee03907897699292 (patch) | |
tree | 7aa5af9b3e24c43d49fb01dcca5c75d54bab6174 /sys/netinet | |
parent | 1b9278cc989bd23a4e620f1b58d624819ca8e1c0 (diff) | |
download | FreeBSD-src-ed41469327bef074f42d569aee03907897699292.zip FreeBSD-src-ed41469327bef074f42d569aee03907897699292.tar.gz |
Merge r261582, r261601, r261610, r261613, r261627, r261640, r261641, r261823,
r261825, r261859, r261875, r261883, r261911, r262027, r262028, r262029,
r262030, r262162 from head.
Large flowtable revamp. See commit messages for merged revisions for
details.
Sponsored by: Netflix
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_input.c | 29 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 16 |
2 files changed, 3 insertions, 42 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index c265d02..cde30ee 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include <net/route.h> #include <net/netisr.h> #include <net/vnet.h> -#include <net/flowtable.h> #include <netinet/in.h> #include <netinet/in_kdtrace.h> @@ -198,16 +197,6 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW, "IP stealth mode, no TTL decrementation on forwarding"); #endif -#ifdef FLOWTABLE -static VNET_DEFINE(int, ip_output_flowtable_size) = 2048; -VNET_DEFINE(struct flowtable *, ip_ft); -#define V_ip_output_flowtable_size VNET(ip_output_flowtable_size) - -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, output_flowtable_size, CTLFLAG_RDTUN, - &VNET_NAME(ip_output_flowtable_size), 2048, - "number of entries in the per-cpu output flow caches"); -#endif - static void ip_freef(struct ipqhead *, struct ipq *); /* @@ -309,24 +298,6 @@ ip_init(void) printf("%s: WARNING: unable to register pfil hook, " "error %d\n", __func__, i); -#ifdef FLOWTABLE - if (TUNABLE_INT_FETCH("net.inet.ip.output_flowtable_size", - &V_ip_output_flowtable_size)) { - if (V_ip_output_flowtable_size < 256) - V_ip_output_flowtable_size = 256; - if (!powerof2(V_ip_output_flowtable_size)) { - printf("flowtable must be power of 2 size\n"); - V_ip_output_flowtable_size = 2048; - } - } else { - /* - * round up to the next power of 2 - */ - V_ip_output_flowtable_size = 1 << fls((1024 + maxusers * 64)-1); - } - V_ip_ft = flowtable_alloc("ipv4", V_ip_output_flowtable_size, FL_PCPU); -#endif - /* Skip initialization of globals for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 7764bc3..2d8be1b 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -32,6 +32,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_inet.h" #include "opt_ipfw.h" #include "opt_ipsec.h" #include "opt_kdtrace.h" @@ -154,19 +155,8 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, } #ifdef FLOWTABLE - if (ro->ro_rt == NULL) { - struct flentry *fle; - - /* - * The flow table returns route entries valid for up to 30 - * seconds; we rely on the remainder of ip_output() taking no - * longer than that long for the stability of ro_rt. The - * flow ID assignment must have happened before this point. - */ - fle = flowtable_lookup_mbuf(V_ip_ft, m, AF_INET); - if (fle != NULL) - flow_to_route(fle, ro); - } + if (ro->ro_rt == NULL) + (void )flowtable_lookup(AF_INET, m, ro); #endif if (opt) { |