summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2014-09-23 10:54:32 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-26 22:14:16 +0200
commit4565af0d406bed44bc8756230eae8f7caa5e0334 (patch)
tree23461c0db192f9ed959e06c48d2501f4a3f61cba /net/core
parentMerge branch 'fec' (diff)
downloadlinux-4565af0d406bed44bc8756230eae8f7caa5e0334.tar.xz
linux-4565af0d406bed44bc8756230eae8f7caa5e0334.zip
net: optimise csum_replace4()
csum_partial() is a generic function which is not optimised for small fixed length calculations, and its use requires to store "from" and "to" values in memory while we already have them available in registers. This also has impact, especially on RISC processors. In the same spirit as the change done by Eric Dumazet on csum_replace2(), this patch rewrites inet_proto_csum_replace4() taking into account RFC1624. I spotted during a NATted tcp transfert that csum_partial() is one of top 5 consuming functions (around 8%), and the second user of csum_partial() is inet_proto_csum_replace4(). I have proposed the same modification to inet_proto_csum_replace4() in another patch. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions