Thread (5 messages) flat view 5 messages, 2 authors, 2011-07-07

Re: [PATCH] lib/checksum.c: optimize do_csum a bit

From: David Miller <davem@davemloft.net>
Date: 2011-07-07 11:52:42
Also in: lkml

From: David Miller <davem@davemloft.net>
Date: Thu, 07 Jul 2011 04:36:25 -0700 (PDT)
From: Ian Abbott <abbotti@mev.co.uk>
Date: Thu, 7 Jul 2011 12:32:45 +0100
quoted
On 07/07/11 12:29, David Miller wrote:
quoted
From: Ian Abbott <abbotti@mev.co.uk>
Date: Thu, 7 Jul 2011 12:18:49 +0100
quoted
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.
Aha, yes that indeed makes it work.
I've applied this to net-next-2.6, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help