Catch up with 6edfd179c8
: 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.
This commit is contained in:
parent
cf6ff85fe8
commit
3f43ada98c
@ -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
|
||||
|
@ -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),
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -746,7 +746,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
}
|
||||
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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user