Commit 068f930d authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/network-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents 4cf24b4c 24bc83a5
......@@ -463,7 +463,9 @@ out: return ret;
*/
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);
......@@ -805,8 +807,7 @@ static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
* 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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment