]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 22 Sep 2015 14:34:27 +0000 (16:34 +0200)
committerScott Wood <oss@buserror.net>
Sat, 5 Mar 2016 04:53:27 +0000 (22:53 -0600)
commit7aef4136566b0539a1a98391181e188905e33401
treeb088e0b9ae9a50d68c6ff8ba1fbbb175c9d15a98
parent37e08cad8f177f7bf6226a9b3724234ac3d3c81d
powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user()

csum_partial_copy_generic() does the same as copy_tofrom_user and also
calculates the checksum during the copy. Unlike copy_tofrom_user(),
the existing version of csum_partial_copy_generic() doesn't take
benefit of the cache.

This patch is a rewrite of csum_partial_copy_generic() based on
copy_tofrom_user().
The previous version of csum_partial_copy_generic() was handling
errors. Now we have the checksum wrapper functions to handle the error
case like in powerpc64 so we can make the error case simple:
just return -EFAULT.
copy_tofrom_user() only has r12 available => we use it for the
checksum r7 and r8 which contains pointers to error feedback are used,
so we stack them.

On a TCP benchmark using socklib on the loopback interface on which
checksum offload and scatter/gather have been deactivated, we get
about 20% performance increase.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/lib/checksum_32.S