From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6DCCC4167B for ; Tue, 5 Dec 2023 02:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346269AbjLECY0 (ORCPT ); Mon, 4 Dec 2023 21:24:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjLECYQ (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 11921113; Mon, 4 Dec 2023 18:24:23 -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=oM052cTSQ0OvFerUaTSe6I6I0lV0SevKybQiSTbBEOU=; b=kjRXCbGwoqRFR6digoglQSNMdt tOLKNrtrI+3Hols/QMNsf1PolDzkOq3ViCTLxJHy3hZzWj3Zp4mxmlOHbseobjD6cfR+2kBq1X38f fxNSBJIWcmjQT9zXwhfryTvyLbtQ/M9zaxnIt7juagR0oMMJAfpmW6HxVPd4YDuqbjM4j3S5ukT+u k+p3EEdulEmgi3L/89AjkqdDmSvHq0oKnY2q4m5LLCRJXDm4i3X3eUUF6izjW2OkhXp3TQZ6gG0AI lDbKJjgjYOGdkefJQWe+yaLxYcSVY4ULxMeCH9j2Xl3zUcPxhlHzPS2X9ay9MqeT5QpInTZjz3DZz TRS8lApw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rAL6j-00792s-19; Tue, 05 Dec 2023 02:24:21 +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 08/18] alpha: pull asm-generic/checksum.h Date: Tue, 5 Dec 2023 02:24:06 +0000 Message-Id: <20231205022418.1703007-15-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Al Viro --- arch/alpha/include/asm/checksum.h | 51 +++---------------------------- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/arch/alpha/include/asm/checksum.h b/arch/alpha/include/asm/checksum.h index 0d7c21a79961..54722eaeb999 100644 --- a/arch/alpha/include/asm/checksum.h +++ b/arch/alpha/include/asm/checksum.h @@ -2,40 +2,7 @@ #ifndef _ALPHA_CHECKSUM_H #define _ALPHA_CHECKSUM_H -#include - -/* - * This is a version of ip_compute_csum() optimized for IP headers, - * which always checksum on 4 octet boundaries. - */ -extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); - #define _HAVE_ARCH_CSUM_TCPUDP_MAGIC - -__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, - __u32 len, __u8 proto, __wsum sum); - -/* - * computes the checksum of a memory block at buff, length len, - * and adds in "sum" (32-bit) - * - * returns a 32-bit number suitable for feeding into itself - * or csum_tcpudp_magic - * - * this function must be called with even lengths, except - * for the last fragment, which may be odd - * - * it's best to have buff aligned on a 32-bit boundary - */ -extern __wsum csum_partial(const void *buff, int len, __wsum sum); - -/* - * the same as csum_partial, but copies from src while it - * checksums - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary - */ #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #define _HAVE_ARCH_CSUM_AND_COPY __wsum_fault csum_and_copy_from_user(const void __user *src, void *dst, int len); @@ -43,21 +10,13 @@ __wsum_fault csum_and_copy_from_user(const void __user *src, void *dst, int len) __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len); #define _HAVE_IP_COMPUTE_CSUM - -/* - * Fold a partial checksum without adding pseudo headers - */ - -static inline __sum16 csum_fold(__wsum csum) -{ - u32 sum = (__force u32)csum; - sum = (sum & 0xffff) + (sum >> 16); - sum = (sum & 0xffff) + (sum >> 16); - return (__force __sum16)~sum; -} - #define _HAVE_ARCH_IPV6_CSUM + +struct in6_addr; extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, __u8 proto, __wsum sum); + +#include + #endif -- 2.39.2