On Sun, May 03, 2020 at 12:21:11AM +, 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.cSun May 3 00:15:18 2020
> (r360580)
> +++ head/sys/dev/cxgbe/tom/t4_cpl_io.cSun 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 to