Wei Yongjun <[EMAIL PROTECTED]> wrote: > > Yes, time_after() works correctly for values that wraparound. For examples: > if > time a = (unsigned long)(-1), and time b = 1; time_after(b, a) = true. > But if a is increaseing, after a circle of jiffies, a' = a + (unsigned > long)(-1) > + 1 = (unsigned long)(-1) = a, > this time a' is after b, but time_after(b, a') still equal to true,because > values that wraparound can not be making in time_after().
I think there are two problems here: 1) The first time we hit the check rate_last is zero. We should simply proceed with the redirect rather than treating this as a jiffies value. 2) When a dst is so old that the jiffies have wrapped around. I'm not sure whether this is worth solving as it should be extremely rare unless your HZ is sufficiently large and you're on a 32-bit platform. One solution would be to periodically reset the rate_last fields to their original states. Perhaps we can combine that with the GC. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html