From nobody Fri May 13 20:33:10 2022 X-Original-To: dev-commits-src-main@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 8EAB11AE2092; Fri, 13 May 2022 20:33:10 +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 4L0L1y3cp5z3Fq5; Fri, 13 May 2022 20:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652473990; 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=0Ry2jsBWCHI5mMi17cnhLKmr8MLKp2gTleyoXTUm6ZI=; b=NjdnvU2xqGbiWLiyUpLTVAwlycENSvS/1Qcfypez8J/aNVjStKCwJldCCSkClip3q7J8pP MX8rzxRrhQuD7KBUoXxSLUM2ul9ZaYAbX6mbjL9uoP6K5HfGCSwiWZZuBwE56xg4xazZ0U m62Hbtk/E4u8CBowMxf3gCjCqKDeZsYkW9e4q3S01GplzSV7l4Z3svOnzdUAUh8TbQ+G15 g4dpN7nRIIrKhZzxehC4QH+7hl/lbO9e8AhCRPfwwOB4USextg7o3HgaPORScmN2b+RPx3 KImBVZpt8EQDGUlGMnNYaxHNY8/ubfkFTfk9/MOVNh5L0FVB+TppxSH1nPOiiw== 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 5C75C174A; Fri, 13 May 2022 20:33:10 +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 24DKXAOY088958; Fri, 13 May 2022 20:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24DKXAxW088957; Fri, 13 May 2022 20:33:10 GMT (envelope-from git) Date: Fri, 13 May 2022 20:33:10 GMT Message-Id: <202205132033.24DKXAxW088957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 808b7d80e060 - main - mbuf: remove PH_vt alias for mbuf packet header persistent shared data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 808b7d80e06034b1423c786948670600bc54726f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652473990; 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=0Ry2jsBWCHI5mMi17cnhLKmr8MLKp2gTleyoXTUm6ZI=; b=JQnvTAX3liTYbl9GPUt9Z0TLT+lNcjEmkMAH9EonP2WQkpMMi2/WTV0RJowCQlN7CLb0Zi Ao3Dmc2O1niYJki4OAQkcZ0sDjktS3QKcaN0fbNxhqw7kZsvDXZb0TrnMuKdlE8Op6GXCN mxpQDUaEbyvV+Kyg6Kx6jJdTOwL2ojAvWhBDh+WzIWeXmgyV/H/gQjgNyIPzjSJpPyosXO CFoqCK3MA0K8EKx7KpK2TiuBb/cu675K5yLo/3yA5uNXprdg+r5bpyls993L8oR99emVTI gFjBBddKnmVN3RqnRMOOQcr2lFLMPEKPnXJxlk/BFya/0qCQl6QTUgNx4m4SPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652473990; a=rsa-sha256; cv=none; b=GSbwjTB6IfPV3F1jdV1kyg825cL6Vnspjb0jjEKNmednOIaW0FOQi8ewuN/Io8fA43Rqum IE3LkcMhvAEwzArgr291iIp/Damqq/1qx7f86xHhV7ZdZpxgWcK2f8zUKjHIw3bMXVlc0a DN1XCEcdt/4HLxJaxMOi0pdevzeYC5qobJscQCQxDkK13rtigislTghrDN+O7a50Ov/99/ r5VLfNhhdONMB6pgUxMj4JJv/gpYKY65d3GJ5SK8B4pjIOoRMFKPqu4o5bVA+jEgRYUD3V sAYCVE2b/R9iC3kslIH2bqQ6nN/+N+tDK3G5qH6lK7uFrOPfnx/H0hfSiAeRuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=808b7d80e06034b1423c786948670600bc54726f commit 808b7d80e06034b1423c786948670600bc54726f Author: Gleb Smirnoff AuthorDate: 2022-05-13 20:32:43 +0000 Commit: Gleb Smirnoff CommitDate: 2022-05-13 20:32:43 +0000 mbuf: remove PH_vt alias for mbuf packet header persistent shared data Mechanical sed change s/PH_vt\.vt_nrecs/vt_nrecs/g --- sys/netinet/igmp.c | 26 +++++++++++++------------- sys/netinet6/mld6.c | 26 +++++++++++++------------- sys/sys/mbuf.h | 3 +-- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 61a83356a01c..25e2cac621a3 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -2801,7 +2801,7 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct in_multi *inm, m0 = mbufq_last(mq); if (!is_group_query && m0 != NULL && - (m0->m_pkthdr.PH_vt.vt_nrecs + 1 <= IGMP_V3_REPORT_MAXRECS) && + (m0->m_pkthdr.vt_nrecs + 1 <= IGMP_V3_REPORT_MAXRECS) && (m0->m_pkthdr.len + minrec0len) < (ifp->if_mtu - IGMP_LEADINGSPACE)) { m0srcs = (ifp->if_mtu - m0->m_pkthdr.len - @@ -2921,10 +2921,10 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct in_multi *inm, */ if (m != m0) { CTR1(KTR_IGMPV3, "%s: enqueueing first packet", __func__); - m->m_pkthdr.PH_vt.vt_nrecs = 1; + m->m_pkthdr.vt_nrecs = 1; mbufq_enqueue(mq, m); } else - m->m_pkthdr.PH_vt.vt_nrecs++; + m->m_pkthdr.vt_nrecs++; /* * No further work needed if no source list in packet(s). @@ -2963,7 +2963,7 @@ igmp_v3_enqueue_group_record(struct mbufq *mq, struct in_multi *inm, CTR1(KTR_IGMPV3, "%s: m_append() failed.", __func__); return (-ENOMEM); } - m->m_pkthdr.PH_vt.vt_nrecs = 1; + m->m_pkthdr.vt_nrecs = 1; nbytes += sizeof(struct igmp_grouprec); m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE - @@ -3091,7 +3091,7 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) do { m0 = mbufq_last(mq); if (m0 != NULL && - (m0->m_pkthdr.PH_vt.vt_nrecs + 1 <= + (m0->m_pkthdr.vt_nrecs + 1 <= IGMP_V3_REPORT_MAXRECS) && (m0->m_pkthdr.len + MINRECLEN) < (ifp->if_mtu - IGMP_LEADINGSPACE)) { @@ -3115,7 +3115,7 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) "%s: m_get*() failed", __func__); return (-ENOMEM); } - m->m_pkthdr.PH_vt.vt_nrecs = 0; + m->m_pkthdr.vt_nrecs = 0; igmp_save_context(m, ifp); m0srcs = (ifp->if_mtu - IGMP_LEADINGSPACE - sizeof(struct igmp_grouprec)) / @@ -3236,7 +3236,7 @@ igmp_v3_enqueue_filter_change(struct mbufq *mq, struct in_multi *inm) * Count the new group record, and enqueue this * packet if it wasn't already queued. */ - m->m_pkthdr.PH_vt.vt_nrecs++; + m->m_pkthdr.vt_nrecs++; if (m != m0) mbufq_enqueue(mq, m); nbytes += npbytes; @@ -3298,8 +3298,8 @@ igmp_v3_merge_state_changes(struct in_multi *inm, struct mbufq *scq) if (mt != NULL) { recslen = m_length(m, NULL); - if ((mt->m_pkthdr.PH_vt.vt_nrecs + - m->m_pkthdr.PH_vt.vt_nrecs <= + if ((mt->m_pkthdr.vt_nrecs + + m->m_pkthdr.vt_nrecs <= IGMP_V3_REPORT_MAXRECS) && (mt->m_pkthdr.len + recslen <= (inm->inm_ifp->if_mtu - IGMP_LEADINGSPACE))) @@ -3343,8 +3343,8 @@ igmp_v3_merge_state_changes(struct in_multi *inm, struct mbufq *scq) mtl = m_last(mt); m0->m_flags &= ~M_PKTHDR; mt->m_pkthdr.len += recslen; - mt->m_pkthdr.PH_vt.vt_nrecs += - m0->m_pkthdr.PH_vt.vt_nrecs; + mt->m_pkthdr.vt_nrecs += + m0->m_pkthdr.vt_nrecs; mtl->m_next = m0; } @@ -3564,10 +3564,10 @@ igmp_v3_encap_report(struct ifnet *ifp, struct mbuf *m) igmp->ir_type = IGMP_v3_HOST_MEMBERSHIP_REPORT; igmp->ir_rsv1 = 0; igmp->ir_rsv2 = 0; - igmp->ir_numgrps = htons(m->m_pkthdr.PH_vt.vt_nrecs); + igmp->ir_numgrps = htons(m->m_pkthdr.vt_nrecs); igmp->ir_cksum = 0; igmp->ir_cksum = in_cksum(m, sizeof(struct igmp_report) + igmpreclen); - m->m_pkthdr.PH_vt.vt_nrecs = 0; + m->m_pkthdr.vt_nrecs = 0; m->m_data -= sizeof(struct ip); m->m_len += sizeof(struct ip); diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 1230599ea0d8..548ea55ef715 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -2427,7 +2427,7 @@ mld_v2_enqueue_group_record(struct mbufq *mq, struct in6_multi *inm, m0 = mbufq_last(mq); if (!is_group_query && m0 != NULL && - (m0->m_pkthdr.PH_vt.vt_nrecs + 1 <= MLD_V2_REPORT_MAXRECS) && + (m0->m_pkthdr.vt_nrecs + 1 <= MLD_V2_REPORT_MAXRECS) && (m0->m_pkthdr.len + minrec0len) < (ifp->if_mtu - MLD_MTUSPACE)) { m0srcs = (ifp->if_mtu - m0->m_pkthdr.len - @@ -2548,10 +2548,10 @@ mld_v2_enqueue_group_record(struct mbufq *mq, struct in6_multi *inm, */ if (m != m0) { CTR1(KTR_MLD, "%s: enqueueing first packet", __func__); - m->m_pkthdr.PH_vt.vt_nrecs = 1; + m->m_pkthdr.vt_nrecs = 1; mbufq_enqueue(mq, m); } else - m->m_pkthdr.PH_vt.vt_nrecs++; + m->m_pkthdr.vt_nrecs++; /* * No further work needed if no source list in packet(s). @@ -2585,7 +2585,7 @@ mld_v2_enqueue_group_record(struct mbufq *mq, struct in6_multi *inm, CTR1(KTR_MLD, "%s: m_append() failed.", __func__); return (-ENOMEM); } - m->m_pkthdr.PH_vt.vt_nrecs = 1; + m->m_pkthdr.vt_nrecs = 1; nbytes += sizeof(struct mldv2_record); m0srcs = (ifp->if_mtu - MLD_MTUSPACE - @@ -2714,7 +2714,7 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) do { m0 = mbufq_last(mq); if (m0 != NULL && - (m0->m_pkthdr.PH_vt.vt_nrecs + 1 <= + (m0->m_pkthdr.vt_nrecs + 1 <= MLD_V2_REPORT_MAXRECS) && (m0->m_pkthdr.len + MINRECLEN) < (ifp->if_mtu - MLD_MTUSPACE)) { @@ -2733,7 +2733,7 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) "%s: m_get*() failed", __func__); return (-ENOMEM); } - m->m_pkthdr.PH_vt.vt_nrecs = 0; + m->m_pkthdr.vt_nrecs = 0; mld_save_context(m, ifp); m0srcs = (ifp->if_mtu - MLD_MTUSPACE - sizeof(struct mldv2_record)) / @@ -2856,7 +2856,7 @@ mld_v2_enqueue_filter_change(struct mbufq *mq, struct in6_multi *inm) * Count the new group record, and enqueue this * packet if it wasn't already queued. */ - m->m_pkthdr.PH_vt.vt_nrecs++; + m->m_pkthdr.vt_nrecs++; if (m != m0) mbufq_enqueue(mq, m); nbytes += npbytes; @@ -2918,8 +2918,8 @@ mld_v2_merge_state_changes(struct in6_multi *inm, struct mbufq *scq) if (mt != NULL) { recslen = m_length(m, NULL); - if ((mt->m_pkthdr.PH_vt.vt_nrecs + - m->m_pkthdr.PH_vt.vt_nrecs <= + if ((mt->m_pkthdr.vt_nrecs + + m->m_pkthdr.vt_nrecs <= MLD_V2_REPORT_MAXRECS) && (mt->m_pkthdr.len + recslen <= (inm->in6m_ifp->if_mtu - MLD_MTUSPACE))) @@ -2963,8 +2963,8 @@ mld_v2_merge_state_changes(struct in6_multi *inm, struct mbufq *scq) mtl = m_last(mt); m0->m_flags &= ~M_PKTHDR; mt->m_pkthdr.len += recslen; - mt->m_pkthdr.PH_vt.vt_nrecs += - m0->m_pkthdr.PH_vt.vt_nrecs; + mt->m_pkthdr.vt_nrecs += + m0->m_pkthdr.vt_nrecs; mtl->m_next = m0; } @@ -3216,8 +3216,8 @@ mld_v2_encap_report(struct ifnet *ifp, struct mbuf *m) mld->mld_code = 0; mld->mld_cksum = 0; mld->mld_v2_reserved = 0; - mld->mld_v2_numrecs = htons(m->m_pkthdr.PH_vt.vt_nrecs); - m->m_pkthdr.PH_vt.vt_nrecs = 0; + mld->mld_v2_numrecs = htons(m->m_pkthdr.vt_nrecs); + m->m_pkthdr.vt_nrecs = 0; mh->m_next = m; mld->mld_cksum = in6_cksum(mh, IPPROTO_ICMPV6, diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 78b175ebe2c0..61da52c6e67c 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -207,8 +207,7 @@ struct pkthdr { }; #define ether_vtag PH_per.sixteen[0] #define tcp_tun_port PH_per.sixteen[0] /* outbound */ -#define PH_vt PH_per -#define vt_nrecs sixteen[0] /* mld and v6-ND */ +#define vt_nrecs PH_per.sixteen[0] /* mld and v6-ND */ #define tso_segsz PH_per.sixteen[1] /* inbound after LRO */ #define lro_nsegs tso_segsz /* inbound after LRO */ #define csum_data PH_per.thirtytwo[1] /* inbound from hardware up */