From: Ian Abbott <abbotti@mev.co.uk>
To: David Miller <davem@davemloft.net>
Cc: Ian Abbott <ian.abbott@mev.co.uk>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lib/checksum.c: optimize do_csum a bit
Date: Thu, 7 Jul 2011 12:32:45 +0100 [thread overview]
Message-ID: <4E15995D.6040405@mev.co.uk> (raw)
In-Reply-To: <20110707.042925.1609726410655229616.davem@davemloft.net>
On 07/07/11 12:29, David Miller wrote:
> From: Ian Abbott <abbotti@mev.co.uk>
> Date: Thu, 7 Jul 2011 12:18:49 +0100
>
>> Reduce the number of variables modified by the loop in do_csum() by 1,
>> which seems like a good idea. On Nios II (a RISC CPU with 3-operand
>> instruction set) it reduces the loop from 7 to 6 instructions, including
>> the conditional branch.
>>
>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>
> I think you'll overshoot past the end of the buffer when there are
> trailing bytes to handle.
>
> The whole reason we need the count variable is to handle those
> kinds of cases.
I don't think it does. That's what the & ~3 was for.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
next prev parent reply other threads:[~2011-07-07 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 11:18 Ian Abbott
2011-07-07 11:29 ` David Miller
2011-07-07 11:32 ` Ian Abbott [this message]
2011-07-07 11:36 ` David Miller
2011-07-07 11:52 ` David Miller
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=4E15995D.6040405@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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
all inboxes | Powered by JetHome®