mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 17:12:40 +03:00
[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>
This commit is contained in:
@@ -9,4 +9,9 @@
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
extern uint16_t x86_tcpip_continue_chksum ( uint16_t partial,
|
||||
const void *data, size_t len );
|
||||
|
||||
#define tcpip_continue_chksum x86_tcpip_continue_chksum
|
||||
|
||||
#endif /* _BITS_TCPIP_H */
|
||||
|
||||
Reference in New Issue
Block a user