Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp16499rdb; Mon, 4 Dec 2023 18:25:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2N7X0/5ZK4IjOFpPPyyPi5yrCcQeqfQFuv5NiegYzvzCTMZ1wvDCTwZD5sfiTu4epBS1g X-Received: by 2002:a17:902:d2cb:b0:1d0:6ffd:ce91 with SMTP id n11-20020a170902d2cb00b001d06ffdce91mr3297260plc.74.1701743099764; Mon, 04 Dec 2023 18:24:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701743099; cv=none; d=google.com; s=arc-20160816; b=MVbnV+gQHqAMYZWy8y6PBQMGK0SVh7o2l2pejf0+DoAfbM+g2kkvlb/+N8GX9he5w8 PdDks5QBCObrCTK6kSPBCgJ5MlsLwJEeycbgqCM8DeGKJpSPqXinbAQlF7br1Dw1TuWc YAShx8f4uaCAMb8xkyT/EM/5QeBuA7UW3fQO25Fs43VAuVhpX6lP9HIsM3rU15xFspow KBepkSaa0XucPgp4ORuMOD6nLC7M7YETyrEPlIOjX190dz+CpjgdEDSVy/+GKHqDSb3V KKNk93iXZklk1VjPP+urrkCVSGEjCWLcSDS89DPH9rOn5MAXKoMU+gZu0KLaICP41rbO rL/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l0dGY8wXvsX//CqlJQm1PUgK6SZc8G9gG8XPflzGv/A=; fh=DgGXwGbnyiv1Rvt/NkXbEKOXDvWVLBCb4IpCdacEJoI=; b=vAdMCB0uH9dzXAzfF5G9A4QR6OeqjrE3zvP8lLHC7JOGlkfxiTwfaHx+boGhYYd/OL NsZsFaUgLDUHWkKveY41W6RpCcvuRjGmP+HIhU2AiopeBAdKXkM5UYMf6QNbXTRxPmMO sNygYLWJzUygFn5wRSkftklFYs9zU/bKPtTMTlZ3lKGJKhsFETKGYd/6hRjXjf40B5zm pU4T2QsNhbsB2But4BC0G1orL4n398VSvsL/L0jnE4pRKjROpjo+6Vlderu0OcUwZZ6z EqoinTWaM+qweSAdPjbejmkEha9dR2/8Xe2LjgTMj5x9hKToB4SD+hKQd4OaNL9fuz59 liBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=EsQvzff5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j21-20020a170902759500b001cfc6492730si8525555pll.80.2023.12.04.18.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:24:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=EsQvzff5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3C9388021D07; Mon, 4 Dec 2023 18:24:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346295AbjLECY1 (ORCPT + 99 others); Mon, 4 Dec 2023 21:24:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234842AbjLECYQ (ORCPT ); Mon, 4 Dec 2023 21:24:16 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31214109; Mon, 4 Dec 2023 18:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=l0dGY8wXvsX//CqlJQm1PUgK6SZc8G9gG8XPflzGv/A=; b=EsQvzff5Z4+poClGfhwfw52Q2S T3I0IPkeVDs22mWCJjFU9RpKeVFL8aCAol09icAXYTk7Jbo8wsPZEBTAOSA+eDFYs05mJ6sEbn5Wy xDYqUsaxcct6NQ3tY0A+NW4+pd8witM7VwpQZ5HlPJIs2/M0ChSov6yVZe/rHtq96QJ0sNWkOfkLT 5TSZuVrBrx1CWrm4wMDtVPhM3hwtsPi3/ESoJtGWrbqMIfmQxFCGL8A5LN6DmUku0NZVATKVe+PSs fm9G64HeYWj6MxhfQ5enn46y11ZD6ks1vrwU9nYCrqaGpOGpAO3+cLYetcvvU3AQsC1rr1owKo6mM flC3bk9A==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rAL6i-00792Y-1n; Tue, 05 Dec 2023 02:24:20 +0000 From: Al Viro To: linux-arch@vger.kernel.org Cc: gus Gusenleitner Klaus , Al Viro , Thomas Gleixner , lkml , Ingo Molnar , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "David S. Miller" , "dsahern@kernel.org" , "kuba@kernel.org" , Paolo Abeni , Eric Dumazet Subject: [PATCH v2 06/18] consolidate csum_tcpudp_magic(), take default variant into net/checksum.h Date: Tue, 5 Dec 2023 02:24:02 +0000 Message-Id: <20231205022418.1703007-11-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231205022418.1703007-1-viro@zeniv.linux.org.uk> References: <20231205022100.GB1674809@ZenIV> <20231205022418.1703007-1-viro@zeniv.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Al Viro X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:24:55 -0800 (PST) now that nobody includes asm/checksum.h directly, we can just take that thing (overridably) to net/checksum.h and be done with it, whether asm-generic/checksum.h is used or not. Signed-off-by: Al Viro --- arch/alpha/include/asm/checksum.h | 7 +------ arch/arm/include/asm/checksum.h | 11 ----------- arch/hexagon/include/asm/checksum.h | 4 +--- arch/hexagon/kernel/hexagon_ksyms.c | 1 - arch/hexagon/lib/checksum.c | 1 + arch/m68k/include/asm/checksum.h | 12 ------------ arch/parisc/include/asm/checksum.h | 11 ----------- arch/powerpc/include/asm/checksum.h | 10 ---------- arch/s390/include/asm/checksum.h | 10 ---------- arch/sh/include/asm/checksum_32.h | 11 ----------- arch/sparc/include/asm/checksum_32.h | 11 ----------- arch/sparc/include/asm/checksum_64.h | 11 ----------- arch/x86/include/asm/checksum_32.h | 11 ----------- arch/x86/include/asm/checksum_64.h | 18 ------------------ arch/x86/um/asm/checksum.h | 11 ----------- arch/xtensa/include/asm/checksum.h | 11 ----------- include/asm-generic/checksum.h | 9 --------- include/net/checksum.h | 16 ++++++++++++++++ 18 files changed, 19 insertions(+), 157 deletions(-) diff --git a/arch/alpha/include/asm/checksum.h b/arch/alpha/include/asm/checksum.h index d3abe290ae4e..bc6a47e46fed 100644 --- a/arch/alpha/include/asm/checksum.h +++ b/arch/alpha/include/asm/checksum.h @@ -10,12 +10,7 @@ */ extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, __wsum sum); +#define _HAVE_ARCH_CSUM_TCPUDP_MAGIC __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum); diff --git a/arch/arm/include/asm/checksum.h b/arch/arm/include/asm/checksum.h index a295b0d037f0..23c8ef0311cf 100644 --- a/arch/arm/include/asm/checksum.h +++ b/arch/arm/include/asm/checksum.h @@ -129,17 +129,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, } return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 -csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, - __u8 proto, __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly diff --git a/arch/hexagon/include/asm/checksum.h b/arch/hexagon/include/asm/checksum.h index 4bc6ad96c4c5..1a62fd1aaccb 100644 --- a/arch/hexagon/include/asm/checksum.h +++ b/arch/hexagon/include/asm/checksum.h @@ -17,9 +17,7 @@ unsigned int do_csum(const void *voidptr, int len); __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum); -#define csum_tcpudp_magic csum_tcpudp_magic -__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, __wsum sum); +#define _HAVE_ARCH_CSUM_TCPUDP_MAGIC #include diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c index 36a80e31d187..f323d908b103 100644 --- a/arch/hexagon/kernel/hexagon_ksyms.c +++ b/arch/hexagon/kernel/hexagon_ksyms.c @@ -36,4 +36,3 @@ DECLARE_EXPORT(__hexagon_divsi3); DECLARE_EXPORT(__hexagon_modsi3); DECLARE_EXPORT(__hexagon_udivsi3); DECLARE_EXPORT(__hexagon_umodsi3); -DECLARE_EXPORT(csum_tcpudp_magic); diff --git a/arch/hexagon/lib/checksum.c b/arch/hexagon/lib/checksum.c index ba50822a0800..dbeb8f65d5e4 100644 --- a/arch/hexagon/lib/checksum.c +++ b/arch/hexagon/lib/checksum.c @@ -54,6 +54,7 @@ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, (__force u64)saddr + (__force u64)daddr + (__force u64)sum + ((len + proto) << 8)); } +EXPORT_SYMBOL(csum_tcpudp_magic); __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum) diff --git a/arch/m68k/include/asm/checksum.h b/arch/m68k/include/asm/checksum.h index 2adef06feeb3..3462a42b6fec 100644 --- a/arch/m68k/include/asm/checksum.h +++ b/arch/m68k/include/asm/checksum.h @@ -93,18 +93,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, return sum; } - -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 -csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, - unsigned short proto, __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/arch/parisc/include/asm/checksum.h b/arch/parisc/include/asm/checksum.h index 3c43baca7b39..62a390297414 100644 --- a/arch/parisc/include/asm/checksum.h +++ b/arch/parisc/include/asm/checksum.h @@ -85,17 +85,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index b68184dfac00..5925eaff6b8b 100644 --- a/arch/powerpc/include/asm/checksum.h +++ b/arch/powerpc/include/asm/checksum.h @@ -81,16 +81,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, #endif } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, - __u8 proto, __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - #define HAVE_ARCH_CSUM_ADD static __always_inline __wsum csum_add(__wsum csum, __wsum addend) { diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h index 69837eec2ff5..23b9840ed640 100644 --- a/arch/s390/include/asm/checksum.h +++ b/arch/s390/include/asm/checksum.h @@ -91,16 +91,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, return (__force __wsum)(csum >> 32); } -/* - * Computes the checksum of the TCP/UDP pseudo-header. - * Returns a 16-bit checksum, already complemented. - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, - __u8 proto, __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - /* * Used for miscellaneous IP-like checksums, mainly icmp. */ diff --git a/arch/sh/include/asm/checksum_32.h b/arch/sh/include/asm/checksum_32.h index 94464451fd08..7b91b7b6c1e9 100644 --- a/arch/sh/include/asm/checksum_32.h +++ b/arch/sh/include/asm/checksum_32.h @@ -134,17 +134,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/arch/sparc/include/asm/checksum_32.h b/arch/sparc/include/asm/checksum_32.h index 6dad14f4c925..e53331114217 100644 --- a/arch/sparc/include/asm/checksum_32.h +++ b/arch/sparc/include/asm/checksum_32.h @@ -174,17 +174,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - #define _HAVE_ARCH_IPV6_CSUM static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, diff --git a/arch/sparc/include/asm/checksum_64.h b/arch/sparc/include/asm/checksum_64.h index 0e3041ca384b..70f88abd93a1 100644 --- a/arch/sparc/include/asm/checksum_64.h +++ b/arch/sparc/include/asm/checksum_64.h @@ -78,17 +78,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - #define _HAVE_ARCH_IPV6_CSUM static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h index 65ca3448e83d..4521474a08ab 100644 --- a/arch/x86/include/asm/checksum_32.h +++ b/arch/x86/include/asm/checksum_32.h @@ -120,17 +120,6 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/arch/x86/include/asm/checksum_64.h b/arch/x86/include/asm/checksum_64.h index 23c56eef8e47..84e26b8c0af5 100644 --- a/arch/x86/include/asm/checksum_64.h +++ b/arch/x86/include/asm/checksum_64.h @@ -98,24 +98,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, } -/** - * csum_tcpup_magic - Compute an IPv4 pseudo header checksum. - * @saddr: source address - * @daddr: destination address - * @len: length of packet - * @proto: ip protocol of packet - * @sum: initial sum to be added in (32bit unfolded) - * - * Returns the 16bit pseudo header checksum the input data already - * complemented and ready to be filled in. - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} - /** * csum_partial - Compute an internet checksum. * @buff: buffer to be checksummed diff --git a/arch/x86/um/asm/checksum.h b/arch/x86/um/asm/checksum.h index b07824500363..9ef8ef4291f4 100644 --- a/arch/x86/um/asm/checksum.h +++ b/arch/x86/um/asm/checksum.h @@ -64,17 +64,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - /** * ip_fast_csum - Compute the IPv4 header checksum efficiently. * iph: ipv4 header diff --git a/arch/xtensa/include/asm/checksum.h b/arch/xtensa/include/asm/checksum.h index bf4ee4fd8f57..d1b0e8dac1a5 100644 --- a/arch/xtensa/include/asm/checksum.h +++ b/arch/xtensa/include/asm/checksum.h @@ -149,17 +149,6 @@ static __inline__ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, return sum; } -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, - __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h index 43e18db89c14..797316e34d15 100644 --- a/include/asm-generic/checksum.h +++ b/include/asm-generic/checksum.h @@ -47,15 +47,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, __u8 proto, __wsum sum); #endif -#ifndef csum_tcpudp_magic -static inline __sum16 -csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, - __u8 proto, __wsum sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); -} -#endif - /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c diff --git a/include/net/checksum.h b/include/net/checksum.h index 21a3b5c4e25a..706c5fb287cc 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h @@ -55,6 +55,22 @@ static inline bool wsum_is_fault(__wsum_fault v) #include #endif +/* + * computes the checksum of the TCP/UDP pseudo-header + * returns a 16-bit checksum, already complemented + */ +#ifndef _HAVE_ARCH_CSUM_TCPUDP_MAGIC +static inline __sum16 +csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, + __u8 proto, __wsum sum) +{ + return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); +} +#else +extern __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, + __u32 len, __u8 proto, __wsum sum); +#endif + #ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER static __always_inline __wsum_fault csum_and_copy_from_user (const void __user *src, void *dst, -- 2.39.2