lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 20 Mar 2014 11:49:01 -0700 From: Eric Dumazet <eric.dumazet@...il.com> To: Patrick McHardy <kaber@...sh.net>, Herbert Xu <herbert@...dor.apana.org.au>, "H.K. Jerry Chu" <hkchu@...gle.com>, Michael Dalton <mwdalton@...gle.com> Cc: netdev <netdev@...r.kernel.org> Subject: [RFC] csum experts, csum_replace2() is too expensive csum_replace2() uses about 29 cycles, while a plain ip_send_check() is way faster (16 cycles) csum_partial() is not really meant for doing checksums over 8 bytes ! Any idea how to make the thing really fast as intended ? I saw csum_partial() consuming 1% of cpu cycles in a GRO workload, that is insane... Following patch might be the fastest thing ? (At this point we already have validated IP checksum) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 8c54870db792..86c924c16f3c 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1434,8 +1434,8 @@ static int inet_gro_complete(struct sk_buff *skb, int nhoff) int proto = iph->protocol; int err = -ENOSYS; - csum_replace2(&iph->check, iph->tot_len, newlen); iph->tot_len = newlen; + ip_send_check(&iph); rcu_read_lock(); ops = rcu_dereference(inet_offloads[proto]); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists