]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[tcpip] Add faster algorithm for calculating the TCP/IP checksum
authorMichael Brown <mcb30@ipxe.org>
Tue, 26 Jun 2012 16:19:18 +0000 (17:19 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 28 Jun 2012 15:02:31 +0000 (16:02 +0100)
commitec22e08db1fa61f5276b2ed1efbde28a1a45101e
treef8e65353e71dee19449d2934fefd684ed101f386
parentbb9961fb548068f769c666970c1de6c68743ed07
[tcpip] Add faster algorithm for calculating the TCP/IP checksum

The generic TCP/IP checksum implementation requires approximately 10
CPU clocks per byte (as measured using the TSC).  Improve this to
approximately 0.5 CPU clocks per byte by using "lodsl ; adcl" in an
unrolled loop.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/core/x86_tcpip.c [new file with mode: 0644]
src/arch/x86/include/bits/tcpip.h