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>
18 lines
324 B
C
18 lines
324 B
C
#ifndef _BITS_TCPIP_H
|
|
#define _BITS_TCPIP_H
|
|
|
|
/** @file
|
|
*
|
|
* Transport-network layer interface
|
|
*
|
|
*/
|
|
|
|
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 */
|