]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: gro: do not use slow memcmp() in ipv6_gro_receive()
authorEric Dumazet <edumazet@google.com>
Tue, 6 Nov 2018 22:25:52 +0000 (14:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 22:59:27 +0000 (14:59 -0800)
commit3ad00a348c96144c12f5018385eef00d627917a4
tree8fd33e25e96051f31213de5f5f02ec2f03417a93
parentfb068e8a4bdb2a47aab0c2ba245b3d87986d2e5d
ipv6: gro: do not use slow memcmp() in ipv6_gro_receive()

ipv6_gro_receive() compares 34 bytes using slow memcmp(),
while handcoding with a couple of ipv6_addr_equal() is much faster.

Before this patch, "perf top -e cycles:pp -C <cpu>" would
see memcmp() using ~10% of cpu cycles on a 40Gbit NIC
receiving IPv6 TCP traffic.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_offload.c