diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-11-11 02:52:40 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-11-11 02:52:40 +0000 |
commit | 12580bcaa8a78094978261a456034eb3684e9f58 (patch) | |
tree | 03ac2d127be5e5ef838975d007a62d8250819cc3 /sys/netinet6/in6_rmx.c | |
parent | 42e544acc78653110a142e99a4c7ce581b8e3689 (diff) | |
download | FreeBSD-src-12580bcaa8a78094978261a456034eb3684e9f58.zip FreeBSD-src-12580bcaa8a78094978261a456034eb3684e9f58.tar.gz |
Kill custom in_matroute() radix mathing function removing one rte mutex lock.
Initially in_matrote() in_clsroute() in their current state was introduced by
r4105 20 years ago. Instead of deleting inactive routes immediately, we kept them
in route table, setting RTPRF_OURS flag and some expire time. After that, either
GC came or RTPRF_OURS got removed on first-packet. It was a good solution
in that days (and probably another decade after that) to keep TCP metrics.
However, after moving metrics to TCP hostcache in r122922, most of in_rmx
functionality became unused. It might had been used for flushing icmp-originated
routes before rte mutexes/refcounting, but I'm not sure about that.
So it looks like this is nearly impossible to make GC do its work nowadays:
in_rtkill() ignores non-RTPRF_OURS routes.
route can only become RTPRF_OURS after dropping last reference via rtfree()
which calls in_clsroute(), which, it turn, ignores UP and non-RTF_DYNAMIC routes.
Dynamic routes can still be installed via received redirect, but they
have default lifetime (no specific rt_expire) and no one has another trie walker
to call RTFREE() on them.
So, the changelist:
* remove custom rnh_match / rnh_close matching function.
* remove all GC functions
* partially revert r256695 (proto3 is no more used inside kernel,
it is not possible to use rt_expire from user point of view, proto3 support
is not complete)
* Finish r241884 (similar to this commit) and remove remaining IPv6 parts
MFC after: 1 month
Diffstat (limited to 'sys/netinet6/in6_rmx.c')
-rw-r--r-- | sys/netinet6/in6_rmx.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index c96db6f..1403647 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kernel.h> #include <sys/lock.h> -#include <sys/sysctl.h> #include <sys/queue.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -179,24 +178,6 @@ in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, return (ret); } -SYSCTL_DECL(_net_inet6_ip6); - -static VNET_DEFINE(int, rtq_toomany6) = 128; - /* 128 cached routes is ``too many'' */ -#define V_rtq_toomany6 VNET(rtq_toomany6) -SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(rtq_toomany6) , 0, ""); - -struct rtqk_arg { - struct radix_node_head *rnh; - int mode; - int updating; - int draining; - int killed; - int found; - time_t nextstop; -}; - /* * Age old PMTUs. */ |