[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101006075946.GA5311@gondor.apana.org.au>
Date: Wed, 6 Oct 2010 15:59:46 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Timo Teräs <timo.teras@....fi>
Cc: "Chung-Yih Wang (王崇懿)"
<cywang@...gle.com>, davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: Regarding to your linux kernel CL
On Wed, Oct 06, 2010 at 10:02:56AM +0300, Timo Teräs wrote:
>
> What's the problem here? sk_dst_check not honoring if dst->obsolete>0 ?
> Sounds like the sk_dst_check was buggy in the first place.
Well the problem is that before we changed ip4_dst_check, everything
worked properly. With IPv6, whenever a route is released, the serial
number is always updated accordingly. This means that ip6_dst_check
will always return NULL when obsolete > 1.
The old ip4_dst_check also satisfied this requirement since it always
returns NULL.
> Looks like there's still some code around that does not do what the
> obsolete field has been used for a long time.
> obsolete = 0, dst entry is ok
> obsolete = -1, you need to call ops->check for this entry
> obsolete > 0, this entry is invalid
>
> So net/core/sock.c needs fixing. Just if we should change dst_check()
> too, I'm not sure.
>
> Should we fix sk_dst_check to use dst_check(), and dst_check() to check
> for dst->obsolete>0 ?
Yes this should work too. However, I was never totally happy with
this new dst->obsolete logic which means that we're doing an
indirect call for every single packet which almost always does
nothing.
Perhaps we should move the genid/cookie logic into the dst so that
we can eliminate the dst->check call or at least make it a lot less
frequent.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists