summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2016-05-04 14:30:37 +0200
committerMichael Brown2016-05-04 14:38:25 +0200
commit1e066431a45a67321abcd134e888205fc633bd41 (patch)
treeb627341e05eae7cdd99fc5ce6dfd9cb8ef218e0a /src/arch
parent[build] Remove unnecessary dependency on zlib (diff)
downloadipxe-1e066431a45a67321abcd134e888205fc633bd41.tar.gz
ipxe-1e066431a45a67321abcd134e888205fc633bd41.tar.xz
ipxe-1e066431a45a67321abcd134e888205fc633bd41.zip
[tcpip] Do not fall back to using unoptimised TCP/IP checksumming
Require architecture-specific code to make a deliberate choice to use the unoptimised generic_tcpip_continue_chksum() function, if there is no optimised version available. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/core/x86_tcpip.c4
-rw-r--r--src/arch/x86/include/bits/tcpip.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/arch/x86/core/x86_tcpip.c b/src/arch/x86/core/x86_tcpip.c
index 88042f5f..ed323d5d 100644
--- a/src/arch/x86/core/x86_tcpip.c
+++ b/src/arch/x86/core/x86_tcpip.c
@@ -42,8 +42,8 @@ extern char x86_tcpip_loop_end[];
* @v len Length of data buffer
* @ret cksum Updated checksum, in network byte order
*/
-uint16_t x86_tcpip_continue_chksum ( uint16_t partial,
- const void *data, size_t len ) {
+uint16_t tcpip_continue_chksum ( uint16_t partial, const void *data,
+ size_t len ) {
unsigned long sum = ( ( ~partial ) & 0xffff );
unsigned long initial_word_count;
unsigned long loop_count;
diff --git a/src/arch/x86/include/bits/tcpip.h b/src/arch/x86/include/bits/tcpip.h
index 5c2baffc..0ac55b1a 100644
--- a/src/arch/x86/include/bits/tcpip.h
+++ b/src/arch/x86/include/bits/tcpip.h
@@ -9,9 +9,7 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-extern uint16_t x86_tcpip_continue_chksum ( uint16_t partial,
- const void *data, size_t len );
-
-#define tcpip_continue_chksum x86_tcpip_continue_chksum
+extern uint16_t tcpip_continue_chksum ( uint16_t partial, const void *data,
+ size_t len );
#endif /* _BITS_TCPIP_H */