From owner-svn-src-all@freebsd.org Mon Jun 22 14:01:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5756434D4BB; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rB0X1b1qz4rh1; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31CE1F525; Mon, 22 Jun 2020 14:01:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ME1Wm2057681; Mon, 22 Jun 2020 14:01:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ME1Vi8057677; Mon, 22 Jun 2020 14:01:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006221401.05ME1Vi8057677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 22 Jun 2020 14:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362497 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 14:01:32 -0000 Author: markj Date: Mon Jun 22 14:01:31 2020 New Revision: 362497 URL: https://svnweb.freebsd.org/changeset/base/362497 Log: Move the definition of SCTP's system_base_info into sctp_crc32.c. This file is the only SCTP source file compiled into the kernel when SCTP_SUPPORT is configured. sctp_delayed_checksum() references a couple of counters defined in system_base_info, so the change allows these counters to be referenced in a kernel compiled without "options SCTP". Submitted by: tuexen MFC with: r362338 Modified: head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_crc32.c ============================================================================== --- head/sys/netinet/sctp_crc32.c Mon Jun 22 12:36:05 2020 (r362496) +++ head/sys/netinet/sctp_crc32.c Mon Jun 22 14:01:31 2020 (r362497) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef SCTP +#if defined(SCTP) || defined(SCTP_SUPPORT) #include #include #include @@ -117,6 +117,9 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset) } #if defined(SCTP) || defined(SCTP_SUPPORT) + +VNET_DEFINE(struct sctp_base_info, system_base_info); + /* * Compute and insert the SCTP checksum in network byte order for a given * mbuf chain m which contains an SCTP packet starting at offset. @@ -127,10 +130,8 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) uint32_t checksum; checksum = sctp_calculate_cksum(m, offset); -#ifdef SCTP SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); -#endif offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t)(m->m_pkthdr.len)) { Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Jun 22 12:36:05 2020 (r362496) +++ head/sys/netinet/sctp_pcb.c Mon Jun 22 14:01:31 2020 (r362497) @@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -VNET_DEFINE(struct sctp_base_info, system_base_info); - /* FIX: we don't handle multiple link local scopes */ /* "scopeless" replacement IN6_ARE_ADDR_EQUAL */ #ifdef INET6