mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
[tcpip] Allow for architecture-specific TCP/IP checksum routines
Calculating the TCP/IP checksum on received packets accounts for a substantial fraction of the response latency. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -97,8 +97,8 @@ int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip_protocol,
|
||||
* or both. Deciding which to swap is left as an exercise for the
|
||||
* interested reader.
|
||||
*/
|
||||
uint16_t tcpip_continue_chksum ( uint16_t partial, const void *data,
|
||||
size_t len ) {
|
||||
uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
|
||||
const void *data, size_t len ) {
|
||||
unsigned int cksum = ( ( ~partial ) & 0xffff );
|
||||
unsigned int value;
|
||||
unsigned int i;
|
||||
|
||||
Reference in New Issue
Block a user