netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Timo Teräs" <timo.teras@iki.fi>
Cc: "\"Chung-Yih Wang (王崇懿)\"" <cywang@google.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: Regarding to your linux kernel CL
Date: Wed, 6 Oct 2010 15:59:46 +0800	[thread overview]
Message-ID: <20101006075946.GA5311@gondor.apana.org.au> (raw)
In-Reply-To: <4CAC1F20.6070009@iki.fi>

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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2010-10-06  7:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikdcL0JQgkR6u0qtmDu-phMZ6-Juq91B1N5GfiY@mail.gmail.com>
2010-10-05 16:42 ` Fwd: Regarding to your linux kernel CL Chung-Yih Wang (王崇懿)
2010-10-06  7:02 ` Timo Teräs
2010-10-06  7:59   ` Herbert Xu [this message]
2010-10-06  8:04     ` Chung-Yih Wang (王崇懿)
2010-10-06  8:14     ` David Miller
2010-10-06 21:23       ` Chung-Yih Wang (王崇懿)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101006075946.GA5311@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=cywang@google.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=timo.teras@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).