Skip to content
Commit 5d4acb62 authored by Noah Goldstein's avatar Noah Goldstein Committed by Linus Torvalds
Browse files

x86/csum: Remove unnecessary odd handling



The special case for odd aligned buffers is unnecessary and mostly
just adds overhead. Aligned buffers is the expectations, and even for
unaligned buffer, the only case that was helped is if the buffer was
1-byte from word aligned which is ~1/7 of the cases. Overall it seems
highly unlikely to be worth to extra branch.

It was left in the previous perf improvement patch because I was
erroneously comparing the exact output of `csum_partial(...)`, but
really we only need `csum_fold(csum_partial(...))` to match so its
safe to remove.

All csum kunit tests pass.

Signed-off-by: default avatarNoah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarDavid Laight <david.laight@aculab.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5eff55d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment