From nobody Wed Nov 24 18:39:34 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 BA733189E283; Wed, 24 Nov 2021 18:39:34 +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 4HzqYL3LXJz3qp2; Wed, 24 Nov 2021 18:39:34 +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 529C06DFD; Wed, 24 Nov 2021 18:39:34 +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 1AOIdYLh095034; Wed, 24 Nov 2021 18:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOIdYeq095033; Wed, 24 Nov 2021 18:39:34 GMT (envelope-from git) Date: Wed, 24 Nov 2021 18:39:34 GMT Message-Id: <202111241839.1AOIdYeq095033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 09100f936be0 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 09100f936be0684aa8caef441b96345960fd9c72 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637779174; 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=3RsIarDFzLIM+5CKcV/uaIsWApGVPaWI2c5p1FuJyrY=; b=V3DuSACV4fFpifjjUlTIhEd0FJtMXXCNG3FdL962BgocuNi1uwdWF0WmXF5CGR0vaj8I2f dlbHOg5/D8WunFYCGYu8Ov/yNn7fy6Vv8BA9ii5+Ao0Sv0ZrvYmUsroGxclUfdYb6IX0Nr DPcV63ba7PrbE1gXiA9aApJzC0kUFdEHvOT9UKHtXZYQCy41YNI7QyU2wzwfV8eiuNhv5y Ht7fueOGeAAt6EsLIRkdK08+asmRe6WiD7TfiTmjtOhKOXTZf0NrGPb9TlQfXmuw9FL+lZ D1UddB5jZqkeNpk0k5bxJUw9WAVk8eGvgjujN6LCGjCKIngeCYsKv8z5weOWxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637779174; a=rsa-sha256; cv=none; b=jAz6z+rsRXA9T2XX2dU26DR3QjlrLy6r7jGc+3iocsQ9Wf5v5SWgZZwaaZSr+P/KnmYprz hQWk+Ss+3MQjCFHJ6rL0bBfFQ3YbQwGYvy4IJ3Libc8vCaFWEBrxJ4YN0v34hacOx2q4uJ 86xWsLzOf4P1Soc6YCZ7NkzM5nMrzbDF0r2yfA32A0NCyBXI0em62TvDzhh17YJcjNhtOY Cgnnn642pCumOfb8GLkE+e/EdkT5dMnq6O4bc97+xiz6afWnZ6zDnv86K875jr1kpjMf/4 aw9QLIJ5Rra/+PfVub609vnepAJpYgL7IdCGdJedrNAzL7dCDdUcNuRzlldyng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09100f936be0684aa8caef441b96345960fd9c72 commit 09100f936be0684aa8caef441b96345960fd9c72 Author: Mark Johnston AuthorDate: 2021-11-24 18:15:40 +0000 Commit: Mark Johnston CommitDate: 2021-11-24 18:31:15 +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 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33093 --- 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);