From nobody Tue Nov 30 01:35:39 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 F121818BBAC1; Tue, 30 Nov 2021 01:35:40 +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 4J34Y81StQz3nBG; Tue, 30 Nov 2021 01:35:40 +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 E751253EB; Tue, 30 Nov 2021 01:35:39 +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 1AU1ZdZt054660; Tue, 30 Nov 2021 01:35:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AU1ZdNM054659; Tue, 30 Nov 2021 01:35:39 GMT (envelope-from git) Date: Tue, 30 Nov 2021 01:35:39 GMT Message-Id: <202111300135.1AU1ZdNM054659@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: 5b5bbf2e7c34 - stable/13 - sctp: Remove now-unneeded mb_unmapped_to_ext() calls 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: 5b5bbf2e7c341ec6ba569536fb14acb990d53334 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638236140; 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=HEKZZd4gMvSQH95ey7MkqhPm3lJELcGobHynSI2GYK0=; b=yViCLOBaOlFl7xWerTOxOhKrlPZ/G3sKAd+U4iGrKkcn2/X7Gdl1NwcIHXFqyL5y1vZj9G QLdadVwkP6Eap9PlM7xpKCMKe9EKEh5wNAfHhWE5W3QZgQItS+HogRBo+bgkt+3mjbMHZT Wn8xqa6LIg1mM9WojZCmOUeAvhc5dRxi8yqBrfriGUggOPAOIAV+wvmGrBQfxy+S4doHqF gSLT7JsMMRfbS1Dm0UDddhDhTN0SOqg2PtRcq2UqrecBURu0b13DGx1dknt6feL71qP+tf hD2pux65rT2uT+A/PSKLEEEMDsQ7AfwI3pca4gEkvmHMDDf8jsxazqVjNYdv2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638236140; a=rsa-sha256; cv=none; b=OgK3hHDKQpMoPVczkSryhITLl4YAmNNnnM8l3AmMYc1MRPmvSomzmNNNZG24P3WZyRDaza YS4CKGoSr4cbAnh3/SrYYZOPpS2HvOsFcTljwJfcLSiv44SoHTk5lYqBF3gOB+Yi6LuTLU ZMfJouwicCYrqdPdz9a5gZ87Mhp1nkORchvX9ivbyrg/H1qmB04Qg9roEj9nhQPOpwJX+x kV6B6sslwqOKkspJrKgDzMVrSN/x6i0OtuQOn1dV0S0YHyWcFDI8cYEetRcXLoElIGgXWS bl4XpiNCaXAtGeRu08a9jT2TgZSvj4DpI/t78laHUDI4qQOGqCnlqnblAp9o2Q== 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=5b5bbf2e7c341ec6ba569536fb14acb990d53334 commit 5b5bbf2e7c341ec6ba569536fb14acb990d53334 Author: Mark Johnston AuthorDate: 2021-11-16 18:38:09 +0000 Commit: Mark Johnston CommitDate: 2021-11-30 01:35:20 +0000 sctp: Remove now-unneeded mb_unmapped_to_ext() calls sctp_delayed_checksum() now handles unmapped mbufs, thanks to m_apply(). No functional change intended. Reviewed by: tuexen Sponsored by: The FreeBSD Foundation (cherry picked from commit 756bb50b6a867f3309ce76d76f1842a667dd303a) --- sys/netinet/ip_divert.c | 6 ------ sys/netinet/ip_output.c | 12 ------------ sys/netipsec/ipsec_output.c | 12 ------------ sys/netpfil/pf/pf.c | 3 --- 4 files changed, 33 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 4919893d6a61..936e216e0926 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -220,9 +220,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -238,9 +235,6 @@ divert_packet(struct mbuf *m, bool incoming) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) - return; sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index c269fca42015..4acec2bb877c 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -750,12 +750,6 @@ sendit: } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSTAT_INC(ips_odropped); - error = ENOBUFS; - goto bad; - } sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -908,12 +902,6 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - goto done; - } sctp_delayed_cksum(m0, hlen); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c index 86f06fd10947..a2deef95cdb5 100644 --- a/sys/netipsec/ipsec_output.c +++ b/sys/netipsec/ipsec_output.c @@ -336,12 +336,6 @@ ipsec4_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) if (m->m_pkthdr.csum_flags & CSUM_SCTP) { struct ip *ip; - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSECSTAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } ip = mtod(m, struct ip *); sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; @@ -642,12 +636,6 @@ ipsec6_common_output(struct mbuf *m, struct inpcb *inp, int forwarding) } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - m = mb_unmapped_to_ext(m); - if (m == NULL) { - IPSEC6STAT_INC(ips_out_nomem); - key_freesp(&sp); - return (ENOBUFS); - } sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 042658906bd2..84db11d2f0ef 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5976,9 +5976,6 @@ pf_route(struct mbuf **m, struct pf_krule *r, int dir, struct ifnet *oifp, } #if defined(SCTP) || defined(SCTP_SUPPORT) if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { - m0 = mb_unmapped_to_ext(m0); - if (m0 == NULL) - goto done; sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; }