Thread (14 messages) flat view 14 messages, 6 authors, 2016-01-07

Re: [PATCH v2 net-next] net: Implement fast csum_partial for x86_64

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-01-06 01:10:35

On 01/05/2016 02:18 PM, Eric Dumazet wrote:
On Tue, 2016-01-05 at 10:41 -0800, Tom Herbert wrote:
quoted
Implement assembly routine for csum_partial for 64 bit x86. This
primarily speeds up checksum calculation for smaller lengths such as
those that are present when doing skb_postpull_rcsum when getting
CHECKSUM_COMPLETE from device or after CHECKSUM_UNNECESSARY
conversion.
Very nice !


You might add a comment telling the '4' comes from length of 'adcq
6*8(%rdi),%rax' instruction, and that the 'nop' is to compensate that
'adcq    0*8(%rdi),%rax' is using 3 bytes instead.

We also could use .byte 0x48, 0x13, 0x47, 0x00 to force a 4 bytes
instruction and remove the nop.
Apparently "adcq.d8" will do The Right Thing for this.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help