xref: /linux/arch/hexagon/include/asm/checksum.h (revision 95298d63c67673c654c08952672d016212b26054)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef _ASM_CHECKSUM_H
7 #define _ASM_CHECKSUM_H
8 
9 #define do_csum	do_csum
10 unsigned int do_csum(const void *voidptr, int len);
11 
12 /*
13  * the same as csum_partial, but copies from src while it
14  * checksums
15  *
16  * here even more important to align src and dst on a 32-bit (or even
17  * better 64-bit) boundary
18  */
19 #define csum_partial_copy_nocheck csum_partial_copy_nocheck
20 __wsum csum_partial_copy_nocheck(const void *src, void *dst,
21 					int len, __wsum sum);
22 
23 /*
24  * computes the checksum of the TCP/UDP pseudo-header
25  * returns a 16-bit checksum, already complemented
26  */
27 #define csum_tcpudp_nofold csum_tcpudp_nofold
28 __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
29 			  __u32 len, __u8 proto, __wsum sum);
30 
31 #define csum_tcpudp_magic csum_tcpudp_magic
32 __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
33 			  __u32 len, __u8 proto, __wsum sum);
34 
35 #include <asm-generic/checksum.h>
36 
37 #endif
38