diff options
author | Andre Oppermann <andre@FreeBSD.org> | 2003-11-20 20:07:39 +0000 |
---|---|---|
committer | Andre Oppermann <andre@FreeBSD.org> | 2003-11-20 20:07:39 +0000 |
commit | 97d8d152c28bb596e1c310d9842db5d0314207b2 (patch) | |
tree | f947a08d66395dd498056038f0c360783fa281c7 /sys/net/route.h | |
parent | 26d02ca7babf8bb8d1e2b9c8cb3e18ec0fcd1317 (diff) | |
download | src-97d8d152c28bb596e1c310d9842db5d0314207b2.tar.gz src-97d8d152c28bb596e1c310d9842db5d0314207b2.zip |
Introduce tcp_hostcache and remove the tcp specific metrics from
the routing table. Move all usage and references in the tcp stack
from the routing table metrics to the tcp hostcache.
It caches measured parameters of past tcp sessions to provide better
initial start values for following connections from or to the same
source or destination. Depending on the network parameters to/from
the remote host this can lead to significant speedups for new tcp
connections after the first one because they inherit and shortcut
the learning curve.
tcp_hostcache is designed for multiple concurrent access in SMP
environments with high contention and is hash indexed by remote
ip address.
It removes significant locking requirements from the tcp stack with
regard to the routing table.
Reviewed by: sam (mentor), bms
Reviewed by: -net, -current, core@kame.net (IPv6 parts)
Approved by: re (scottl)
Notes
Notes:
svn path=/head/; revision=122922
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index 8fff56058dfd..34c33eb265e5 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -58,6 +58,12 @@ struct route { * These numbers are used by reliable protocols for determining * retransmission behavior and are included in the routing structure. */ +struct rt_metrics_lite { + u_long rmx_mtu; /* MTU for this path */ + u_long rmx_expire; /* lifetime for route, e.g. redirect */ + u_long rmx_pksent; /* packets sent using this route */ +}; + struct rt_metrics { u_long rmx_locks; /* Kernel must leave these values alone */ u_long rmx_mtu; /* MTU for this path */ @@ -104,10 +110,10 @@ struct rtentry { long rt_refcnt; /* # held references */ u_long rt_flags; /* up/down?, host/net */ struct ifnet *rt_ifp; /* the answer: interface to use */ - struct ifaddr *rt_ifa; /* the answer: interface to use */ + struct ifaddr *rt_ifa; /* the answer: interface address to use */ struct sockaddr *rt_genmask; /* for generation of cloned routes */ caddr_t rt_llinfo; /* pointer to link level info cache */ - struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */ + struct rt_metrics_lite rt_rmx; /* metrics used by rx'ing protocols */ struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */ int (*rt_output)(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); |