Commit 5753fd38 authored by Cui Mingrui's avatar Cui Mingrui Committed by Zheng Zengkai
Browse files

sw64: optimize ip checksum calculation

Sunway inclusion
category: performance
bugzilla: https://gitee.com/openeuler/kernel/issues/I56W9F



--------------------------------

Function csum_partial_copy_from_user() copy data from userspace and
return checksum result. It used to read 8 bytes data from userspace
every time, calculate checksum and store it to the destination, which
slowed down the copying process. This patch moves the copying process
to the beginning. This patch also rewrites do_csum and move some common
codes to header file to avoid duplication.

Signed-off-by: default avatarCui Mingrui <cuimingrui@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 21dcff9d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment