patch-2.4.23 linux-2.4.23/net/ipv4/route.c
Next file: linux-2.4.23/net/ipv4/tcp_input.c
Previous file: linux-2.4.23/net/ipv4/netfilter/ipt_unclean.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/net/ipv4/route.c
- Orig date:
2003-08-25 04:44:44.000000000 -0700
diff -urN linux-2.4.22/net/ipv4/route.c linux-2.4.23/net/ipv4/route.c
@@ -375,7 +375,9 @@
*/
static inline u32 rt_score(struct rtable *rt)
{
- u32 score = rt->u.dst.__use;
+ u32 score = jiffies - rt->u.dst.lastuse;
+
+ score = ~score & ~(3<<30);
if (rt_valuable(rt))
score |= (1<<31);
@@ -703,8 +705,7 @@
* The second limit is less certain. At the moment it allows
* only 2 entries per bucket. We will see.
*/
- if (chain_length > ip_rt_gc_elasticity ||
- (chain_length > 1 && !(min_score & (1<<31)))) {
+ if (chain_length > ip_rt_gc_elasticity) {
*candp = cand->u.rt_next;
rt_free(cand);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)