The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3f43ada98c89bce5ae416e203ba0e81595a5cd88

commit 3f43ada98c89bce5ae416e203ba0e81595a5cd88
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2021-01-28 21:08:48 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2021-01-29 19:46:24 +0000

    Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG.
    
    Originally IFCAP_NOMAP meant that the mbuf has external storage pointer
    that points to unmapped address.  Then, this was extended to array of
    such pointers.  Then, such mbufs were augmented with header/trailer.
    Basically, extended mbufs are extended, and set of features is subject
    to change.  The new name should be generic enough to avoid further
    renaming.
---
 sbin/ifconfig/ifconfig.8            | 16 +++++++++-------
 sbin/ifconfig/ifconfig.c            |  4 ++--
 sys/dev/cxgbe/t4_main.c             |  6 +++---
 sys/dev/mlx5/mlx5_en/mlx5_en_main.c |  6 +++---
 sys/kern/uipc_ktls.c                |  2 +-
 sys/net/if.h                        |  2 +-
 sys/net/if_vlan.c                   |  4 ++--
 sys/net/iflib.c                     |  8 ++++----
 sys/netinet/ip_output.c             |  2 +-
 sys/netinet6/ip6_output.c           |  2 +-
 10 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index bbaaa00d419b..b8adad3c75b0 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd November 1, 2020
+.Dd January 28, 2021
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -554,12 +554,14 @@ and
 Enable use of rate limiting (packet pacing) for TLS offload.
 .It Fl txtlsrtlmt
 Disable use of rate limiting for TLS offload.
-.It Cm nomap
-If the driver supports unmapped network buffers,
-enable them on the interface.
-.It Fl nomap
-If the driver supports unmapped network buffers,
-disable them on the interface.
+.It Cm mextpg
+If the driver supports extended multi-page
+.Xr mbuf 9
+buffers, enable them on the interface.
+.It Fl mextpg
+If the driver supports extended multi-page
+.Xr mbuf 9
+biffers, disable them on the interface.
 .It Cm wol , wol_ucast , wol_mcast , wol_magic
 Enable Wake On Lan (WOL) support, if available.
 WOL is a facility whereby a machine in a low power state may be woken
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 90a84f2996bc..5b12baa0656e 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1658,8 +1658,8 @@ static struct cmd basic_cmds[] = {
        DEF_CMD("-link2",       -IFF_LINK2,     setifflags),
        DEF_CMD("monitor",      IFF_MONITOR,    setifflags),
        DEF_CMD("-monitor",     -IFF_MONITOR,   setifflags),
-       DEF_CMD("nomap",        IFCAP_NOMAP,    setifcap),
-       DEF_CMD("-nomap",       -IFCAP_NOMAP,   setifcap),
+       DEF_CMD("mextpg",       IFCAP_MEXTPG,   setifcap),
+       DEF_CMD("-mextpg",      -IFCAP_MEXTPG,  setifcap),
        DEF_CMD("staticarp",    IFF_STATICARP,  setifflags),
        DEF_CMD("-staticarp",   -IFF_STATICARP, setifflags),
        DEF_CMD("rxcsum6",      IFCAP_RXCSUM_IPV6,      setifcap),
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 32a229bed52b..994fe2e78de5 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -1782,7 +1782,7 @@ cxgbe_probe(device_t dev)
 #define T4_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \
     IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
     IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWCSUM_IPV6 | IFCAP_HWSTATS | \
-    IFCAP_HWRXTSTMP | IFCAP_NOMAP)
+    IFCAP_HWRXTSTMP | IFCAP_MEXTPG)
 #define T4_CAP_ENABLE (T4_CAP)
 
 static int
@@ -2182,8 +2182,8 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t 
data)
                                        rxq->iq.flags &= ~IQ_RX_TIMESTAMP;
                        }
                }
-               if (mask & IFCAP_NOMAP)
-                       ifp->if_capenable ^= IFCAP_NOMAP;
+               if (mask & IFCAP_MEXTPG)
+                       ifp->if_capenable ^= IFCAP_MEXTPG;
 
 #ifdef KERN_TLS
                if (mask & IFCAP_TXTLS)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c 
b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 023f519f7ced..296252875888 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -3379,8 +3379,8 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t 
data)
                                    "tso6 disabled due to -txcsum6.\n");
                        }
                }
-               if (mask & IFCAP_NOMAP)
-                       ifp->if_capenable ^= IFCAP_NOMAP;
+               if (mask & IFCAP_MEXTPG)
+                       ifp->if_capenable ^= IFCAP_MEXTPG;
                if (mask & IFCAP_TXTLS4)
                        ifp->if_capenable ^= IFCAP_TXTLS4;
                if (mask & IFCAP_TXTLS6)
@@ -4397,7 +4397,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev)
        ifp->if_capabilities |= IFCAP_LRO;
        ifp->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO;
        ifp->if_capabilities |= IFCAP_HWSTATS | IFCAP_HWRXTSTMP;
-       ifp->if_capabilities |= IFCAP_NOMAP;
+       ifp->if_capabilities |= IFCAP_MEXTPG;
        ifp->if_capabilities |= IFCAP_TXTLS4 | IFCAP_TXTLS6;
 #ifdef RATELIMIT
        ifp->if_capabilities |= IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT;
diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
index 72c228e80199..700206681965 100644
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -868,7 +868,7 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_session 
*tls, bool force,
        params.hdr.numa_domain = inp->inp_numa_domain;
        INP_RUNLOCK(inp);
 
-       if ((ifp->if_capenable & IFCAP_NOMAP) == 0) {   
+       if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) {
                error = EOPNOTSUPP;
                goto out;
        }
diff --git a/sys/net/if.h b/sys/net/if.h
index a886474780dd..eabd4e053733 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -245,7 +245,7 @@ struct if_data {
 #define        IFCAP_HWSTATS           0x800000 /* manages counters internally 
*/
 #define        IFCAP_TXRTLMT           0x1000000 /* hardware supports TX rate 
limiting */
 #define        IFCAP_HWRXTSTMP         0x2000000 /* hardware rx timestamping */
-#define        IFCAP_NOMAP             0x4000000 /* can TX unmapped mbufs */
+#define        IFCAP_MEXTPG            0x4000000 /* understands M_EXTPG mbufs 
*/
 #define        IFCAP_TXTLS4            0x8000000 /* can do TLS encryption and 
segmentation for TCP */
 #define        IFCAP_TXTLS6            0x10000000 /* can do TLS encryption and 
segmentation for TCP6 */
 #define        IFCAP_VXLAN_HWCSUM      0x20000000 /* can do IFCAN_HWCSUM on 
VXLANs */
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 9703e5e7753f..e1c4160495bc 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1775,8 +1775,8 @@ vlan_capabilities(struct ifvlan *ifv)
         * are prepended in normal mbufs to unmapped mbufs holding
         * payload data.
         */
-       cap |= (p->if_capabilities & IFCAP_NOMAP);
-       ena |= (mena & IFCAP_NOMAP);
+       cap |= (p->if_capabilities & IFCAP_MEXTPG);
+       ena |= (mena & IFCAP_MEXTPG);
 
        /*
         * If the parent interface can offload encryption and segmentation
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index d10c11f865fe..cfc6972bf987 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -4231,7 +4231,7 @@ iflib_if_qflush(if_t ifp)
 #define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \
                     IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \
                     IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | \
-                    IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM | IFCAP_NOMAP)
+                    IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM | IFCAP_MEXTPG)
 
 static int
 iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
@@ -4358,7 +4358,7 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data)
 
                oldmask = if_getcapenable(ifp);
                mask = ifr->ifr_reqcap ^ oldmask;
-               mask &= ctx->ifc_softc_ctx.isc_capabilities | IFCAP_NOMAP;
+               mask &= ctx->ifc_softc_ctx.isc_capabilities | IFCAP_MEXTPG;
                setmask = 0;
 #ifdef TCP_OFFLOAD
                setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6);
@@ -4759,9 +4759,9 @@ iflib_device_register(device_t dev, void *sc, 
if_shared_ctx_t sctx, if_ctx_t *ct
 #endif
 
        if_setcapabilities(ifp,
-           scctx->isc_capabilities | IFCAP_HWSTATS | IFCAP_NOMAP);
+           scctx->isc_capabilities | IFCAP_HWSTATS | IFCAP_MEXTPG);
        if_setcapenable(ifp,
-           scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_NOMAP);
+           scctx->isc_capenable | IFCAP_HWSTATS | IFCAP_MEXTPG);
 
        if (scctx->isc_ntxqsets == 0 || (scctx->isc_ntxqsets_max && 
scctx->isc_ntxqsets_max < scctx->isc_ntxqsets))
                scctx->isc_ntxqsets = scctx->isc_ntxqsets_max;
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 2d45d583df15..405490e890c0 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -746,7 +746,7 @@ sendit:
                }
                in_delayed_cksum(m);
                m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
-       } else if ((ifp->if_capenable & IFCAP_NOMAP) == 0) {
+       } else if ((ifp->if_capenable & IFCAP_MEXTPG) == 0) {
                m = mb_unmapped_to_ext(m);
                if (m == NULL) {
                        IPSTAT_INC(ips_odropped);
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 4e8f22a01b0a..df1e9e6f2dcd 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -225,7 +225,7 @@ ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, 
int csum_flags,
 #if defined(SCTP) || defined(SCTP_SUPPORT)
            (csum_flags & CSUM_SCTP_IPV6) ||
 #endif
-           (!frag && (ifp->if_capenable & IFCAP_NOMAP) == 0)) {
+           (!frag && (ifp->if_capenable & IFCAP_MEXTPG) == 0)) {
                m = mb_unmapped_to_ext(m);
                if (m == NULL) {
                        if (frag)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to