diff options
author | Eric Dumazet <edumazet@google.com> | 2014-03-24 02:51:36 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-24 04:18:44 (GMT) |
commit | 99f0b958b194f7d88973f1c2190d207e0a2c7e79 (patch) | |
tree | f76073a45af1840a773084b039c53f7b7db58fb5 /scripts/recordmcount.c | |
parent | 860b4042ddec744de52461f91c869630b1bb23c2 (diff) | |
download | linux-99f0b958b194f7d88973f1c2190d207e0a2c7e79.tar.xz |
net: optimize csum_replace2()
When changing one 16bit value by another in IP header, we can adjust
the IP checksum by doing a simple operation described in RFC 1624, as
reminded by David.
csum_partial() is a complex function on x86_64, not really suited for
small number of checksummed bytes.
I spotted csum_partial() being in the top 20 most consuming functions
(more than 1 %) in a GRO workload, which was rather unexpected.
The caller was inet_gro_complete() doing a csum_replace2() when
building the new IP header for the GRO packet.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/recordmcount.c')
0 files changed, 0 insertions, 0 deletions