Date: Sat, 2 May 2020 22:25:42 -0700 From: Navdeep Parhar <nparhar@gmail.com> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360581 - in head/sys: dev/cxgbe dev/cxgbe/crypto dev/cxgbe/tom dev/mlx5/mlx5_en kern netinet sys Message-ID: <20200503052542.GA18955@x270> In-Reply-To: <202005030021.0430LBwu098725@repo.freebsd.org> References: <202005030021.0430LBwu098725@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 03, 2020 at 12:21:11AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Sun May 3 00:21:11 2020 > New Revision: 360581 > URL: https://svnweb.freebsd.org/changeset/base/360581 > > Log: > Step 4.1: mechanically rename M_NOMAP to M_EXTPG Hello Gleb, This looks incomplete. mbuf.9 still refers to M_NOMAP. ifnet cap is still IFCAP_NOMAP and shown as NOMAP by ifconfig, and ifconfig still uses (-)nomap to enable/disable the capability. This looks a bit gratuitous to me but if you're going to do it then at least use the same name consistently throughout the tree. Regards, Navdeep > > Reviewed by: gallatin > Differential Revision: https://reviews.freebsd.org/D24598 > > Modified: > head/sys/dev/cxgbe/crypto/t4_kern_tls.c > head/sys/dev/cxgbe/t4_sge.c > head/sys/dev/cxgbe/tom/t4_cpl_io.c > head/sys/dev/cxgbe/tom/t4_tls.c > head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c > head/sys/kern/kern_mbuf.c > head/sys/kern/kern_sendfile.c > head/sys/kern/subr_bus_dma.c > head/sys/kern/subr_sglist.c > head/sys/kern/uipc_ktls.c > head/sys/kern/uipc_mbuf.c > head/sys/kern/uipc_sockbuf.c > head/sys/kern/uipc_socket.c > head/sys/netinet/tcp_output.c > head/sys/netinet/tcp_pcap.c > head/sys/sys/mbuf.h > > Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c > ============================================================================== > --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Sun May 3 00:21:11 2020 (r360581) > @@ -1208,7 +1208,7 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *le > > /* Assume all headers are in 'm' for now. */ > MPASS(m->m_next != NULL); > - MPASS(m->m_next->m_flags & M_NOMAP); > + MPASS(m->m_next->m_flags & M_EXTPG); > > tot_len = 0; > > @@ -1218,7 +1218,7 @@ t6_ktls_parse_pkt(struct mbuf *m, int *nsegsp, int *le > */ > *nsegsp = 0; > for (m_tls = m->m_next; m_tls != NULL; m_tls = m_tls->m_next) { > - MPASS(m_tls->m_flags & M_NOMAP); > + MPASS(m_tls->m_flags & M_EXTPG); > > wr_len = ktls_wr_len(tlsp, m, m_tls, &nsegs); > #ifdef VERBOSE_TRACES > @@ -2265,7 +2265,7 @@ t6_ktls_write_wr(struct sge_txq *txq, void *dst, struc > * for that record. > */ > for (m_tls = m->m_next; m_tls != NULL; m_tls = m_tls->m_next) { > - MPASS(m_tls->m_flags & M_NOMAP); > + MPASS(m_tls->m_flags & M_EXTPG); > > /* > * Determine the initial TCP sequence number for this > > Modified: head/sys/dev/cxgbe/t4_sge.c > ============================================================================== > --- head/sys/dev/cxgbe/t4_sge.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/dev/cxgbe/t4_sge.c Sun May 3 00:21:11 2020 (r360581) > @@ -2497,7 +2497,7 @@ count_mbuf_nsegs(struct mbuf *m, int skip, uint8_t *cf > skip -= len; > continue; > } > - if ((m->m_flags & M_NOMAP) != 0) { > + if ((m->m_flags & M_EXTPG) != 0) { > *cflags |= MC_NOMAP; > nsegs += count_mbuf_ext_pgs(m, skip, &nextaddr); > skip = 0; > @@ -5836,7 +5836,7 @@ write_ethofld_wr(struct cxgbe_rate_tag *cst, struct fw > immhdrs -= m0->m_len; > continue; > } > - if (m0->m_flags & M_NOMAP) > + if (m0->m_flags & M_EXTPG) > sglist_append_mbuf_epg(&sg, m0, > mtod(m0, vm_offset_t), m0->m_len); > else > > Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c > ============================================================================== > --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Sun May 3 00:21:11 2020 (r360581) > @@ -610,7 +610,7 @@ write_tx_sgl(void *dst, struct mbuf *start, struct mbu > > i = -1; > for (m = start; m != stop; m = m->m_next) { > - if (m->m_flags & M_NOMAP) > + if (m->m_flags & M_EXTPG) > rc = sglist_append_mbuf_epg(&sg, m, > mtod(m, vm_offset_t), m->m_len); > else > @@ -731,7 +731,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > for (m = sndptr; m != NULL; m = m->m_next) { > int n; > > - if (m->m_flags & M_NOMAP) { > + if (m->m_flags & M_EXTPG) { > #ifdef KERN_TLS > if (m->m_epg_tls != NULL) { > toep->flags |= TPF_KTLS; > @@ -772,7 +772,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep > break; > } > > - if (m->m_flags & M_NOMAP) > + if (m->m_flags & M_EXTPG) > nomap_mbuf_seen = true; > if (max_nsegs_1mbuf < n) > max_nsegs_1mbuf = n; > > Modified: head/sys/dev/cxgbe/tom/t4_tls.c > ============================================================================== > --- head/sys/dev/cxgbe/tom/t4_tls.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/dev/cxgbe/tom/t4_tls.c Sun May 3 00:21:11 2020 (r360581) > @@ -1796,7 +1796,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, > return; > } > > - KASSERT(m->m_flags & M_NOMAP, ("%s: mbuf %p is not NOMAP", > + KASSERT(m->m_flags & M_EXTPG, ("%s: mbuf %p is not NOMAP", > __func__, m)); > KASSERT(m->m_epg_tls != NULL, > ("%s: mbuf %p doesn't have TLS session", __func__, m)); > > Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c > ============================================================================== > --- head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c Sun May 3 00:21:11 2020 (r360581) > @@ -624,7 +624,7 @@ sbtls_recover_record(struct mbuf *mb, int wait, uint32 > > /* check format of incoming mbuf */ > if (mb->m_next == NULL || > - (mb->m_next->m_flags & (M_NOMAP | M_EXT)) != (M_NOMAP | M_EXT)) { > + (mb->m_next->m_flags & (M_EXTPG | M_EXT)) != (M_EXTPG | M_EXT)) { > top = NULL; > goto done; > } > @@ -682,7 +682,7 @@ mlx5e_sq_tls_populate(struct mbuf *mb, uint64_t *pseq) > { > > for (; mb != NULL; mb = mb->m_next) { > - if (!(mb->m_flags & M_NOMAP)) > + if (!(mb->m_flags & M_EXTPG)) > continue; > *pseq = mb->m_epg_seqno; > return (1); > > Modified: head/sys/kern/kern_mbuf.c > ============================================================================== > --- head/sys/kern/kern_mbuf.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/kern_mbuf.c Sun May 3 00:21:11 2020 (r360581) > @@ -882,7 +882,7 @@ mb_unmapped_compress(struct mbuf *m) > m->m_ext.ext_free(m); > > /* Turn 'm' into a "normal" mbuf. */ > - m->m_flags &= ~(M_EXT | M_RDONLY | M_NOMAP); > + m->m_flags &= ~(M_EXT | M_RDONLY | M_EXTPG); > m->m_data = m->m_dat; > > /* Copy data back into m. */ > @@ -1071,7 +1071,7 @@ mb_unmapped_to_ext(struct mbuf *top) > for (m = top; m != NULL; m = next) { > /* m might be freed, so cache the next pointer. */ > next = m->m_next; > - if (m->m_flags & M_NOMAP) { > + if (m->m_flags & M_EXTPG) { > if (prev != NULL) { > /* > * Remove 'm' from the new chain so > @@ -1132,7 +1132,7 @@ mb_alloc_ext_pgs(int how, m_ext_free_t ext_free) > m->m_epg_tls = NULL; > m->m_epg_so = NULL; > m->m_data = NULL; > - m->m_flags |= (M_EXT | M_RDONLY | M_NOMAP); > + m->m_flags |= (M_EXT | M_RDONLY | M_EXTPG); > m->m_ext.ext_type = EXT_PGS; > m->m_ext.ext_flags = EXT_FLAG_EMBREF; > m->m_ext.ext_count = 1; > > Modified: head/sys/kern/kern_sendfile.c > ============================================================================== > --- head/sys/kern/kern_sendfile.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/kern_sendfile.c Sun May 3 00:21:11 2020 (r360581) > @@ -845,7 +845,7 @@ retry_space: > #ifdef KERN_TLS > if (tls != NULL) > mh = m_uiotombuf(hdr_uio, M_WAITOK, space, > - tls->params.max_frame_len, M_NOMAP); > + tls->params.max_frame_len, M_EXTPG); > else > #endif > mh = m_uiotombuf(hdr_uio, M_WAITOK, > > Modified: head/sys/kern/subr_bus_dma.c > ============================================================================== > --- head/sys/kern/subr_bus_dma.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/subr_bus_dma.c Sun May 3 00:21:11 2020 (r360581) > @@ -184,7 +184,7 @@ _bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmama > error = 0; > for (m = m0; m != NULL && error == 0; m = m->m_next) { > if (m->m_len > 0) { > - if ((m->m_flags & M_NOMAP) != 0) > + if ((m->m_flags & M_EXTPG) != 0) > error = _bus_dmamap_load_mbuf_epg(dmat, > map, m, segs, nsegs, flags); > else > > Modified: head/sys/kern/subr_sglist.c > ============================================================================== > --- head/sys/kern/subr_sglist.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/subr_sglist.c Sun May 3 00:21:11 2020 (r360581) > @@ -451,7 +451,7 @@ sglist_append_mbuf(struct sglist *sg, struct mbuf *m0) > SGLIST_SAVE(sg, save); > for (m = m0; m != NULL; m = m->m_next) { > if (m->m_len > 0) { > - if ((m->m_flags & M_NOMAP) != 0) > + if ((m->m_flags & M_EXTPG) != 0) > error = sglist_append_mbuf_epg(sg, m, > mtod(m, vm_offset_t), m->m_len); > else > > Modified: head/sys/kern/uipc_ktls.c > ============================================================================== > --- head/sys/kern/uipc_ktls.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/uipc_ktls.c Sun May 3 00:21:11 2020 (r360581) > @@ -1289,7 +1289,7 @@ ktls_seq(struct sockbuf *sb, struct mbuf *m) > { > > for (; m != NULL; m = m->m_next) { > - KASSERT((m->m_flags & M_NOMAP) != 0, > + KASSERT((m->m_flags & M_EXTPG) != 0, > ("ktls_seq: mapped mbuf %p", m)); > > m->m_epg_seqno = sb->sb_tls_seqno; > @@ -1334,7 +1334,7 @@ ktls_frame(struct mbuf *top, struct ktls_session *tls, > * TLS frames require unmapped mbufs to store session > * info. > */ > - KASSERT((m->m_flags & M_NOMAP) != 0, > + KASSERT((m->m_flags & M_EXTPG) != 0, > ("ktls_frame: mapped mbuf %p (top = %p)\n", m, top)); > > tls_len = m->m_len; > @@ -1448,8 +1448,8 @@ ktls_enqueue(struct mbuf *m, struct socket *so, int pa > struct ktls_wq *wq; > bool running; > > - KASSERT(((m->m_flags & (M_NOMAP | M_NOTREADY)) == > - (M_NOMAP | M_NOTREADY)), > + KASSERT(((m->m_flags & (M_EXTPG | M_NOTREADY)) == > + (M_EXTPG | M_NOTREADY)), > ("ktls_enqueue: %p not unready & nomap mbuf\n", m)); > KASSERT(page_count != 0, ("enqueueing TLS mbuf with zero page count")); > > @@ -1518,8 +1518,8 @@ ktls_encrypt(struct mbuf *top) > KASSERT(m->m_epg_tls == tls, > ("different TLS sessions in a single mbuf chain: %p vs %p", > tls, m->m_epg_tls)); > - KASSERT((m->m_flags & (M_NOMAP | M_NOTREADY)) == > - (M_NOMAP | M_NOTREADY), > + KASSERT((m->m_flags & (M_EXTPG | M_NOTREADY)) == > + (M_EXTPG | M_NOTREADY), > ("%p not unready & nomap mbuf (top = %p)\n", m, top)); > KASSERT(npages + m->m_epg_npgs <= total_pages, > ("page count mismatch: top %p, total_pages %d, m %p", top, > > Modified: head/sys/kern/uipc_mbuf.c > ============================================================================== > --- head/sys/kern/uipc_mbuf.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/uipc_mbuf.c Sun May 3 00:21:11 2020 (r360581) > @@ -220,7 +220,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) > } > > n->m_flags |= M_EXT; > - n->m_flags |= m->m_flags & (M_RDONLY | M_NOMAP); > + n->m_flags |= m->m_flags & (M_RDONLY | M_EXTPG); > > /* See if this is the mbuf that holds the embedded refcount. */ > if (m->m_ext.ext_flags & EXT_FLAG_EMBREF) { > @@ -265,7 +265,7 @@ m_demote(struct mbuf *m0, int all, int flags) > if (m->m_flags & M_PKTHDR) > m_demote_pkthdr(m); > m->m_flags = m->m_flags & (M_EXT | M_RDONLY | M_NOFREE | > - M_NOMAP | flags); > + M_EXTPG | flags); > } > } > > @@ -396,7 +396,7 @@ m_move_pkthdr(struct mbuf *to, struct mbuf *from) > m_tag_delete_chain(to, NULL); > #endif > to->m_flags = (from->m_flags & M_COPYFLAGS) | > - (to->m_flags & (M_EXT | M_NOMAP)); > + (to->m_flags & (M_EXT | M_EXTPG)); > if ((to->m_flags & M_EXT) == 0) > to->m_data = to->m_pktdat; > to->m_pkthdr = from->m_pkthdr; /* especially tags */ > @@ -435,7 +435,7 @@ m_dup_pkthdr(struct mbuf *to, const struct mbuf *from, > m_tag_delete_chain(to, NULL); > #endif > to->m_flags = (from->m_flags & M_COPYFLAGS) | > - (to->m_flags & (M_EXT | M_NOMAP)); > + (to->m_flags & (M_EXT | M_EXTPG)); > if ((to->m_flags & M_EXT) == 0) > to->m_data = to->m_pktdat; > to->m_pkthdr = from->m_pkthdr; > @@ -645,7 +645,7 @@ m_copydata(const struct mbuf *m, int off, int len, cad > while (len > 0) { > KASSERT(m != NULL, ("m_copydata, length > size of mbuf chain")); > count = min(m->m_len - off, len); > - if ((m->m_flags & M_NOMAP) != 0) > + if ((m->m_flags & M_EXTPG) != 0) > m_copyfromunmapped(m, off, count, cp); > else > bcopy(mtod(m, caddr_t) + off, cp, count); > @@ -743,7 +743,7 @@ m_cat(struct mbuf *m, struct mbuf *n) > m = m->m_next; > while (n) { > if (!M_WRITABLE(m) || > - (n->m_flags & M_NOMAP) != 0 || > + (n->m_flags & M_EXTPG) != 0 || > M_TRAILINGSPACE(m) < n->m_len) { > /* just join the two chains */ > m->m_next = n; > @@ -861,7 +861,7 @@ m_pullup(struct mbuf *n, int len) > int count; > int space; > > - KASSERT((n->m_flags & M_NOMAP) == 0, > + KASSERT((n->m_flags & M_EXTPG) == 0, > ("%s: unmapped mbuf %p", __func__, n)); > > /* > @@ -1429,7 +1429,7 @@ frags_per_mbuf(struct mbuf *m) > { > int frags; > > - if ((m->m_flags & M_NOMAP) == 0) > + if ((m->m_flags & M_EXTPG) == 0) > return (1); > > /* > @@ -1718,7 +1718,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int ali > ssize_t total; > int progress = 0; > > - if (flags & M_NOMAP) > + if (flags & M_EXTPG) > return (m_uiotombuf_nomap(uio, how, len, align, flags)); > > /* > @@ -1840,7 +1840,7 @@ m_mbuftouio(struct uio *uio, const struct mbuf *m, int > for (; m != NULL; m = m->m_next) { > length = min(m->m_len, total - progress); > > - if ((m->m_flags & M_NOMAP) != 0) > + if ((m->m_flags & M_EXTPG) != 0) > error = m_unmappedtouio(m, 0, uio, length); > else > error = uiomove(mtod(m, void *), length, uio); > > Modified: head/sys/kern/uipc_sockbuf.c > ============================================================================== > --- head/sys/kern/uipc_sockbuf.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/uipc_sockbuf.c Sun May 3 00:21:11 2020 (r360581) > @@ -124,8 +124,8 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, > #ifdef KERN_TLS > /* Try to coalesce adjacent ktls mbuf hdr/trailers. */ > if ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && > - (m->m_flags & M_NOMAP) && > - (n->m_flags & M_NOMAP) && > + (m->m_flags & M_EXTPG) && > + (n->m_flags & M_EXTPG) && > !mbuf_has_tls_session(m) && > !mbuf_has_tls_session(n)) { > int hdr_len, trail_len; > @@ -146,7 +146,7 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, > #endif > > /* Compress small unmapped mbufs into plain mbufs. */ > - if ((m->m_flags & M_NOMAP) && m->m_len <= MLEN && > + if ((m->m_flags & M_EXTPG) && m->m_len <= MLEN && > !mbuf_has_tls_session(m)) { > MPASS(m->m_flags & M_EXT); > ext_size = m->m_ext.ext_size; > @@ -158,7 +158,7 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, > > while ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && > M_WRITABLE(m) && > - (m->m_flags & M_NOMAP) == 0 && > + (m->m_flags & M_EXTPG) == 0 && > !mbuf_has_tls_session(n) && > !mbuf_has_tls_session(m) && > n->m_len <= MCLBYTES / 4 && /* XXX: Don't copy too much */ > @@ -1172,7 +1172,7 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct > M_WRITABLE(n) && > ((sb->sb_flags & SB_NOCOALESCE) == 0) && > !(m->m_flags & M_NOTREADY) && > - !(n->m_flags & (M_NOTREADY | M_NOMAP)) && > + !(n->m_flags & (M_NOTREADY | M_EXTPG)) && > !mbuf_has_tls_session(m) && > !mbuf_has_tls_session(n) && > m->m_len <= MCLBYTES / 4 && /* XXX: Don't copy too much */ > @@ -1189,7 +1189,7 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct > m = m_free(m); > continue; > } > - if (m->m_len <= MLEN && (m->m_flags & M_NOMAP) && > + if (m->m_len <= MLEN && (m->m_flags & M_EXTPG) && > (m->m_flags & M_NOTREADY) == 0 && > !mbuf_has_tls_session(m)) > (void)mb_unmapped_compress(m); > > Modified: head/sys/kern/uipc_socket.c > ============================================================================== > --- head/sys/kern/uipc_socket.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/kern/uipc_socket.c Sun May 3 00:21:11 2020 (r360581) > @@ -1691,7 +1691,7 @@ restart: > if (tls != NULL) { > top = m_uiotombuf(uio, M_WAITOK, space, > tls->params.max_frame_len, > - M_NOMAP | > + M_EXTPG | > ((flags & MSG_EOR) ? M_EOR : 0)); > if (top != NULL) { > ktls_frame(top, tls, > @@ -2159,7 +2159,7 @@ dontblock: > SBLASTRECORDCHK(&so->so_rcv); > SBLASTMBUFCHK(&so->so_rcv); > SOCKBUF_UNLOCK(&so->so_rcv); > - if ((m->m_flags & M_NOMAP) != 0) > + if ((m->m_flags & M_EXTPG) != 0) > error = m_unmappedtouio(m, moff, uio, (int)len); > else > error = uiomove(mtod(m, char *) + moff, > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/netinet/tcp_output.c Sun May 3 00:21:11 2020 (r360581) > @@ -1911,7 +1911,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *ple > top = NULL; > pkthdrlen = NULL; > #ifdef KERN_TLS > - if (hw_tls && (m->m_flags & M_NOMAP)) > + if (hw_tls && (m->m_flags & M_EXTPG)) > tls = m->m_epg_tls; > else > tls = NULL; > @@ -1928,7 +1928,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *ple > } > #ifdef KERN_TLS > if (hw_tls) { > - if (m->m_flags & M_NOMAP) > + if (m->m_flags & M_EXTPG) > ntls = m->m_epg_tls; > else > ntls = NULL; > @@ -1961,14 +1961,14 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *ple > mlen = min(len, m->m_len - off); > if (seglimit) { > /* > - * For M_NOMAP mbufs, add 3 segments > + * For M_EXTPG mbufs, add 3 segments > * + 1 in case we are crossing page boundaries > * + 2 in case the TLS hdr/trailer are used > * It is cheaper to just add the segments > * than it is to take the cache miss to look > * at the mbuf ext_pgs state in detail. > */ > - if (m->m_flags & M_NOMAP) { > + if (m->m_flags & M_EXTPG) { > fragsize = min(segsize, PAGE_SIZE); > frags = 3; > } else { > > Modified: head/sys/netinet/tcp_pcap.c > ============================================================================== > --- head/sys/netinet/tcp_pcap.c Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/netinet/tcp_pcap.c Sun May 3 00:21:11 2020 (r360581) > @@ -384,7 +384,7 @@ tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct > __func__, n->m_flags)); > n->m_data = n->m_dat + M_LEADINGSPACE_NOWRITE(m); > n->m_len = m->m_len; > - if (m->m_flags & M_NOMAP) > + if (m->m_flags & M_EXTPG) > m_copydata(m, 0, m->m_len, n->m_data); > else > bcopy(M_START(m), n->m_dat, > > Modified: head/sys/sys/mbuf.h > ============================================================================== > --- head/sys/sys/mbuf.h Sun May 3 00:15:18 2020 (r360580) > +++ head/sys/sys/mbuf.h Sun May 3 00:21:11 2020 (r360581) > @@ -450,7 +450,7 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgof > #define M_MCAST 0x00000020 /* send/received as link-level multicast */ > #define M_PROMISC 0x00000040 /* packet was not for us */ > #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ > -#define M_NOMAP 0x00000100 /* mbuf data is unmapped */ > +#define M_EXTPG 0x00000100 /* has array of unmapped pages and TLS */ > #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ > #define M_TSTMP 0x00000400 /* rcv_tstmp field is valid */ > #define M_TSTMP_HPREC 0x00000800 /* rcv_tstmp is high-prec, typically > @@ -491,7 +491,7 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgof > */ > #define M_FLAG_BITS \ > "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ > - "\7M_PROMISC\10M_VLANTAG\11M_NOMAP\12M_NOFREE\13M_TSTMP\14M_TSTMP_HPREC\15M_TSTMP_LRO" > + "\7M_PROMISC\10M_VLANTAG\11M_EXTPG\12M_NOFREE\13M_TSTMP\14M_TSTMP_HPREC\15M_TSTMP_LRO" > #define M_FLAG_PROTOBITS \ > "\16M_PROTO1\17M_PROTO2\20M_PROTO3\21M_PROTO4" \ > "\22M_PROTO5\23M_PROTO6\24M_PROTO7\25M_PROTO8\26M_PROTO9" \ > @@ -1038,7 +1038,7 @@ m_extrefcnt(struct mbuf *m) > * be both the local data payload, or an external buffer area, depending on > * whether M_EXT is set). > */ > -#define M_WRITABLE(m) (((m)->m_flags & (M_RDONLY | M_NOMAP)) == 0 && \ > +#define M_WRITABLE(m) (((m)->m_flags & (M_RDONLY | M_EXTPG)) == 0 && \ > (!(((m)->m_flags & M_EXT)) || \ > (m_extrefcnt(m) == 1))) > > @@ -1061,7 +1061,7 @@ m_extrefcnt(struct mbuf *m) > * handling external storage, packet-header mbufs, and regular data mbufs. > */ > #define M_START(m) \ > - (((m)->m_flags & M_NOMAP) ? NULL : \ > + (((m)->m_flags & M_EXTPG) ? NULL : \ > ((m)->m_flags & M_EXT) ? (m)->m_ext.ext_buf : \ > ((m)->m_flags & M_PKTHDR) ? &(m)->m_pktdat[0] : \ > &(m)->m_dat[0]) > @@ -1559,7 +1559,7 @@ static inline bool > mbuf_has_tls_session(struct mbuf *m) > { > > - if (m->m_flags & M_NOMAP) { > + if (m->m_flags & M_EXTPG) { > MBUF_EXT_PGS_ASSERT(m); > if (m->m_epg_tls != NULL) { > return (true);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200503052542.GA18955>