From: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [UDP6]: Restore sk_filter optimisation
Date: Thu, 1 Nov 2007 22:34:14 +0900 [thread overview]
Message-ID: <20071101223414.3d9a92ec.mitch@linux.vnet.ibm.com> (raw)
In-Reply-To: <20071031144256.GA28137@gondor.apana.org.au>
On Wed, 31 Oct 2007 22:42:57 +0800
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Wed, Oct 31, 2007 at 11:05:45PM +0900, Mitsuru Chinen wrote:
> >
> > > > 1. udp6InDatagrams is incremented instead of udpInErrors
> > > > 2. In userland, recvfrom() replies an error with EAGAIN.
> > > > recvfrom() wasn't aware of such a packet before.
> > > >
> > > > Are these changes intentional?
> >
> > As far as I tested, this doesn't happen with the old code even if
> > a filter is attached. However, this happen with the new code
> > without a filter and I don't see this rather when a filter is
> > attached. So, I'm afraid it's new.
>
> Sorry, I read the patch the wrong way around :)
>
> 1) is just an accounting issue. It shouldn't be too difficult
> to fix it up. In fact, I think udpInErrors will still be
> incremented once we detect the error.
>
> 2) shouldn't be an issue because we've already solved the
> problem by making poll/select do the checksum verification
> before indiciating that the socket is readable.
>
> > > And, we're not sure how much the "optimization"'s benefit is.
> > > It is even worse when we are hand
>
> The checksum verification is costly because we have to bring
> the payload into cache. Since filters are very rare it's
> worthwhile to postpone the checksum verification for the common
> case.
>
> Also as a general rule, we want to avoid divergent behaviour
> between IPv4 and IPv6. So for changes like this we should
> really modify both stacks in future rather than have each
> stack do its own thing.
I got it. OK. I will submit a patch to postpone the udpInError
counter incrementation, either.
Thanks for your detailed explanation!
Best Regards,
----
Mitsuru Chinen <mitch@linux.vnet.ibm.com>
prev parent reply other threads:[~2007-11-01 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 1:20 [UDP6]: Restore sk_filter optimisation Herbert Xu
2007-03-07 4:30 ` David Miller
2007-10-29 6:33 ` Mitsuru Chinen
2007-10-29 6:41 ` YOSHIFUJI Hideaki / 吉藤英明
2007-10-29 12:53 ` Herbert Xu
2007-10-31 14:05 ` Mitsuru Chinen
2007-10-31 14:42 ` Herbert Xu
2007-11-01 13:34 ` Mitsuru Chinen [this message]
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=20071101223414.3d9a92ec.mitch@linux.vnet.ibm.com \
--to=mitch@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/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).