]> git.baikalelectronics.ru Git - kernel.git/commit
net: avoid indirect calls in L4 checksum calculation
authorMatteo Croce <mcroce@redhat.com>
Wed, 29 May 2019 15:13:48 +0000 (17:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2019 21:34:12 +0000 (14:34 -0700)
commitcde2b040f47256e89a66ddfbada1bb0433afcbf3
tree9e02d96d00ac7b635b45fd8358d9102b65dbab46
parent693cb58b56e6e688f7e7ebd9200cb9551e7e0e3a
net: avoid indirect calls in L4 checksum calculation

Commit b57b27e08de2 ("indirect call wrappers: helpers to speed-up
indirect calls of builtin") introduces some macros to avoid doing
indirect calls.

Use these helpers to remove two indirect calls in the L4 checksum
calculation for devices which don't have hardware support for it.

As a test I generate packets with pktgen out to a dummy interface
with HW checksumming disabled, to have the checksum calculated in
every sent packet.
The packet rate measured with an i7-6700K CPU and a single pktgen
thread raised from 6143 to 6608 Kpps, an increase by 7.5%

Suggested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c