From nobody Wed Dec 01 12:48:32 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1F9B818BA405; Wed, 1 Dec 2021 12:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3zR45Ttjz3jmg; Wed, 1 Dec 2021 12:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D9EC1E8E; Wed, 1 Dec 2021 12:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B1CmWj8065839; Wed, 1 Dec 2021 12:48:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1CmWud065838; Wed, 1 Dec 2021 12:48:32 GMT (envelope-from git) Date: Wed, 1 Dec 2021 12:48:32 GMT Message-Id: <202112011248.1B1CmWud065838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bc7bc3bdf95f - stable/13 - netinet: Remove in_cksum_update() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bc7bc3bdf95f29d72479cf8c3c858d257f12e327 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638362912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oOQEh8gIxAkEDjPHUvYMWxdFRLr27Zr4eZX9QZiRIpk=; b=g2ZTS0/umRk38LM2Fm3CYKVSp9qiuKv+f5LIQ4E5G/OJepUIaC38S1A3MVIAVm+a5vPscG pNqsK7U1EZds07zCvy7FsklC+rDt3SlOssIe/sdDR73R645aTl2loM1FMBArxh2s/MsVGs QzzlpKb1xAIFw361qNdkiPqbrleW7Uk9xqi0stno0wVoIS0OCwJ0FvXYqtsm85kbjrDdNo tAv3GWZiGukOWqj0TMLsQACz25syKMsNI5lOMPCVSzgNcE067qDhcfEyJgVdqIUIPvRoyF aapoyc1r1oUIBdZcJ67vSM1YFAUtODRMTeeVBkvVrvvygdmWmnoqQqgi7zbDkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638362912; a=rsa-sha256; cv=none; b=pGUqXZfSVr0DVf44k0L6jX+cRXdG1Txcb0+iocF2C/OUkpkoaKoEl6I9y1mzRVfaM38rIz slfERkml1cYUlzeee3XIIkGIz2dduGm8CFT6r9wBoKlFJxXis5Gq37f5WPF3+kTIAXPSB4 M0V8bcwshAwsFWK1MHCVqO+W1v1DQq49Wvl+i3ZR4ifmr4MQcRTS3Kgoj8IWzXLXwKoUUD JhL3b1/tFK1gplmDkw0QUZJzyuwm8oI84xSHyMyRTgKqoFIbv7o3MBdN27iSj+XIgUo5I6 YwZLfR9y31zWjevfLalWRPmO6zM+CCud5H71uxf/06UiNJNOyn++FLGYliV2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc7bc3bdf95f29d72479cf8c3c858d257f12e327 commit bc7bc3bdf95f29d72479cf8c3c858d257f12e327 Author: Mark Johnston AuthorDate: 2021-11-24 18:15:40 +0000 Commit: Mark Johnston CommitDate: 2021-12-01 12:41:55 +0000 netinet: Remove in_cksum_update() It was never implemented on powerpc or riscv and appears to have been unused since it was added in 1998. No functional change intended. Reviewed by: kp, glebius, cy Sponsored by: The FreeBSD Foundation (cherry picked from commit 09100f936be0684aa8caef441b96345960fd9c72) --- sys/amd64/include/in_cksum.h | 29 ----------------------------- sys/i386/include/in_cksum.h | 19 ------------------- sys/mips/include/in_cksum.h | 29 ----------------------------- sys/powerpc/include/in_cksum.h | 29 ----------------------------- 4 files changed, 106 deletions(-) diff --git a/sys/amd64/include/in_cksum.h b/sys/amd64/include/in_cksum.h index 79d30cafbc90..89ff1097f369 100644 --- a/sys/amd64/include/in_cksum.h +++ b/sys/amd64/include/in_cksum.h @@ -45,35 +45,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index 87c18ec4066d..a8214e97cd9a 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -83,14 +83,6 @@ in_cksum_hdr(const struct ip *ip) return ~sum & 0xffff; } - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} #endif static __inline u_short @@ -123,17 +115,6 @@ in_pseudo(u_int sum, u_int b, u_int c) sum -= 0xffff; return (sum); } - -#else -#if defined(IPVERSION) && (IPVERSION == 4) -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif #endif #ifdef _KERNEL diff --git a/sys/mips/include/in_cksum.h b/sys/mips/include/in_cksum.h index d55b838b42ed..580fb9c024f8 100644 --- a/sys/mips/include/in_cksum.h +++ b/sys/mips/include/in_cksum.h @@ -42,35 +42,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip); diff --git a/sys/powerpc/include/in_cksum.h b/sys/powerpc/include/in_cksum.h index fd34e13d3822..7407b4ad7104 100644 --- a/sys/powerpc/include/in_cksum.h +++ b/sys/powerpc/include/in_cksum.h @@ -41,35 +41,6 @@ #define in_cksum(m, len) in_cksum_skip(m, len, 0) -#if defined(IPVERSION) && (IPVERSION == 4) -/* - * It it useful to have an Internet checksum routine which is inlineable - * and optimized specifically for the task of computing IP header checksums - * in the normal case (where there are no options and the header length is - * therefore always exactly five 32-bit words. - */ -#ifdef __CC_SUPPORTS___INLINE - -static __inline void -in_cksum_update(struct ip *ip) -{ - int __tmpsum; - __tmpsum = (int)ntohs(ip->ip_sum) + 256; - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); -} - -#else - -#define in_cksum_update(ip) \ - do { \ - int __tmpsum; \ - __tmpsum = (int)ntohs(ip->ip_sum) + 256; \ - ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \ - } while(0) - -#endif -#endif - #ifdef _KERNEL #if defined(IPVERSION) && (IPVERSION == 4) u_int in_cksum_hdr(const struct ip *ip);