diff --git a/sys/dev/age/if_age.c b/sys/dev/age/if_age.c index 7bc56a75da0c..829f350b08f5 100644 --- a/sys/dev/age/if_age.c +++ b/sys/dev/age/if_age.c @@ -1521,7 +1521,7 @@ age_encap(struct age_softc *sc, struct mbuf **m_head) if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); /* Release original mbufs. */ m_freem(*m_head); if (m == NULL) { @@ -1599,7 +1599,7 @@ age_encap(struct age_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->age_cdata.age_tx_tag, map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, AGE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, AGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -3061,7 +3061,7 @@ age_newbuf(struct age_softc *sc, struct age_rxdesc *rxd) AGE_LOCK_ASSERT(sc); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index 9fa29b8db137..2ee9513009c6 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -2047,7 +2047,7 @@ alc_encap(struct alc_softc *sc, struct mbuf **m_head) if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); /* Release original mbufs. */ m_freem(*m_head); if (m == NULL) { @@ -2125,7 +2125,7 @@ alc_encap(struct alc_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->alc_cdata.alc_tx_tag, map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, ALC_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, ALC_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -2803,7 +2803,7 @@ alc_newbuf(struct alc_softc *sc, struct alc_rxdesc *rxd) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = RX_BUF_SIZE_MAX; @@ -2923,7 +2923,7 @@ alc_fixup_rx(struct ifnet *ifp, struct mbuf *m) * header from the mbuf chain. This can save lots of CPU * cycles for jumbo frame. */ - MGETHDR(n, M_DONTWAIT, MT_DATA); + MGETHDR(n, M_NOWAIT, MT_DATA); if (n == NULL) { ifp->if_iqdrops++; m_freem(m); diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c index f1f35ed9d529..9537388d3e56 100644 --- a/sys/dev/ale/if_ale.c +++ b/sys/dev/ale/if_ale.c @@ -1640,7 +1640,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head) if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); /* Release original mbufs. */ m_freem(*m_head); if (m == NULL) { @@ -1657,7 +1657,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head) if ((sc->ale_flags & ALE_FLAG_TXCSUM_BUG) != 0 && (m->m_pkthdr.csum_flags & ALE_CSUM_FEATURES) != 0 && (mtod(m, intptr_t) & 3) != 0) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { *m_head = NULL; return (ENOBUFS); @@ -1742,7 +1742,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->ale_cdata.ale_tx_tag, map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, ALE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, ALE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index 5d90850086e1..b2a13df8447a 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -946,12 +946,12 @@ an_rxeof(struct an_softc *sc) /* dump raw 802.11 packet to bpf and skip ip stack */ BPF_TAP(ifp, bpf_buf, len); } else { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { ifp->if_ierrors++; return; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (!(m->m_flags & M_EXT)) { m_freem(m); ifp->if_ierrors++; @@ -1037,12 +1037,12 @@ an_rxeof(struct an_softc *sc) if (an_rx_desc.an_done && !an_rx_desc.an_valid) { buf = sc->an_rx_buffer[count].an_dma_vaddr; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { ifp->if_ierrors++; return; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (!(m->m_flags & M_EXT)) { m_freem(m); ifp->if_ierrors++; diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 3ebfb2ffe0bc..543ba4381808 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -232,7 +232,7 @@ ath_legacy_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) * multiple of the cache line size. Not doing this * causes weird stuff to happen (for the 5210 at least). */ - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { DPRINTF(sc, ATH_DEBUG_ANY, "%s: no mbuf/cluster\n", __func__); diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c index dc7fd9ac4fcc..301a22cc060f 100644 --- a/sys/dev/ath/if_ath_rx_edma.c +++ b/sys/dev/ath/if_ath_rx_edma.c @@ -518,7 +518,7 @@ ath_edma_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) ATH_RX_LOCK_ASSERT(sc); - m = m_getm(NULL, sc->sc_edma_bufsize, M_DONTWAIT, MT_DATA); + m = m_getm(NULL, sc->sc_edma_bufsize, M_NOWAIT, MT_DATA); if (! m) return (ENOBUFS); /* XXX ?*/ diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index 7f97af40ca78..199d890029d2 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -325,7 +325,7 @@ ath_tx_dmasetup(struct ath_softc *sc, struct ath_buf *bf, struct mbuf *m0) */ if (bf->bf_nseg > ATH_TXDESC) { /* too many desc's, linearize */ sc->sc_stats.ast_tx_linear++; - m = m_collapse(m0, M_DONTWAIT, ATH_TXDESC); + m = m_collapse(m0, M_NOWAIT, ATH_TXDESC); if (m == NULL) { ath_freetx(m0); sc->sc_stats.ast_tx_nombuf++; diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 1fb583f713cb..2471f1926ccd 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -5437,9 +5437,9 @@ bce_get_rx_buf(struct bce_softc *sc, struct mbuf *m, u16 *prod, /* This is a new mbuf allocation. */ if (bce_hdr_split == TRUE) - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); else - m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, sc->rx_bd_mbuf_alloc_size); if (m_new == NULL) { @@ -5559,7 +5559,7 @@ bce_get_pg_buf(struct bce_softc *sc, struct mbuf *m, u16 *prod, goto bce_get_pg_buf_exit); /* This is a new mbuf allocation. */ - m_new = m_getcl(M_DONTWAIT, MT_DATA, 0); + m_new = m_getcl(M_NOWAIT, MT_DATA, 0); if (m_new == NULL) { sc->mbuf_alloc_failed_count++; rc = ENOBUFS; @@ -7320,7 +7320,7 @@ bce_tso_setup(struct bce_softc *sc, struct mbuf **m_head, u16 *flags) /* Controller may modify mbuf chains. */ if (M_WRITABLE(*m_head) == 0) { - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { sc->mbuf_alloc_failed_count++; @@ -7486,7 +7486,7 @@ bce_tx_encap(struct bce_softc *sc, struct mbuf **m_head) sc->mbuf_frag_count++; /* Try to defrag the mbuf. */ - m0 = m_collapse(*m_head, M_DONTWAIT, BCE_MAX_SEGMENTS); + m0 = m_collapse(*m_head, M_NOWAIT, BCE_MAX_SEGMENTS); if (m0 == NULL) { /* Defrag was unsuccessful */ m_freem(*m_head); diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c index 06c8fdab14ad..be7e2a4053bf 100644 --- a/sys/dev/bfe/if_bfe.c +++ b/sys/dev/bfe/if_bfe.c @@ -791,7 +791,7 @@ bfe_list_newbuf(struct bfe_softc *sc, int c) u_int32_t ctrl; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); m->m_len = m->m_pkthdr.len = MCLBYTES; if (bus_dmamap_load_mbuf_sg(sc->bfe_rxmbuf_tag, sc->bfe_rx_sparemap, @@ -1519,7 +1519,7 @@ bfe_encap(struct bfe_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->bfe_txmbuf_tag, r->bfe_map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, BFE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, BFE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 9855bbd2ae86..e7cb2f7a5e26 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1312,12 +1312,12 @@ bge_newbuf_std(struct bge_softc *sc, int i) if (sc->bge_flags & BGE_FLAG_JUMBO_STD && (sc->bge_ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN))) { - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MJUM9BYTES; } else { - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1368,11 +1368,11 @@ bge_newbuf_jumbo(struct bge_softc *sc, int i) struct mbuf *m; int error, nsegs; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); - m_cljget(m, M_DONTWAIT, MJUM9BYTES); + m_cljget(m, M_NOWAIT, MJUM9BYTES); if (!(m->m_flags & M_EXT)) { m_freem(m); return (ENOBUFS); @@ -4946,7 +4946,7 @@ bge_cksum_pad(struct mbuf *m) /* Allocate new empty mbuf, pad it. Compact later. */ struct mbuf *n; - MGET(n, M_DONTWAIT, MT_DATA); + MGET(n, M_NOWAIT, MT_DATA); if (n == NULL) return (ENOBUFS); n->m_len = 0; @@ -4988,7 +4988,7 @@ bge_check_short_dma(struct mbuf *m) } if (found > 1) { - n = m_defrag(m, M_DONTWAIT); + n = m_defrag(m, M_NOWAIT); if (n == NULL) m_freem(m); } else @@ -5008,7 +5008,7 @@ bge_setup_tso(struct bge_softc *sc, struct mbuf *m, uint16_t *mss, if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - n = m_dup(m, M_DONTWAIT); + n = m_dup(m, M_NOWAIT); m_freem(m); if (n == NULL) return (NULL); @@ -5125,9 +5125,9 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx) * DMA read operation. */ if (sc->bge_forced_collapse == 1) - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); else - m = m_collapse(m, M_DONTWAIT, + m = m_collapse(m, M_NOWAIT, sc->bge_forced_collapse); if (m == NULL) m = *m_head; @@ -5139,7 +5139,7 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx) error = bus_dmamap_load_mbuf_sg(sc->bge_cdata.bge_tx_mtag, map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(m, M_DONTWAIT, BGE_NSEG_NEW); + m = m_collapse(m, M_NOWAIT, BGE_NSEG_NEW); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/bm/if_bm.c b/sys/dev/bm/if_bm.c index 01706dfeb5e1..cce5ee387e59 100644 --- a/sys/dev/bm/if_bm.c +++ b/sys/dev/bm/if_bm.c @@ -539,7 +539,7 @@ bm_dummypacket(struct bm_softc *sc) ifp = sc->sc_ifp; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return; @@ -793,7 +793,7 @@ bm_encap(struct bm_softc *sc, struct mbuf **m_head) *m_head, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, nsegs); + m = m_collapse(*m_head, M_NOWAIT, nsegs); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1238,7 +1238,7 @@ bm_add_rxbuf(struct bm_softc *sc, int idx) bus_dma_segment_t segs[1]; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index cb4805b258af..25b5f2bc16d4 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -2534,7 +2534,7 @@ bwi_newbuf(struct bwi_softc *sc, int buf_idx, int init) KASSERT(buf_idx < BWI_RX_NDESC, ("buf_idx %d", buf_idx)); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { error = ENOBUFS; @@ -3015,7 +3015,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m, /* * Setup the embedded TX header */ - M_PREPEND(m, sizeof(*hdr), M_DONTWAIT); + M_PREPEND(m, sizeof(*hdr), M_NOWAIT); if (m == NULL) { if_printf(ifp, "%s: prepend TX header failed\n", __func__); return ENOBUFS; @@ -3074,7 +3074,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m, if (error) { /* error == EFBIG */ struct mbuf *m_new; - m_new = m_defrag(m, M_DONTWAIT); + m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { if_printf(ifp, "%s: can't defrag TX buffer\n", __func__); @@ -3195,7 +3195,7 @@ bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m, /* * Setup the embedded TX header */ - M_PREPEND(m, sizeof(*hdr), M_DONTWAIT); + M_PREPEND(m, sizeof(*hdr), M_NOWAIT); if (m == NULL) { if_printf(ifp, "%s: prepend TX header failed\n", __func__); return ENOBUFS; @@ -3249,7 +3249,7 @@ bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m, __func__, error); goto back; } - m_new = m_defrag(m, M_DONTWAIT); + m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { if_printf(ifp, "%s: can't defrag TX buffer\n", __func__); diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index b2cd52731cb7..94797b319851 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -1428,7 +1428,7 @@ bwn_pio_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) /* * XXX please removes m_defrag(9) */ - m_new = m_defrag(m, M_DONTWAIT); + m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { device_printf(sc->sc_dev, "%s: can't defrag TX buffer\n", @@ -1544,7 +1544,7 @@ bwn_dma_tx_start(struct bwn_mac *mac, struct ieee80211_node *ni, struct mbuf *m) if (error) { /* error == EFBIG */ struct mbuf *m_new; - m_new = m_defrag(m, M_DONTWAIT); + m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { if_printf(ifp, "%s: can't defrag TX buffer\n", __func__); @@ -9124,7 +9124,7 @@ bwn_pio_rxeof(struct bwn_pio_rxqueue *prq) padding = (macstat & BWN_RX_MAC_PADDING) ? 2 : 0; totlen = len + padding; KASSERT(totlen <= MCLBYTES, ("too big..\n")); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { device_printf(sc->sc_dev, "%s: out of memory", __func__); goto error; @@ -9183,7 +9183,7 @@ bwn_dma_newbuf(struct bwn_dma_ring *dr, struct bwn_dmadesc_generic *desc, struct mbuf *m; int error; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { error = ENOBUFS; diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c index 1193865a1cf0..52d2c1bc174e 100644 --- a/sys/dev/bxe/if_bxe.c +++ b/sys/dev/bxe/if_bxe.c @@ -3757,7 +3757,7 @@ bxe_alloc_buf_rings(struct bxe_softc *sc) if (fp != NULL) { fp->br = buf_ring_alloc(BXE_BR_SIZE, - M_DEVBUF, M_DONTWAIT, &fp->mtx); + M_DEVBUF, M_NOWAIT, &fp->mtx); if (fp->br == NULL) { rc = ENOMEM; goto bxe_alloc_buf_rings_exit; @@ -8960,7 +8960,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, struct mbuf **m_head) } else if (error == EFBIG) { /* Possibly recoverable with defragmentation. */ fp->mbuf_defrag_attempts++; - m0 = m_defrag(*m_head, M_DONTWAIT); + m0 = m_defrag(*m_head, M_NOWAIT); if (m0 == NULL) { fp->mbuf_defrag_failures++; rc = ENOBUFS; @@ -10467,7 +10467,7 @@ bxe_alloc_tpa_mbuf(struct bxe_fastpath *fp, int queue) #endif /* Allocate the new TPA mbuf. */ - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size); if (__predict_false(m == NULL)) { fp->mbuf_tpa_alloc_failed++; rc = ENOBUFS; @@ -10661,7 +10661,7 @@ bxe_alloc_rx_sge_mbuf(struct bxe_fastpath *fp, uint16_t index) #endif /* Allocate a new SGE mbuf. */ - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, SGE_PAGE_SIZE); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, SGE_PAGE_SIZE); if (__predict_false(m == NULL)) { fp->mbuf_sge_alloc_failed++; rc = ENOMEM; @@ -10851,7 +10851,7 @@ bxe_alloc_rx_bd_mbuf(struct bxe_fastpath *fp, uint16_t index) #endif /* Allocate the new RX BD mbuf. */ - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, sc->mbuf_alloc_size); if (__predict_false(m == NULL)) { fp->mbuf_rx_bd_alloc_failed++; rc = ENOBUFS; diff --git a/sys/dev/cas/if_cas.c b/sys/dev/cas/if_cas.c index 8705ac709101..f846350eee54 100644 --- a/sys/dev/cas/if_cas.c +++ b/sys/dev/cas/if_cas.c @@ -1192,7 +1192,7 @@ cas_load_txmbuf(struct cas_softc *sc, struct mbuf **m_head) cflags = 0; if (((*m_head)->m_pkthdr.csum_flags & CAS_CSUM_FEATURES) != 0) { if (M_WRITABLE(*m_head) == 0) { - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); *m_head = m; if (m == NULL) @@ -1215,7 +1215,7 @@ cas_load_txmbuf(struct cas_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, CAS_NTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, CAS_NTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1714,7 +1714,7 @@ cas_rint(struct cas_softc *sc) __func__, idx, off, len); #endif rxds = &sc->sc_rxdsoft[idx]; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m != NULL) { refcount_acquire(&rxds->rxds_refcount); bus_dmamap_sync(sc->sc_rdmatag, @@ -1759,7 +1759,7 @@ cas_rint(struct cas_softc *sc) __func__, idx, off, len); #endif rxds = &sc->sc_rxdsoft[idx]; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m != NULL) { refcount_acquire(&rxds->rxds_refcount); off += ETHER_ALIGN; @@ -1796,7 +1796,7 @@ cas_rint(struct cas_softc *sc) #endif rxds2 = &sc->sc_rxdsoft[idx2]; if (m != NULL) { - MGET(m2, M_DONTWAIT, MT_DATA); + MGET(m2, M_NOWAIT, MT_DATA); if (m2 != NULL) { refcount_acquire( &rxds2->rxds_refcount); diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c index 7fb208a02d8d..700ab80a8899 100644 --- a/sys/dev/ce/if_ce.c +++ b/sys/dev/ce/if_ce.c @@ -319,10 +319,10 @@ static struct mbuf *makembuf (void *buf, unsigned len) { struct mbuf *m; - MGETHDR (m, M_DONTWAIT, MT_DATA); + MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_DONTWAIT); + MCLGET (m, M_NOWAIT); if (! (m->m_flags & M_EXT)) { m_freem (m); return 0; diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c index eb8967576cc8..f7ceae601354 100644 --- a/sys/dev/cm/smc90cx6.c +++ b/sys/dev/cm/smc90cx6.c @@ -502,7 +502,7 @@ cm_srint_locked(vsc) buffer = sc->sc_rx_act ^ 1; /* Allocate header mbuf */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == 0) { /* @@ -539,7 +539,7 @@ cm_srint_locked(vsc) */ if ((len + 2 + 2) > MHLEN) { /* attach an mbuf cluster */ - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); /* Insist on getting a cluster */ if ((m->m_flags & M_EXT) == 0) { diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 49e329e85af3..4ff0bccd5c9d 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -203,10 +203,10 @@ static struct mbuf *makembuf (void *buf, unsigned len) { struct mbuf *m; - MGETHDR (m, M_DONTWAIT, MT_DATA); + MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_DONTWAIT); + MCLGET (m, M_NOWAIT); if (! (m->m_flags & M_EXT)) { m_freem (m); return 0; diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c index 3789ea48e076..c89760abcfaf 100644 --- a/sys/dev/cs/if_cs.c +++ b/sys/dev/cs/if_cs.c @@ -726,12 +726,12 @@ cs_get_packet(struct cs_softc *sc) return (-1); } - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m==NULL) return (-1); if (length > MHLEN) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (!(m->m_flags & M_EXT)) { m_freem(m); return (-1); diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index dbdca97411d0..7b4abc3f0131 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -205,10 +205,10 @@ static struct mbuf *makembuf (void *buf, u_int len) { struct mbuf *m; - MGETHDR (m, M_DONTWAIT, MT_DATA); + MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_DONTWAIT); + MCLGET (m, M_NOWAIT); if (! (m->m_flags & M_EXT)) { m_freem (m); return 0; diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index c8f53a00bec7..cb154867dff4 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -252,13 +252,13 @@ static struct mbuf *makembuf (void *buf, u_int len) { struct mbuf *m, *o, *p; - MGETHDR (m, M_DONTWAIT, MT_DATA); + MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; if (len >= MINCLSIZE) - MCLGET (m, M_DONTWAIT); + MCLGET (m, M_NOWAIT); m->m_pkthdr.len = len; m->m_len = 0; @@ -271,13 +271,13 @@ static struct mbuf *makembuf (void *buf, u_int len) if (! n) { /* Allocate new mbuf. */ o = p; - MGET (p, M_DONTWAIT, MT_DATA); + MGET (p, M_NOWAIT, MT_DATA); if (! p) { m_freem (m); return 0; } if (len >= MINCLSIZE) - MCLGET (p, M_DONTWAIT); + MCLGET (p, M_NOWAIT); p->m_len = 0; o->m_next = p; diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 455c7235747d..fee0653fbfd9 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -1442,7 +1442,7 @@ send_pktsched_cmd(struct adapter *adap, int sched, int qidx, int lo, struct mbuf *m; struct mngt_pktsched_wr *req; - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m) { req = mtod(m, struct mngt_pktsched_wr *); req->wr.wrh_hi = htonl(V_WR_OP(FW_WROPCODE_MNGT)); diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 0108339ffd56..3a5d8f6fbfdc 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -2710,7 +2710,7 @@ get_packet(adapter_t *adap, unsigned int drop_thres, struct sge_qset *qs, if (recycle_enable && len <= SGE_RX_COPY_THRES && sopeop == RSPQ_SOP_EOP) { - if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL) + if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) goto skip_recycle; cl = mtod(m, void *); memcpy(cl, sd->rxsd_cl, len); @@ -2866,10 +2866,10 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget) printf("async notification\n"); if (mh->mh_head == NULL) { - mh->mh_head = m_gethdr(M_DONTWAIT, MT_DATA); + mh->mh_head = m_gethdr(M_NOWAIT, MT_DATA); m = mh->mh_head; } else { - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); } if (m == NULL) goto no_mem; @@ -2882,7 +2882,7 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget) rspq->async_notif++; goto skip; } else if (flags & F_RSPD_IMM_DATA_VALID) { - struct mbuf *m = m_gethdr(M_DONTWAIT, MT_DATA); + struct mbuf *m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { no_mem: diff --git a/sys/dev/cxgb/sys/uipc_mvec.c b/sys/dev/cxgb/sys/uipc_mvec.c index f52daa681b13..dea5500c2ed9 100644 --- a/sys/dev/cxgb/sys/uipc_mvec.c +++ b/sys/dev/cxgb/sys/uipc_mvec.c @@ -98,7 +98,7 @@ busdma_map_sg_collapse(bus_dma_tag_t tag, bus_dmamap_t map, printf("mbuf chain too long: %d max allowed %d\n", seg_count, TX_MAX_SEGS); if (!defragged) { - n = m_defrag(*m, M_DONTWAIT); + n = m_defrag(*m, M_NOWAIT); if (n == NULL) { err = ENOBUFS; goto err_out; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index fa33d1833a68..62d9eb3902ed 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2761,7 +2761,7 @@ start: sgl->nsegs = 0; rc = bus_dmamap_load_mbuf_sg(txq->tx_tag, txm->map, m, sgl->seg, &sgl->nsegs, BUS_DMA_NOWAIT); if (rc == EFBIG && defragged == 0) { - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); if (m == NULL) return (EFBIG); diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index 31eb607fcf66..16eb707c70cf 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -1207,7 +1207,7 @@ t4_soreceive_ddp(struct socket *so, struct sockaddr **psa, struct uio *uio, KASSERT(sb->sb_mb != NULL, ("%s: len > 0 && sb->sb_mb empty", __func__)); - m = m_copym(sb->sb_mb, 0, len, M_DONTWAIT); + m = m_copym(sb->sb_mb, 0, len, M_NOWAIT); if (m == NULL) len = 0; /* Don't flush data from sockbuf. */ else diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index e5c457d0a777..523f7f345503 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -1164,7 +1164,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss_header *rss, * or may not be stashed in the original SYN mbuf passed to us. * Just copy it over instead of dealing with all possibilities. */ - m = m_dup(synqe->syn, M_DONTWAIT); + m = m_dup(synqe->syn, M_NOWAIT); if (m) m->m_pkthdr.rcvif = ifp; diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 01f49749f3eb..2c8d1ca250de 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -2650,7 +2650,7 @@ dc_newbuf(struct dc_softc *sc, int i) bus_dma_segment_t segs[1]; int error, nseg; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -3387,7 +3387,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head) defragged = 0; if (sc->dc_flags & DC_TX_COALESCE && ((*m_head)->m_next != NULL || sc->dc_flags & DC_TX_ALIGN)) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); defragged = 1; } else { /* @@ -3402,7 +3402,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head) if (i > DC_TX_LIST_CNT / 4 || DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_RSVD) { - m = m_collapse(*m_head, M_DONTWAIT, DC_MAXFRAGS); + m = m_collapse(*m_head, M_NOWAIT, DC_MAXFRAGS); defragged = 1; } } @@ -3419,7 +3419,7 @@ dc_encap(struct dc_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); if (error == EFBIG) { - if (defragged != 0 || (m = m_collapse(*m_head, M_DONTWAIT, + if (defragged != 0 || (m = m_collapse(*m_head, M_NOWAIT, DC_MAXFRAGS)) == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 2503961bc36f..ace5542c5014 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -257,7 +257,7 @@ tulip_txprobe(tulip_softc_t * const sc) * to verify the connectivity. */ TULIP_LOCK_ASSERT(sc); - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return 0; /* @@ -3517,7 +3517,7 @@ tulip_rx_intr(tulip_softc_t * const sc) ms->m_pkthdr.len = total_len; ms->m_pkthdr.rcvif = ifp; m0 = ms; - ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + ms = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); #endif TULIP_UNLOCK(sc); CTR1(KTR_TULIP, "tulip_rx_intr: passing %p to upper layer", m0); @@ -3528,7 +3528,7 @@ tulip_rx_intr(tulip_softc_t * const sc) * If we are priming the TULIP with mbufs, then allocate * a new cluster for the next descriptor. */ - ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + ms = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); #ifndef __NO_STRICT_ALIGNMENT skip_input: @@ -3970,7 +3970,7 @@ tulip_txput(tulip_softc_t * const sc, struct mbuf *m) * to recopy it into one mbuf and then try again. If * we can't recopy it, try again later. */ - m0 = m_defrag(m, M_DONTWAIT); + m0 = m_defrag(m, M_NOWAIT); if (m0 == NULL) { sc->tulip_flags |= TULIP_WANTTXSTART; #if defined(TULIP_DEBUG) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 112b538f5585..8ba32e00d834 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1831,7 +1831,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp) if (do_tso || (m_head->m_next != NULL && m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD)) { if (M_WRITABLE(*m_headp) == 0) { - m_head = m_dup(*m_headp, M_DONTWAIT); + m_head = m_dup(*m_headp, M_NOWAIT); m_freem(*m_headp); if (m_head == NULL) { *m_headp = NULL; @@ -1948,7 +1948,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp) if (error == EFBIG && remap) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); + m = m_defrag(*m_headp, M_NOWAIT); if (m == NULL) { adapter->mbuf_alloc_failed++; m_freem(*m_headp); @@ -3930,7 +3930,7 @@ em_refresh_mbufs(struct rx_ring *rxr, int limit) while (j != limit) { rxbuf = &rxr->rx_buffers[i]; if (rxbuf->m_head == NULL) { - m = m_getjcl(M_DONTWAIT, MT_DATA, + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); /* ** If we have a temporary resource shortage @@ -4100,7 +4100,7 @@ em_setup_receive_ring(struct rx_ring *rxr) continue; } #endif /* DEV_NETMAP */ - rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA, + rxbuf->m_head = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (rxbuf->m_head == NULL) { error = ENOBUFS; @@ -4579,7 +4579,7 @@ em_fixup_rx(struct rx_ring *rxr) bcopy(m->m_data, m->m_data + ETHER_HDR_LEN, m->m_len); m->m_data += ETHER_HDR_LEN; } else { - MGETHDR(n, M_DONTWAIT, MT_DATA); + MGETHDR(n, M_NOWAIT, MT_DATA); if (n != NULL) { bcopy(m->m_data, n->m_data, ETHER_HDR_LEN); m->m_data += ETHER_HDR_LEN; diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index cf70965232ca..8eb3011799e9 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -1830,7 +1830,7 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp) if (do_tso || (m_head->m_next != NULL && m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD)) { if (M_WRITABLE(*m_headp) == 0) { - m_head = m_dup(*m_headp, M_DONTWAIT); + m_head = m_dup(*m_headp, M_NOWAIT); m_freem(*m_headp); if (m_head == NULL) { *m_headp = NULL; @@ -1935,7 +1935,7 @@ igb_xmit(struct tx_ring *txr, struct mbuf **m_headp) if (error == EFBIG && remap) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); + m = m_defrag(*m_headp, M_NOWAIT); if (m == NULL) { adapter->mbuf_defrag_failed++; m_freem(*m_headp); @@ -3983,7 +3983,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, int limit) if (rxr->hdr_split == FALSE) goto no_split; if (rxbuf->m_head == NULL) { - mh = m_gethdr(M_DONTWAIT, MT_DATA); + mh = m_gethdr(M_NOWAIT, MT_DATA); if (mh == NULL) goto update; } else @@ -4009,7 +4009,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, int limit) htole64(hseg[0].ds_addr); no_split: if (rxbuf->m_pack == NULL) { - mp = m_getjcl(M_DONTWAIT, MT_DATA, + mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (mp == NULL) goto update; @@ -4225,7 +4225,7 @@ igb_setup_receive_ring(struct rx_ring *rxr) goto skip_head; /* First the header */ - rxbuf->m_head = m_gethdr(M_DONTWAIT, MT_DATA); + rxbuf->m_head = m_gethdr(M_NOWAIT, MT_DATA); if (rxbuf->m_head == NULL) { error = ENOBUFS; goto fail; @@ -4247,7 +4247,7 @@ igb_setup_receive_ring(struct rx_ring *rxr) skip_head: /* Now the payload cluster */ - rxbuf->m_pack = m_getjcl(M_DONTWAIT, MT_DATA, + rxbuf->m_pack = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (rxbuf->m_pack == NULL) { error = ENOBUFS; diff --git a/sys/dev/e1000/if_lem.c b/sys/dev/e1000/if_lem.c index aeb32952de68..58e6c7eefba0 100644 --- a/sys/dev/e1000/if_lem.c +++ b/sys/dev/e1000/if_lem.c @@ -1566,7 +1566,7 @@ lem_xmit(struct adapter *adapter, struct mbuf **m_headp) if (error == EFBIG) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); + m = m_defrag(*m_headp, M_NOWAIT); if (m == NULL) { adapter->mbuf_alloc_failed++; m_freem(*m_headp); @@ -3075,7 +3075,7 @@ lem_get_buf(struct adapter *adapter, int i) struct em_buffer *rx_buffer; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { adapter->mbuf_cluster_failed++; return (ENOBUFS); @@ -3633,7 +3633,7 @@ lem_fixup_rx(struct adapter *adapter) bcopy(m->m_data, m->m_data + ETHER_HDR_LEN, m->m_len); m->m_data += ETHER_HDR_LEN; } else { - MGETHDR(n, M_DONTWAIT, MT_DATA); + MGETHDR(n, M_NOWAIT, MT_DATA); if (n != NULL) { bcopy(m->m_data, n->m_data, ETHER_HDR_LEN); m->m_data += ETHER_HDR_LEN; diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 80446a6fe120..a84fc758f0b3 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -1268,7 +1268,7 @@ ed_get_packet(struct ed_softc *sc, bus_size_t buf, u_short len) struct mbuf *m; /* Allocate a header mbuf */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return; m->m_pkthdr.rcvif = ifp; @@ -1282,7 +1282,7 @@ ed_get_packet(struct ed_softc *sc, bus_size_t buf, u_short len) */ if ((len + 2) > MHLEN) { /* Attach an mbuf cluster */ - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); /* Insist on getting a cluster */ if ((m->m_flags & M_EXT) == 0) { diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c index 3b57ce3569ef..ee12b201b97a 100644 --- a/sys/dev/en/midway.c +++ b/sys/dev/en/midway.c @@ -837,15 +837,15 @@ copy_mbuf(struct mbuf *m) { struct mbuf *new; - MGET(new, M_WAIT, MT_DATA); + MGET(new, M_WAITOK, MT_DATA); if (m->m_flags & M_PKTHDR) { M_MOVE_PKTHDR(new, m); if (m->m_len > MHLEN) - MCLGET(new, M_WAIT); + MCLGET(new, M_WAITOK); } else { if (m->m_len > MLEN) - MCLGET(new, M_WAIT); + MCLGET(new, M_WAITOK); } bcopy(m->m_data, new->m_data, m->m_len); @@ -1925,7 +1925,7 @@ en_mget(struct en_softc *sc, u_int pktlen) * words at the begin. */ /* called from interrupt context */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return (NULL); @@ -1940,7 +1940,7 @@ en_mget(struct en_softc *sc, u_int pktlen) totlen -= m->m_len; /* called from interrupt context */ - tmp = m_getm(m, totlen, M_DONTWAIT, MT_DATA); + tmp = m_getm(m, totlen, M_NOWAIT, MT_DATA); if (tmp == NULL) { m_free(m); return (NULL); @@ -2924,7 +2924,7 @@ en_attach(struct en_softc *sc) &en_utopia_methods); utopia_init_media(&sc->utopia); - MGET(sc->padbuf, M_WAIT, MT_DATA); + MGET(sc->padbuf, M_WAITOK, MT_DATA); bzero(sc->padbuf->m_data, MLEN); if (bus_dma_tag_create(bus_get_dma_tag(sc->dev), 1, 0, diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 7be1f80daecb..183c5f484227 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -746,11 +746,11 @@ epread(struct ep_softc *sc) rx_fifo = rx_fifo2 = status & RX_BYTES_MASK; if (EP_FTST(sc, F_RX_FIRST)) { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (!m) goto out; if (rx_fifo >= MINCLSIZE) - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); sc->top = sc->mcur = top = m; #define EROUND ((sizeof(struct ether_header) + 3) & ~3) #define EOFF (EROUND - sizeof(struct ether_header)) @@ -774,11 +774,11 @@ epread(struct ep_softc *sc) lenthisone = min(rx_fifo, M_TRAILINGSPACE(m)); if (lenthisone == 0) { /* no room in this one */ mcur = m; - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (!m) goto out; if (rx_fifo >= MINCLSIZE) - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); m->m_len = 0; mcur->m_next = m; lenthisone = min(rx_fifo, M_TRAILINGSPACE(m)); diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c index dfdcde73438b..3d73c9c5c147 100644 --- a/sys/dev/et/if_et.c +++ b/sys/dev/et/if_et.c @@ -2169,7 +2169,7 @@ et_encap(struct et_softc *sc, struct mbuf **m0) error = bus_dmamap_load_mbuf_sg(sc->sc_tx_tag, map, *m0, segs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m0, M_DONTWAIT, ET_NSEG_MAX); + m = m_collapse(*m0, M_NOWAIT, ET_NSEG_MAX); if (m == NULL) { m_freem(*m0); *m0 = NULL; @@ -2331,7 +2331,7 @@ et_newbuf_cluster(struct et_rxbuf_data *rbd, int buf_idx) int nsegs; MPASS(buf_idx < ET_RX_NDESC); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -2390,7 +2390,7 @@ et_newbuf_hdr(struct et_rxbuf_data *rbd, int buf_idx) int nsegs; MPASS(buf_idx < ET_RX_NDESC); - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MHLEN; diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c index 1034dacdd5de..a91a3cc2dcd4 100644 --- a/sys/dev/ex/if_ex.c +++ b/sys/dev/ex/if_ex.c @@ -733,7 +733,7 @@ ex_rx_intr(struct ex_softc *sc) QQQ = pkt_len = CSR_READ_2(sc, IO_PORT_REG); if (rx_status & RCV_OK_bit) { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); ipkt = m; if (ipkt == NULL) { ifp->if_iqdrops++; @@ -744,7 +744,7 @@ ex_rx_intr(struct ex_softc *sc) while (pkt_len > 0) { if (pkt_len >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (m->m_flags & M_EXT) { m->m_len = MCLBYTES; } else { @@ -769,7 +769,7 @@ ex_rx_intr(struct ex_softc *sc) pkt_len -= m->m_len; if (pkt_len > 0) { - MGET(m->m_next, M_DONTWAIT, MT_DATA); + MGET(m->m_next, M_NOWAIT, MT_DATA); if (m->m_next == NULL) { m_freem(ipkt); ifp->if_iqdrops++; diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c index 8ddda95d7b43..9020d22d5884 100644 --- a/sys/dev/fatm/if_fatm.c +++ b/sys/dev/fatm/if_fatm.c @@ -1099,7 +1099,7 @@ fatm_supply_small_buffers(struct fatm_softc *sc) if_printf(sc->ifp, "out of rbufs\n"); break; } - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { LIST_INSERT_HEAD(&sc->rbuf_free, rb, link); break; @@ -1189,7 +1189,7 @@ fatm_supply_large_buffers(struct fatm_softc *sc) if_printf(sc->ifp, "out of rbufs\n"); break; } - if ((m = m_getcl(M_DONTWAIT, MT_DATA, + if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL) { LIST_INSERT_HEAD(&sc->rbuf_free, rb, link); break; @@ -1768,17 +1768,17 @@ copy_mbuf(struct mbuf *m) { struct mbuf *new; - MGET(new, M_DONTWAIT, MT_DATA); + MGET(new, M_NOWAIT, MT_DATA); if (new == NULL) return (NULL); if (m->m_flags & M_PKTHDR) { M_MOVE_PKTHDR(new, m); if (m->m_len > MHLEN) - MCLGET(new, M_WAIT); + MCLGET(new, M_WAITOK); } else { if (m->m_len > MLEN) - MCLGET(new, M_WAIT); + MCLGET(new, M_WAITOK); } bcopy(m->m_data, new->m_data, m->m_len); diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 7bfca2ab4ff4..5883b6bc54b5 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -1870,13 +1870,13 @@ fe_get_packet (struct fe_softc * sc, u_short len) */ /* Allocate an mbuf with packet header info. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return -1; /* Attach a cluster if this packet doesn't fit in a normal mbuf. */ if (len > MHLEN - NFS_MAGIC_OFFSET) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (!(m->m_flags & M_EXT)) { m_freem(m); return -1; diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 4b147b2ab139..77886d3adfa8 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -977,7 +977,7 @@ fwohci_start(struct fwohci_softc *sc, struct fwohci_dbch *dbch) if (firewire_debug) device_printf(sc->fc.dev, "EFBIG.\n"); - m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m0 != NULL) { m_copydata(xfer->mbuf, 0, xfer->mbuf->m_pkthdr.len, diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index fa51026a1de1..615cb07bbbef 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -357,7 +357,7 @@ fwe_init(void *arg) STAILQ_INIT(&xferq->stdma); xferq->stproc = NULL; for (i = 0; i < xferq->bnchunk; i ++) { - m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR); xferq->bulkxfer[i].mbuf = m; m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; STAILQ_INSERT_TAIL(&xferq->stfree, @@ -606,7 +606,7 @@ fwe_as_output(struct fwe_softc *fwe, struct ifnet *ifp) #endif /* keep ip packet alignment for alpha */ - M_PREPEND(m, ETHER_ALIGN, M_DONTWAIT); + M_PREPEND(m, ETHER_ALIGN, M_NOWAIT); fp = &xfer->send.hdr; *(uint32_t *)&xfer->send.hdr = *(int32_t *)&fwe->pkt_hdr; fp->mode.stream.len = m->m_pkthdr.len; @@ -657,7 +657,7 @@ fwe_as_input(struct fw_xferq *xferq) m = sxfer->mbuf; /* insert new rbuf */ - sxfer->mbuf = m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + sxfer->mbuf = m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m0 != NULL) { m0->m_len = m0->m_pkthdr.len = m0->m_ext.ext_size; STAILQ_INSERT_TAIL(&xferq->stfree, sxfer, link); diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index e7c4a669e6e8..7010bc9c7ff3 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -333,7 +333,7 @@ fwip_init(void *arg) STAILQ_INIT(&xferq->stdma); xferq->stproc = NULL; for (i = 0; i < xferq->bnchunk; i ++) { - m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR); xferq->bulkxfer[i].mbuf = m; m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; STAILQ_INSERT_TAIL(&xferq->stfree, @@ -349,7 +349,7 @@ fwip_init(void *arg) xfer = fw_xfer_alloc(M_FWIP); if (xfer == NULL) break; - m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR); xfer->recv.payload = mtod(m, uint32_t *); xfer->recv.pay_len = MCLBYTES; xfer->hand = fwip_unicast_input; @@ -657,7 +657,7 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp) */ uint32_t *p; - M_PREPEND(m, 2*sizeof(uint32_t), M_DONTWAIT); + M_PREPEND(m, 2*sizeof(uint32_t), M_NOWAIT); p = mtod(m, uint32_t *); fp->mode.stream.len = m->m_pkthdr.len; fp->mode.stream.chtag = broadcast_channel; @@ -778,7 +778,7 @@ fwip_stream_input(struct fw_xferq *xferq) m = sxfer->mbuf; /* insert new rbuf */ - sxfer->mbuf = m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + sxfer->mbuf = m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m0 != NULL) { m0->m_len = m0->m_pkthdr.len = m0->m_ext.ext_size; STAILQ_INSERT_TAIL(&xferq->stfree, sxfer, link); @@ -871,7 +871,7 @@ fwip_unicast_input_recycle(struct fwip_softc *fwip, struct fw_xfer *xfer) * We have finished with a unicast xfer. Allocate a new * cluster and stick it on the back of the input queue. */ - m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR); xfer->mbuf = m; xfer->recv.payload = mtod(m, uint32_t *); xfer->recv.pay_len = MCLBYTES; diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 364df90ebcc5..ba63af734406 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1447,7 +1447,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head) if (M_WRITABLE(*m_head) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1563,7 +1563,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, *m_head, segs, &nseg, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, sc->maxtxseg); + m = m_collapse(*m_head, M_NOWAIT, sc->maxtxseg); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -2628,7 +2628,7 @@ fxp_new_rfabuf(struct fxp_softc *sc, struct fxp_rx *rxp) bus_dmamap_t tmp_map; int error; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index d75e1ab8dc61..4aa9c6d34f1f 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -1120,7 +1120,7 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head) cflags = 0; if (((*m_head)->m_pkthdr.csum_flags & sc->sc_csum_features) != 0) { if (M_WRITABLE(*m_head) == 0) { - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); *m_head = m; if (m == NULL) @@ -1143,7 +1143,7 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, txs->txs_dmamap, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, GEM_NTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, GEM_NTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1663,7 +1663,7 @@ gem_add_rxbuf(struct gem_softc *sc, int idx) GEM_LOCK_ASSERT(sc, MA_OWNED); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; diff --git a/sys/dev/gxemul/ether/if_gx.c b/sys/dev/gxemul/ether/if_gx.c index b98cc7ce3c01..321882f5fd8f 100644 --- a/sys/dev/gxemul/ether/if_gx.c +++ b/sys/dev/gxemul/ether/if_gx.c @@ -370,7 +370,7 @@ gx_rx_intr(void *arg) continue; } - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { device_printf(sc->sc_dev, "no memory for receive mbuf.\n"); sc->sc_ifp->if_iqdrops++; diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index 35bbd57638bf..b6a53680eb15 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -330,7 +330,7 @@ he_intr_rbp(struct hatm_softc *sc, struct herbp *rbp, u_int large, if (large) { /* allocate the MBUF */ - if ((m = m_getcl(M_DONTWAIT, MT_DATA, + if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL) { if_printf(sc->ifp, "no mbuf clusters\n"); @@ -437,7 +437,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle) DBG(sc, RX, ("RX group=%u handle=%x page=%u chunk=%u", group, handle, pageno, chunkno)); - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (group == 0) { struct mbuf0_chunk *c0; diff --git a/sys/dev/hatm/if_hatm_tx.c b/sys/dev/hatm/if_hatm_tx.c index 868b5a3d43d6..455dbb4db327 100644 --- a/sys/dev/hatm/if_hatm_tx.c +++ b/sys/dev/hatm/if_hatm_tx.c @@ -466,7 +466,7 @@ hatm_start(struct ifnet *ifp) if (error == EFBIG) { /* try to defragment the packet */ sc->istats.defrag++; - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); if (m == NULL) { tpd->mbuf = NULL; hatm_free_txmbuf(sc); diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index ecb12397cda9..c5c5af1b3fa4 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -1878,14 +1878,14 @@ hifn_crypto( totlen = cmd->src_mapsize; if (cmd->src_m->m_flags & M_PKTHDR) { len = MHLEN; - MGETHDR(m0, M_DONTWAIT, MT_DATA); - if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_DONTWAIT)) { + MGETHDR(m0, M_NOWAIT, MT_DATA); + if (m0 && !m_dup_pkthdr(m0, cmd->src_m, M_NOWAIT)) { m_free(m0); m0 = NULL; } } else { len = MLEN; - MGET(m0, M_DONTWAIT, MT_DATA); + MGET(m0, M_NOWAIT, MT_DATA); } if (m0 == NULL) { hifnstats.hst_nomem_mbuf++; @@ -1893,7 +1893,7 @@ hifn_crypto( goto err_srcmap; } if (totlen >= MINCLSIZE) { - MCLGET(m0, M_DONTWAIT); + MCLGET(m0, M_NOWAIT); if ((m0->m_flags & M_EXT) == 0) { hifnstats.hst_nomem_mcl++; err = sc->sc_cmdu ? ERESTART : ENOMEM; @@ -1907,7 +1907,7 @@ hifn_crypto( mlast = m0; while (totlen > 0) { - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == NULL) { hifnstats.hst_nomem_mbuf++; err = sc->sc_cmdu ? ERESTART : ENOMEM; @@ -1916,7 +1916,7 @@ hifn_crypto( } len = MLEN; if (totlen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { hifnstats.hst_nomem_mcl++; err = sc->sc_cmdu ? ERESTART : ENOMEM; diff --git a/sys/dev/hme/if_hme.c b/sys/dev/hme/if_hme.c index 63d27d145449..9f310ee4f11e 100644 --- a/sys/dev/hme/if_hme.c +++ b/sys/dev/hme/if_hme.c @@ -564,7 +564,7 @@ hme_add_rxbuf(struct hme_softc *sc, unsigned int ri, int keepold) hme_discard_rxbuf(sc, ri); return (0); } - if ((m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL) + if ((m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR)) == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = m->m_ext.ext_size; b = mtod(m, uintptr_t); @@ -951,7 +951,7 @@ hme_load_txmbuf(struct hme_softc *sc, struct mbuf **m0) cflags = 0; if (((*m0)->m_pkthdr.csum_flags & sc->sc_csum_features) != 0) { if (M_WRITABLE(*m0) == 0) { - m = m_dup(*m0, M_DONTWAIT); + m = m_dup(*m0, M_NOWAIT); m_freem(*m0); *m0 = m; if (m == NULL) @@ -974,7 +974,7 @@ hme_load_txmbuf(struct hme_softc *sc, struct mbuf **m0) error = bus_dmamap_load_mbuf_sg(sc->sc_tdmatag, htx->htx_dmamap, *m0, segs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m0, M_DONTWAIT, HME_NTXSEGS); + m = m_collapse(*m0, M_NOWAIT, HME_NTXSEGS); if (m == NULL) { m_freem(*m0); *m0 = NULL; diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index fb0d9871dc41..e945a060c5e5 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -698,7 +698,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp) return (-1); } - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (!m) { ie_drop_packet_buffer(sc); /* XXXX if_ierrors++; */ @@ -727,7 +727,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp) * single mbuf which may or may not be big enough. Got that? */ if (top) { - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (!m) { m_freem(top); ie_drop_packet_buffer(sc); @@ -736,7 +736,7 @@ ieget(struct ie_softc *sc, struct mbuf **mp) m->m_len = MLEN; } if (resid >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (m->m_flags & M_EXT) m->m_len = min(resid, MCLBYTES); } else { diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 10fc01885149..a62b9138abc0 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1174,7 +1174,7 @@ ndis_rxeof_eth(adapter, ctx, addr, hdr, hdrlen, lookahead, lookaheadlen, pktlen) block = adapter; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return; @@ -1418,7 +1418,7 @@ ndis_rxeof(adapter, packets, pktcnt) } else { #ifdef notdef if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES) { - m = m_dup(m0, M_DONTWAIT); + m = m_dup(m0, M_NOWAIT); /* * NOTE: we want to destroy the mbuf here, but * we don't actually want to return it to the @@ -1436,7 +1436,7 @@ ndis_rxeof(adapter, packets, pktcnt) } else p->np_oob.npo_status = NDIS_STATUS_PENDING; #endif - m = m_dup(m0, M_DONTWAIT); + m = m_dup(m0, M_NOWAIT); if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES) p->np_refcnt++; else diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 01e30127ec49..28fa0fd10af5 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -709,7 +709,7 @@ ipw_dma_alloc(struct ipw_softc *sc) sbuf = &sc->rx_sbuf_list[i]; sbd->bd = &sc->rbd_list[i]; - sbuf->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + sbuf->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (sbuf->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -1207,7 +1207,7 @@ ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, * drop the received packet and reuse the old mbuf. In the unlikely * case that the old mbuf can't be reloaded either, explicitly panic. */ - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; return; @@ -1651,7 +1651,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni) return error; } if (error != 0) { - mnew = m_defrag(m0, M_DONTWAIT); + mnew = m_defrag(m0, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 8571d6107e47..fe1c6436dca8 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -788,7 +788,7 @@ iwi_alloc_rx_ring(struct iwi_softc *sc, struct iwi_rx_ring *ring, int count) goto fail; } - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -1236,7 +1236,7 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, * drop the received packet and reuse the old mbuf. In the unlikely * case that the old mbuf can't be reloaded either, explicitly panic. */ - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; return; @@ -1884,7 +1884,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni, return error; } if (error != 0) { - mnew = m_defrag(m0, M_DONTWAIT); + mnew = m_defrag(m0, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 6c292d7382a7..b6b523a7edd0 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -1377,7 +1377,7 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, struct iwn_rx_ring *ring) goto fail; } - data->m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + data->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, IWN_RBUF_SIZE); if (data->m == NULL) { device_printf(sc->sc_dev, @@ -2334,7 +2334,7 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, return; } - m1 = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, IWN_RBUF_SIZE); + m1 = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, IWN_RBUF_SIZE); if (m1 == NULL) { DPRINTF(sc, IWN_DEBUG_ANY, "%s: no mbuf to restock ring\n", __func__); @@ -3539,7 +3539,7 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) return error; } /* Too many DMA segments, linearize mbuf. */ - m1 = m_collapse(m, M_DONTWAIT, IWN_MAX_SCATTER); + m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER); if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); @@ -3743,7 +3743,7 @@ iwn_tx_data_raw(struct iwn_softc *sc, struct mbuf *m, return error; } /* Too many DMA segments, linearize mbuf. */ - m1 = m_collapse(m, M_DONTWAIT, IWN_MAX_SCATTER); + m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER); if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); @@ -3976,7 +3976,7 @@ iwn_cmd(struct iwn_softc *sc, int code, const void *buf, int size, int async) /* Command is too large to fit in a descriptor. */ if (totlen > MCLBYTES) return EINVAL; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (m == NULL) return ENOMEM; cmd = mtod(m, struct iwn_tx_cmd *); diff --git a/sys/dev/ixgb/if_ixgb.c b/sys/dev/ixgb/if_ixgb.c index 544e8e370cae..e9acae088709 100644 --- a/sys/dev/ixgb/if_ixgb.c +++ b/sys/dev/ixgb/if_ixgb.c @@ -1790,7 +1790,7 @@ ixgb_get_buf(int i, struct adapter * adapter, if (mp == NULL) { - mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mp == NULL) { adapter->mbuf_alloc_failed++; diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c index 27d3d0ae06d4..f84644011077 100644 --- a/sys/dev/ixgbe/ixgbe.c +++ b/sys/dev/ixgbe/ixgbe.c @@ -3707,7 +3707,7 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit) while (j != limit) { rxbuf = &rxr->rx_buffers[i]; if (rxbuf->buf == NULL) { - mp = m_getjcl(M_DONTWAIT, MT_DATA, + mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rxr->mbuf_sz); if (mp == NULL) goto update; diff --git a/sys/dev/ixgbe/ixv.c b/sys/dev/ixgbe/ixv.c index 37f602b6b196..b9aff8000989 100644 --- a/sys/dev/ixgbe/ixv.c +++ b/sys/dev/ixgbe/ixv.c @@ -1235,7 +1235,7 @@ ixv_xmit(struct tx_ring *txr, struct mbuf **m_headp) if (error == EFBIG) { struct mbuf *m; - m = m_defrag(*m_headp, M_DONTWAIT); + m = m_defrag(*m_headp, M_NOWAIT); if (m == NULL) { adapter->mbuf_defrag_failed++; m_freem(*m_headp); @@ -2723,7 +2723,7 @@ ixv_refresh_mbufs(struct rx_ring *rxr, int limit) while (j != limit) { rxbuf = &rxr->rx_buffers[i]; if ((rxbuf->m_head == NULL) && (rxr->hdr_split)) { - mh = m_gethdr(M_DONTWAIT, MT_DATA); + mh = m_gethdr(M_NOWAIT, MT_DATA); if (mh == NULL) goto update; mh->m_pkthdr.len = mh->m_len = MHLEN; @@ -2747,7 +2747,7 @@ ixv_refresh_mbufs(struct rx_ring *rxr, int limit) } if (rxbuf->m_pack == NULL) { - mp = m_getjcl(M_DONTWAIT, MT_DATA, + mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (mp == NULL) goto update; diff --git a/sys/dev/jme/if_jme.c b/sys/dev/jme/if_jme.c index 13270b78d40c..832acef0e5c0 100644 --- a/sys/dev/jme/if_jme.c +++ b/sys/dev/jme/if_jme.c @@ -1712,7 +1712,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head) if (M_WRITABLE(*m_head) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1774,7 +1774,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->jme_cdata.jme_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, JME_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, JME_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -3181,7 +3181,7 @@ jme_newbuf(struct jme_softc *sc, struct jme_rxdesc *rxd) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); /* diff --git a/sys/dev/le/lance.c b/sys/dev/le/lance.c index 8700aa2cd436..e2cc30e23716 100644 --- a/sys/dev/le/lance.c +++ b/sys/dev/le/lance.c @@ -394,7 +394,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen) return (NULL); } - MGETHDR(m0, M_DONTWAIT, MT_DATA); + MGETHDR(m0, M_NOWAIT, MT_DATA); if (m0 == NULL) return (NULL); m0->m_pkthdr.rcvif = ifp; @@ -404,7 +404,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen) while (totlen > 0) { if (totlen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) goto bad; len = MCLBYTES; @@ -423,7 +423,7 @@ lance_get(struct lance_softc *sc, int boff, int totlen) totlen -= len; if (totlen > 0) { - MGET(newm, M_DONTWAIT, MT_DATA); + MGET(newm, M_NOWAIT, MT_DATA); if (newm == 0) goto bad; len = MLEN; diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index 09ceea12d0e1..d9948672d306 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -691,7 +691,7 @@ lge_newbuf(sc, c, m) caddr_t *buf = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { device_printf(sc->lge_dev, "no memory for rx list " "-- packet dropped!\n"); diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index 62f6017af597..9d1ec8cdc847 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -2916,7 +2916,7 @@ rxintr_cleanup(softc_t *sc) /* Optimization: copy a small pkt into a small mbuf. */ if (first_mbuf->m_pkthdr.len <= COPY_BREAK) { - MGETHDR(new_mbuf, M_DONTWAIT, MT_DATA); + MGETHDR(new_mbuf, M_NOWAIT, MT_DATA); if (new_mbuf != NULL) { new_mbuf->m_pkthdr.rcvif = first_mbuf->m_pkthdr.rcvif; @@ -3016,7 +3016,7 @@ rxintr_setup(softc_t *sc) return 0; /* ring is full; nothing to do */ /* Allocate a small mbuf and attach an mbuf cluster. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { sc->status.cntrs.rxdma++; @@ -3024,7 +3024,7 @@ rxintr_setup(softc_t *sc) printf("%s: rxintr_setup: MGETHDR() failed\n", NAME_UNIT); return 0; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { m_freem(m); diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 7305d12ddc7d..9f298de0d7ad 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -854,7 +854,7 @@ malo_tx_dmasetup(struct malo_softc *sc, struct malo_txbuf *bf, struct mbuf *m0) */ if (error == EFBIG) { /* too many desc's, linearize */ sc->malo_stats.mst_tx_linear++; - m = m_defrag(m0, M_DONTWAIT); + m = m_defrag(m0, M_NOWAIT); if (m == NULL) { m_freem(m0); sc->malo_stats.mst_tx_nombuf++; @@ -1396,7 +1396,7 @@ malo_getrxmbuf(struct malo_softc *sc, struct malo_rxbuf *bf) int error; /* XXX don't need mbuf, just dma buffer */ - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (m == NULL) { sc->malo_stats.mst_rx_nombuf++; /* XXX */ return NULL; diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c index a76fee435503..3195b239988e 100644 --- a/sys/dev/mge/if_mge.c +++ b/sys/dev/mge/if_mge.c @@ -389,7 +389,7 @@ mge_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **mbufp, KASSERT(mbufp != NULL, ("NULL mbuf pointer!")); - new_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + new_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (new_mbuf == NULL) return (ENOBUFS); new_mbuf->m_len = new_mbuf->m_pkthdr.len = new_mbuf->m_ext.ext_size; @@ -1549,7 +1549,7 @@ mge_start_locked(struct ifnet *ifp) if (m0 == NULL) break; - mtmp = m_defrag(m0, M_DONTWAIT); + mtmp = m_defrag(m0, M_NOWAIT); if (mtmp) m0 = mtmp; diff --git a/sys/dev/mn/if_mn.c b/sys/dev/mn/if_mn.c index 07c2a98db6e4..48fc3dc0a9b6 100644 --- a/sys/dev/mn/if_mn.c +++ b/sys/dev/mn/if_mn.c @@ -693,7 +693,7 @@ ngmn_connect(hook_p hook) /* Setup a transmit chain with one descriptor */ /* XXX: we actually send a 1 byte packet */ dp = mn_alloc_desc(); - MGETHDR(m, M_WAIT, MT_DATA); + MGETHDR(m, M_WAITOK, MT_DATA); m->m_pkthdr.len = 0; dp->m = m; dp->flags = 0xc0000000 + (1 << 16); @@ -708,8 +708,8 @@ ngmn_connect(hook_p hook) dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_WAIT, MT_DATA); - MCLGET(m, M_WAIT); + MGETHDR(m, M_WAITOK, MT_DATA); + MCLGET(m, M_WAITOK); dp->m = m; dp->data = vtophys(m->m_data); dp->flags = 0x40000000; @@ -722,8 +722,8 @@ ngmn_connect(hook_p hook) dp2 = dp; dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_WAIT, MT_DATA); - MCLGET(m, M_WAIT); + MGETHDR(m, M_WAITOK, MT_DATA); + MCLGET(m, M_WAITOK); dp->m = m; dp->data = vtophys(m->m_data); dp->flags = 0x00000000; @@ -1160,12 +1160,12 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector) /* Replenish desc + mbuf supplies */ if (!m) { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { mn_free_desc(dp); return; /* ENOBUFS */ } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if((m->m_flags & M_EXT) == 0) { mn_free_desc(dp); m_freem(m); diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index 93292e52e760..d0ca808c8ef3 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -897,7 +897,7 @@ msk_newbuf(struct msk_if_softc *sc_if, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); @@ -955,7 +955,7 @@ msk_jumbo_newbuf(struct msk_if_softc *sc_if, int idx) bus_dmamap_t map; int nsegs; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); if ((m->m_flags & M_EXT) == 0) { @@ -2653,7 +2653,7 @@ msk_encap(struct msk_if_softc *sc_if, struct mbuf **m_head) if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -2732,7 +2732,7 @@ msk_encap(struct msk_if_softc *sc_if, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc_if->msk_cdata.msk_tx_tag, map, *m_head, txsegs, &nseg, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, MSK_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, MSK_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 79393c8d8f16..1d2b6e38b011 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -2810,7 +2810,7 @@ mwl_rx_proc(void *arg, int npending) * be a net loss. The tradeoff might be system * dependent (cache architecture is important). */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { DPRINTF(sc, MWL_DEBUG_ANY, "%s: no rx mbuf\n", __func__); @@ -3087,9 +3087,9 @@ mwl_tx_dmasetup(struct mwl_softc *sc, struct mwl_txbuf *bf, struct mbuf *m0) if (error == EFBIG) { /* too many desc's, linearize */ sc->sc_stats.mst_tx_linear++; #if MWL_TXDESC > 1 - m = m_collapse(m0, M_DONTWAIT, MWL_TXDESC); + m = m_collapse(m0, M_NOWAIT, MWL_TXDESC); #else - m = m_defrag(m0, M_DONTWAIT); + m = m_defrag(m0, M_NOWAIT); #endif if (m == NULL) { m_freem(m0); diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index c8dea6b06a63..c04e0df2bdbb 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -2004,7 +2004,7 @@ mxge_vlan_tag_insert(struct mbuf *m) { struct ether_vlan_header *evl; - M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT); + M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_NOWAIT); if (__predict_false(m == NULL)) return NULL; if (m->m_len < sizeof(*evl)) { @@ -2376,7 +2376,7 @@ mxge_get_buf_small(struct mxge_slice_state *ss, bus_dmamap_t map, int idx) mxge_rx_ring_t *rx = &ss->rx_small; int cnt, err; - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { rx->alloc_fail++; err = ENOBUFS; @@ -2409,7 +2409,7 @@ mxge_get_buf_big(struct mxge_slice_state *ss, bus_dmamap_t map, int idx) mxge_rx_ring_t *rx = &ss->rx_big; int cnt, err, i; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, rx->cl_size); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rx->cl_size); if (m == NULL) { rx->alloc_fail++; err = ENOBUFS; diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index c7c0ad488c79..964841242fc0 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -1085,13 +1085,13 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c) struct mbuf *m_new = NULL; MY_LOCK_ASSERT(sc); - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { device_printf(sc->my_dev, "no memory for rx list -- packet dropped!\n"); return (ENOBUFS); } - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { device_printf(sc->my_dev, "no memory for rx list -- packet dropped!\n"); @@ -1352,13 +1352,13 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head) * chain. */ m = m_head; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { device_printf(sc->my_dev, "no memory for tx list"); return (1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); device_printf(sc->my_dev, "no memory for tx list"); diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c index fe072f33f7fc..13099e9fa9e9 100644 --- a/sys/dev/nfe/if_nfe.c +++ b/sys/dev/nfe/if_nfe.c @@ -1975,7 +1975,7 @@ nfe_newbuf(struct nfe_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); @@ -2031,7 +2031,7 @@ nfe_jnewbuf(struct nfe_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); if ((m->m_flags & M_EXT) == 0) { @@ -2400,7 +2400,7 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->txq.tx_data_tag, map, *m_head, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, NFE_MAX_SCATTER); + m = m_collapse(*m_head, M_NOWAIT, NFE_MAX_SCATTER); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 7cf3eea8cd17..6f680c38ea24 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -1381,7 +1381,7 @@ nge_newbuf(struct nge_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1894,7 +1894,7 @@ nge_encap(struct nge_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->nge_cdata.nge_tx_tag, map, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, NGE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, NGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c index fe26666d8144..839cfb6ad748 100644 --- a/sys/dev/nve/if_nve.c +++ b/sys/dev/nve/if_nve.c @@ -764,7 +764,7 @@ nve_init_rings(struct nve_softc *sc) struct nve_rx_desc *desc = sc->rx_desc + i; struct nve_map_buffer *buf = &desc->buf; - buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (buf->mbuf == NULL) { device_printf(sc->dev, "couldn't allocate mbuf\n"); nve_free_rings(sc); @@ -918,7 +918,7 @@ nve_ifstart_locked(struct ifnet *ifp) * cluster */ if (error) { - m = m_defrag(m0, M_DONTWAIT); + m = m_defrag(m0, M_NOWAIT); if (m == NULL) { m_freem(m0); sc->tx_errors++; @@ -1480,7 +1480,7 @@ nve_osallocrxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID *id) buf = &desc->buf; if (buf->mbuf == NULL) { - buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (buf->mbuf == NULL) { device_printf(sc->dev, "failed to allocate memory\n"); goto fail; diff --git a/sys/dev/nxge/if_nxge.c b/sys/dev/nxge/if_nxge.c index 8c3ca5d29062..c7dbeb620055 100644 --- a/sys/dev/nxge/if_nxge.c +++ b/sys/dev/nxge/if_nxge.c @@ -3024,7 +3024,7 @@ xge_send_locked(struct ifnet *ifnetp, int qindex) } if(count >= max_fragments) { - m_buf = m_defrag(m_head, M_DONTWAIT); + m_buf = m_defrag(m_head, M_NOWAIT); if(m_buf != NULL) m_head = m_buf; XGE_DRV_STATS(tx_defrag); } @@ -3132,7 +3132,7 @@ xge_get_buf(xge_hal_dtr_h dtrh, xge_rx_priv_t *rxd_priv, if(buffer_size <= MCLBYTES) { cluster_size = MCLBYTES; - mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); } else { cluster_size = MJUMPAGESIZE; @@ -3140,7 +3140,7 @@ xge_get_buf(xge_hal_dtr_h dtrh, xge_rx_priv_t *rxd_priv, (buffer_size > MJUMPAGESIZE)) { cluster_size = MJUM9BYTES; } - mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, cluster_size); + mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, cluster_size); } if(!mp) { xge_trace(XGE_ERR, "Out of memory to allocate mbuf"); diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index 79ba41045163..7d15fcc094e8 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -902,7 +902,7 @@ oce_tx(POCE_SOFTC sc, struct mbuf **mpp, int wq_index) } else if (rc == EFBIG) { if (retry_cnt == 0) { - m_temp = m_defrag(m, M_DONTWAIT); + m_temp = m_defrag(m, M_NOWAIT); if (m_temp == NULL) goto free_ret; m = m_temp; @@ -995,7 +995,7 @@ oce_tso_setup(POCE_SOFTC sc, struct mbuf **mpp) m = *mpp; if (M_WRITABLE(m) == 0) { - m = m_dup(*mpp, M_DONTWAIT); + m = m_dup(*mpp, M_NOWAIT); if (!m) return NULL; m_freem(*mpp); @@ -1481,7 +1481,7 @@ oce_alloc_rx_bufs(struct oce_rq *rq, int count) break; /* no more room */ pd = &rq->pckts[rq->packets_in]; - pd->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + pd->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (pd->mbuf == NULL) break; diff --git a/sys/dev/patm/if_patm_intr.c b/sys/dev/patm/if_patm_intr.c index 79cb248966ba..12ef9958c1da 100644 --- a/sys/dev/patm/if_patm_intr.c +++ b/sys/dev/patm/if_patm_intr.c @@ -324,7 +324,7 @@ patm_lmbuf_alloc(struct patm_softc *sc) struct mbuf *m; struct lmbuf *b; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (NULL); m->m_data += LMBUF_OFFSET; diff --git a/sys/dev/patm/if_patm_rx.c b/sys/dev/patm/if_patm_rx.c index 024d8ef1fb76..f739b9cfa4a4 100644 --- a/sys/dev/patm/if_patm_rx.c +++ b/sys/dev/patm/if_patm_rx.c @@ -396,9 +396,9 @@ patm_rcv_mbuf(struct patm_softc *sc, void *buf, u_int h, int hdr) return ((struct mbuf *)buf); if (hdr) - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); else - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == NULL) { patm_rcv_free(sc, buf, h); return (NULL); @@ -458,7 +458,7 @@ patm_rx_raw(struct patm_softc *sc, u_char *cell) } } - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { sc->stats.raw_no_buf++; return; diff --git a/sys/dev/patm/if_patm_tx.c b/sys/dev/patm/if_patm_tx.c index cb40aa530fc5..81a1efceb71b 100644 --- a/sys/dev/patm/if_patm_tx.c +++ b/sys/dev/patm/if_patm_tx.c @@ -438,7 +438,7 @@ patm_tx_pad(struct patm_softc *sc, struct mbuf *m0) return (m0); } } - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == 0) { m_freem(m0); sc->ifp->if_oerrors++; @@ -532,7 +532,7 @@ patm_launch(struct patm_softc *sc, struct patm_scd *scd) error = bus_dmamap_load_mbuf(sc->tx_tag, map->map, m, patm_load_txbuf, &a, BUS_DMA_NOWAIT); if (error == EFBIG) { - if ((m = m_defrag(m, M_DONTWAIT)) == NULL) { + if ((m = m_defrag(m, M_NOWAIT)) == NULL) { sc->ifp->if_oerrors++; continue; } diff --git a/sys/dev/pcn/if_pcn.c b/sys/dev/pcn/if_pcn.c index 4aaabc055752..a9cff3c22fdb 100644 --- a/sys/dev/pcn/if_pcn.c +++ b/sys/dev/pcn/if_pcn.c @@ -798,11 +798,11 @@ pcn_newbuf(sc, idx, m) c = &sc->pcn_ldata->pcn_rx_list[idx]; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(ENOBUFS); diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h index 6efd6849b4e7..02bb9ca5ab6f 100644 --- a/sys/dev/pdq/pdq_freebsd.h +++ b/sys/dev/pdq/pdq_freebsd.h @@ -187,9 +187,9 @@ typedef struct _pdq_os_ctx_t { #define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \ PDQ_OS_DATABUF_T *x_m0; \ - MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \ + MGETHDR(x_m0, M_NOWAIT, MT_DATA); \ if (x_m0 != NULL) { \ - MCLGET(x_m0, M_DONTWAIT); \ + MCLGET(x_m0, M_NOWAIT); \ if ((x_m0->m_flags & M_EXT) == 0) { \ m_free(x_m0); \ (b) = NULL; \ diff --git a/sys/dev/pdq/pdq_ifsubr.c b/sys/dev/pdq/pdq_ifsubr.c index 4df00825fe4c..00e42b0edec7 100644 --- a/sys/dev/pdq/pdq_ifsubr.c +++ b/sys/dev/pdq/pdq_ifsubr.c @@ -742,12 +742,12 @@ pdq_os_databuf_alloc( struct mbuf *m; bus_dmamap_t map; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname); return NULL; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname); m_free(m); diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h index d978809c2326..7eb6324543e3 100644 --- a/sys/dev/pdq/pdqvar.h +++ b/sys/dev/pdq/pdqvar.h @@ -214,9 +214,9 @@ typedef struct mbuf PDQ_OS_DATABUF_T; #ifndef PDQ_OS_DATABUF_ALLOC #define PDQ_OS_DATABUF_ALLOC(pdq, b) do { \ PDQ_OS_DATABUF_T *x_m0; \ - MGETHDR(x_m0, M_DONTWAIT, MT_DATA); \ + MGETHDR(x_m0, M_NOWAIT, MT_DATA); \ if (x_m0 != NULL) { \ - MCLGET(x_m0, M_DONTWAIT); \ + MCLGET(x_m0, M_NOWAIT); \ if ((x_m0->m_flags & M_EXT) == 0) { \ m_free(x_m0); \ (b) = NULL; \ diff --git a/sys/dev/qlxgb/qla_os.c b/sys/dev/qlxgb/qla_os.c index 546a81a1875d..b22fa9fc7d7d 100644 --- a/sys/dev/qlxgb/qla_os.c +++ b/sys/dev/qlxgb/qla_os.c @@ -1063,7 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp) QL_DPRINT8((ha->pci_dev, "%s: EFBIG [%d]\n", __func__, m_head->m_pkthdr.len)); - m = m_defrag(m_head, M_DONTWAIT); + m = m_defrag(m_head, M_NOWAIT); if (m == NULL) { ha->err_tx_defrag++; m_freem(m_head); @@ -1405,7 +1405,7 @@ qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp, if (mp == NULL) { if (!jumbo) { - mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mp = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mp == NULL) { ha->err_m_getcl++; @@ -1416,7 +1416,7 @@ qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp, } mp->m_len = mp->m_pkthdr.len = MCLBYTES; } else { - mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (mp == NULL) { ha->err_m_getjcl++; diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 9fdc15770c61..c67f1f790145 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -673,7 +673,7 @@ rt2560_alloc_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring, goto fail; } - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -1160,7 +1160,7 @@ rt2560_decryption_intr(struct rt2560_softc *sc) * mbuf. In the unlikely case that the old mbuf can't be * reloaded either, explicitly panic. */ - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; goto skip; @@ -1844,7 +1844,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0, return error; } if (error != 0) { - mnew = m_defrag(m0, M_DONTWAIT); + mnew = m_defrag(m0, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index c4e8fe79930d..8ae2515c21b9 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -682,7 +682,7 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring, goto fail; } - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -1030,7 +1030,7 @@ rt2661_rx_intr(struct rt2661_softc *sc) * mbuf. In the unlikely case that the old mbuf can't be * reloaded either, explicitly panic. */ - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; goto skip; @@ -1534,7 +1534,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0, return error; } if (error != 0) { - mnew = m_defrag(m0, M_DONTWAIT); + mnew = m_defrag(m0, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index 4a5aa259c0e6..4207d7556d27 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -743,7 +743,7 @@ rt2860_alloc_rx_ring(struct rt2860_softc *sc, struct rt2860_rx_ring *ring) goto fail; } - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -1237,7 +1237,7 @@ rt2860_rx_intr(struct rt2860_softc *sc) } #endif - m1 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m1 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m1 == NULL)) { ifp->if_ierrors++; goto skip; @@ -1625,7 +1625,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni) } } if (__predict_false(error != 0)) { - m1 = m_defrag(m, M_DONTWAIT); + m1 = m_defrag(m, M_NOWAIT); if (m1 == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); @@ -1877,7 +1877,7 @@ rt2860_tx_raw(struct rt2860_softc *sc, struct mbuf *m, } } if (__predict_false(error != 0)) { - m1 = m_defrag(m, M_DONTWAIT); + m1 = m_defrag(m, M_NOWAIT); if (m1 == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 5f543181785b..9ec914af412f 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -758,7 +758,7 @@ re_diag(struct rl_softc *sc) u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' }; /* Allocate a single mbuf */ - MGETHDR(m0, M_DONTWAIT, MT_DATA); + MGETHDR(m0, M_NOWAIT, MT_DATA); if (m0 == NULL) return (ENOBUFS); @@ -1886,7 +1886,7 @@ re_newbuf(struct rl_softc *sc, int idx) uint32_t cmdstat; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); @@ -1950,7 +1950,7 @@ re_jumbo_newbuf(struct rl_softc *sc, int idx) uint32_t cmdstat; int error, nsegs; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MJUM9BYTES; @@ -2700,7 +2700,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) padlen = RL_MIN_FRAMELEN - (*m_head)->m_pkthdr.len; if (M_WRITABLE(*m_head) == 0) { /* Get a writable copy. */ - m_new = m_dup(*m_head, M_DONTWAIT); + m_new = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m_new == NULL) { *m_head = NULL; @@ -2710,7 +2710,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) } if ((*m_head)->m_next != NULL || M_TRAILINGSPACE(*m_head) < padlen) { - m_new = m_defrag(*m_head, M_DONTWAIT); + m_new = m_defrag(*m_head, M_NOWAIT); if (m_new == NULL) { m_freem(*m_head); *m_head = NULL; @@ -2734,7 +2734,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->rl_ldata.rl_tx_mtag, txd->tx_dmamap, *m_head, segs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m_new = m_collapse(*m_head, M_DONTWAIT, RL_NTXSEGS); + m_new = m_collapse(*m_head, M_NOWAIT, RL_NTXSEGS); if (m_new == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/rt/if_rt.c b/sys/dev/rt/if_rt.c index 664978202a55..ebbbba5e9d57 100644 --- a/sys/dev/rt/if_rt.c +++ b/sys/dev/rt/if_rt.c @@ -892,7 +892,7 @@ rt_tx_data(struct rt_softc *sc, struct mbuf *m, int qid) "mbuf: ndmasegs=%d, len=%d, error=%d\n", ndmasegs, m->m_pkthdr.len, error); - m_d = m_collapse(m, M_DONTWAIT, 16); + m_d = m_collapse(m, M_NOWAIT, 16); if (m_d == NULL) { m_freem(m); m = NULL; @@ -1637,7 +1637,7 @@ rt_rx_eof(struct rt_softc *sc, int limit) nframes++; - mnew = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + mnew = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (mnew == NULL) { sc->rx_mbuf_alloc_errors++; @@ -2009,7 +2009,7 @@ rt_alloc_rx_ring(struct rt_softc *sc, struct rt_softc_rx_ring *ring) goto fail; } - data->m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + data->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (data->m == NULL) { device_printf(sc->dev, "could not allocate Rx mbuf\n"); diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c index 6095aa385766..396a93ccd9d3 100644 --- a/sys/dev/safe/safe.c +++ b/sys/dev/safe/safe.c @@ -1325,15 +1325,15 @@ safe_process(device_t dev, struct cryptop *crp, int hint) totlen = re->re_src_mapsize; if (re->re_src_m->m_flags & M_PKTHDR) { len = MHLEN; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m && !m_dup_pkthdr(m, re->re_src_m, - M_DONTWAIT)) { + M_NOWAIT)) { m_free(m); m = NULL; } } else { len = MLEN; - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); } if (m == NULL) { safestats.st_nombuf++; @@ -1341,7 +1341,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint) goto errout; } if (totlen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); safestats.st_nomcl++; @@ -1357,7 +1357,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint) while (totlen > 0) { if (top) { - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == NULL) { m_freem(top); safestats.st_nombuf++; @@ -1368,7 +1368,7 @@ safe_process(device_t dev, struct cryptop *crp, int hint) len = MLEN; } if (top && totlen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { *mp = m; m_freem(top); diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c index 7ca46d31115c..dc1b6eb56474 100644 --- a/sys/dev/sbni/if_sbni.c +++ b/sys/dev/sbni/if_sbni.c @@ -863,7 +863,7 @@ get_rx_buf(struct sbni_softc *sc) { struct mbuf *m; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { if_printf(sc->ifp, "cannot allocate header mbuf\n"); return (0); @@ -877,7 +877,7 @@ get_rx_buf(struct sbni_softc *sc) */ if (ETHER_MAX_LEN + 2 > MHLEN) { /* Attach an mbuf cluster */ - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { m_freem(m); return (0); diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index ec3aa27abb20..7280801bcf67 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -1455,7 +1455,7 @@ sf_newbuf(struct sf_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -2171,7 +2171,7 @@ sf_encap(struct sf_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sf_cdata.sf_tx_tag, map, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, SF_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, SF_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/sfxge/sfxge_dma.c b/sys/dev/sfxge/sfxge_dma.c index 076c7c68a9ad..f0d17544a0de 100644 --- a/sys/dev/sfxge/sfxge_dma.c +++ b/sys/dev/sfxge/sfxge_dma.c @@ -97,7 +97,7 @@ sfxge_dma_map_sg_collapse(bus_dma_tag_t tag, bus_dmamap_t map, goto err_out; } else if (err == EFBIG || seg_count >= maxsegs) { if (!defragged) { - m = m_defrag(*mp, M_DONTWAIT); + m = m_defrag(*mp, M_NOWAIT); if (m == NULL) { err = ENOBUFS; goto err_out; diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index 801787a7add3..33f26d904ef4 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -262,7 +262,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq, struct mbuf *mbuf) mbuf, dma_seg, &n_dma_seg, 0); if (rc == EFBIG) { /* Try again. */ - struct mbuf *new_mbuf = m_collapse(mbuf, M_DONTWAIT, + struct mbuf *new_mbuf = m_collapse(mbuf, M_NOWAIT, SFXGE_TX_MAPPING_MAX_SEG); if (new_mbuf == NULL) goto reject; diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index 68679fe89340..8482bb27486f 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -1083,7 +1083,7 @@ sge_newbuf(struct sge_softc *sc, int prod) SGE_LOCK_ASSERT(sc); cd = &sc->sge_cdata; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1407,7 +1407,7 @@ sge_encap(struct sge_softc *sc, struct mbuf **m_head) if (M_WRITABLE(*m_head) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1464,7 +1464,7 @@ sge_encap(struct sge_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sge_cdata.sge_txmbuf_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, SGE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, SGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index 2e93afa06424..456c3d4fd2b8 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -1411,7 +1411,7 @@ sis_newbuf(struct sis_softc *sc, struct sis_rxdesc *rxd) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = SIS_RXLEN; @@ -1771,7 +1771,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head) padlen = SIS_MIN_FRAMELEN - m->m_pkthdr.len; if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1780,7 +1780,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head) *m_head = m; } if (m->m_next != NULL || M_TRAILINGSPACE(m) < padlen) { - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1799,7 +1799,7 @@ sis_encap(struct sis_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sis_tx_tag, txd->tx_dmamap, *m_head, segs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, SIS_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, SIS_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 836c34d4eab9..120810d3ca8f 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -965,7 +965,7 @@ sk_newbuf(sc_if, idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1010,7 +1010,7 @@ sk_jumbo_newbuf(sc_if, idx) bus_dmamap_t map; int nsegs; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); if ((m->m_flags & M_EXT) == 0) { @@ -2393,7 +2393,7 @@ sk_encap(sc_if, m_head) error = bus_dmamap_load_mbuf_sg(sc_if->sk_cdata.sk_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nseg, 0); if (error == EFBIG) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c index cece5b7e0691..06f6ca0a3c59 100644 --- a/sys/dev/smc/if_smc.c +++ b/sys/dev/smc/if_smc.c @@ -688,11 +688,11 @@ smc_task_rx(void *context, int pending) /* * Grab an mbuf and attach a cluster. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { break; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { m_freem(m); break; diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index 8aef549dcc15..d7cc20d0b611 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -1056,7 +1056,7 @@ snread(struct ifnet *ifp) /* * Allocate a header mbuf from the kernel. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) goto out; @@ -1066,7 +1066,7 @@ snread(struct ifnet *ifp) /* * Attach an mbuf cluster */ - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); /* * Insist on getting a cluster diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c index 17b67cd418f7..a41ceedca1f9 100644 --- a/sys/dev/snc/dp83932.c +++ b/sys/dev/snc/dp83932.c @@ -1108,7 +1108,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen) * Our sonic_read() and sonic_get() require it. */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == 0) return (0); m->m_pkthdr.rcvif = sc->sc_ifp; @@ -1119,7 +1119,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen) while (datalen > 0) { if (top) { - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == 0) { m_freem(top); return (0); @@ -1127,7 +1127,7 @@ sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen) len = MLEN; } if (datalen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { if (top) m_freem(top); return (0); diff --git a/sys/dev/ste/if_ste.c b/sys/dev/ste/if_ste.c index 742d497665b7..be2e8b2f2d00 100644 --- a/sys/dev/ste/if_ste.c +++ b/sys/dev/ste/if_ste.c @@ -1385,7 +1385,7 @@ ste_newbuf(struct ste_softc *sc, struct ste_chain_onefrag *rxc) bus_dmamap_t map; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1824,7 +1824,7 @@ ste_encap(struct ste_softc *sc, struct mbuf **m_head, struct ste_chain *txc) error = bus_dmamap_load_mbuf_sg(sc->ste_cdata.ste_tx_tag, txc->ste_map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, STE_MAXFRAGS); + m = m_collapse(*m_head, M_NOWAIT, STE_MAXFRAGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c index 7d22540c7161..96860a88827d 100644 --- a/sys/dev/stge/if_stge.c +++ b/sys/dev/stge/if_stge.c @@ -1081,7 +1081,7 @@ stge_encap(struct stge_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sc_cdata.stge_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, STGE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, STGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1609,7 +1609,7 @@ stge_fixup_rx(struct stge_softc *sc, struct mbuf *m) m->m_data += ETHER_HDR_LEN; n = m; } else { - MGETHDR(n, M_DONTWAIT, MT_DATA); + MGETHDR(n, M_NOWAIT, MT_DATA); if (n != NULL) { bcopy(m->m_data, n->m_data, ETHER_HDR_LEN); m->m_data += ETHER_HDR_LEN; @@ -2439,7 +2439,7 @@ stge_newbuf(struct stge_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index d31af291c682..f8142b476018 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -1381,7 +1381,7 @@ ti_newbuf_std(struct ti_softc *sc, int i) struct ti_rx_desc *r; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1436,7 +1436,7 @@ ti_newbuf_mini(struct ti_softc *sc, int i) struct ti_rx_desc *r; int error, nsegs; - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MHLEN; @@ -1495,7 +1495,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int i, struct mbuf *dummy) (void)dummy; - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MJUM9BYTES; @@ -1577,19 +1577,19 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old) } } else { /* Allocate the mbufs. */ - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { device_printf(sc->ti_dev, "mbuf allocation failed " "-- packet dropped!\n"); goto nobufs; } - MGET(m[NPAYLOAD], M_DONTWAIT, MT_DATA); + MGET(m[NPAYLOAD], M_NOWAIT, MT_DATA); if (m[NPAYLOAD] == NULL) { device_printf(sc->ti_dev, "cluster mbuf allocation " "failed -- packet dropped!\n"); goto nobufs; } - MCLGET(m[NPAYLOAD], M_DONTWAIT); + MCLGET(m[NPAYLOAD], M_NOWAIT); if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) { device_printf(sc->ti_dev, "mbuf allocation failed " "-- packet dropped!\n"); @@ -1598,7 +1598,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct mbuf *m_old) m[NPAYLOAD]->m_len = MCLBYTES; for (i = 0; i < NPAYLOAD; i++){ - MGET(m[i], M_DONTWAIT, MT_DATA); + MGET(m[i], M_NOWAIT, MT_DATA); if (m[i] == NULL) { device_printf(sc->ti_dev, "mbuf allocation " "failed -- packet dropped!\n"); @@ -3051,7 +3051,7 @@ ti_encap(struct ti_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->ti_cdata.ti_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nseg, 0); if (error == EFBIG) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/tl/if_tl.c b/sys/dev/tl/if_tl.c index 0c8725dbecce..30969e2aef15 100644 --- a/sys/dev/tl/if_tl.c +++ b/sys/dev/tl/if_tl.c @@ -1365,7 +1365,7 @@ tl_newbuf(sc, c) { struct mbuf *m_new = NULL; - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m_new == NULL) return(ENOBUFS); @@ -1806,13 +1806,13 @@ tl_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { if_printf(ifp, "no memory for tx list\n"); return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); if_printf(ifp, "no memory for tx list\n"); diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index 1d87b30d5e86..804177685823 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -727,7 +727,7 @@ tsec_start_locked(struct ifnet *ifp) csum_flags = m0->m_pkthdr.csum_flags; if (csum_flags) { - M_PREPEND(m0, sizeof(struct tsec_tx_fcb), M_DONTWAIT); + M_PREPEND(m0, sizeof(struct tsec_tx_fcb), M_NOWAIT); if (m0 == NULL) break; @@ -751,7 +751,7 @@ tsec_start_locked(struct ifnet *ifp) fcb_inserted = 1; } - mtmp = m_defrag(m0, M_DONTWAIT); + mtmp = m_defrag(m0, M_NOWAIT); if (mtmp) m0 = mtmp; @@ -1029,7 +1029,7 @@ tsec_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **mbufp, KASSERT(mbufp != NULL, ("NULL mbuf pointer!")); - new_mbuf = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MCLBYTES); + new_mbuf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MCLBYTES); if (new_mbuf == NULL) return (ENOBUFS); new_mbuf->m_len = new_mbuf->m_pkthdr.len = new_mbuf->m_ext.ext_size; diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c index c977909222e5..66f54802a4fe 100644 --- a/sys/dev/tx/if_tx.c +++ b/sys/dev/tx/if_tx.c @@ -682,7 +682,7 @@ epic_ifstart_locked(struct ifnet * ifp) * recopy packet to a newly allocated mbuf cluster. */ if (error) { - m = m_defrag(m0, M_DONTWAIT); + m = m_defrag(m0, M_NOWAIT); if (m == NULL) { m_freem(m0); ifp->if_oerrors++; @@ -761,7 +761,7 @@ epic_rx_done(epic_softc_t *sc) m = buf->mbuf; /* Try to get an mbuf cluster. */ - buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (buf->mbuf == NULL) { buf->mbuf = m; desc->status = 0x8000; @@ -1495,7 +1495,7 @@ epic_queue_last_packet(epic_softc_t *sc) if ((desc->status & 0x8000) || (buf->mbuf != NULL)) return (EBUSY); - MGETHDR(m0, M_DONTWAIT, MT_DATA); + MGETHDR(m0, M_NOWAIT, MT_DATA); if (m0 == NULL) return (ENOBUFS); @@ -1644,7 +1644,7 @@ epic_init_rings(epic_softc_t *sc) return (EFAULT); } - buf->mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + buf->mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (buf->mbuf == NULL) { epic_free_rings(sc); return (ENOBUFS); diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index e51489f54899..bc6f016ef633 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -1015,7 +1015,7 @@ txp_rxbuf_reclaim(struct txp_softc *sc) break; rbd = sc->sc_rxbufs + prod; bcopy((u_long *)&rbd->rb_vaddrlo, &sd, sizeof(sd)); - sd->sd_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + sd->sd_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (sd->sd_mbuf == NULL) break; sd->sd_mbuf->m_pkthdr.len = sd->sd_mbuf->m_len = MCLBYTES; @@ -1792,7 +1792,7 @@ txp_rxring_fill(struct txp_softc *sc) bcopy(&sd, (u_long *)&rbd->rb_vaddrlo, sizeof(sd)); KASSERT(sd->sd_mbuf == NULL, ("%s : Rx buffer ring corrupted", __func__)); - sd->sd_mbuf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + sd->sd_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (sd->sd_mbuf == NULL) return (ENOMEM); sd->sd_mbuf->m_pkthdr.len = sd->sd_mbuf->m_len = MCLBYTES; @@ -2105,7 +2105,7 @@ txp_encap(struct txp_softc *sc, struct txp_tx_ring *r, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->sc_cdata.txp_tx_tag, sd->sd_map, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, TXP_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, TXP_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index ee5a5b9de64c..40e6d5eccc2d 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -1375,18 +1375,18 @@ ubsec_process(device_t dev, struct cryptop *crp, int hint) ubsecstats.hst_unaligned++; totlen = q->q_src_mapsize; if (totlen >= MINCLSIZE) { - m = m_getcl(M_DONTWAIT, MT_DATA, + m = m_getcl(M_NOWAIT, MT_DATA, q->q_src_m->m_flags & M_PKTHDR); len = MCLBYTES; } else if (q->q_src_m->m_flags & M_PKTHDR) { - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); len = MHLEN; } else { - m = m_get(M_DONTWAIT, MT_DATA); + m = m_get(M_NOWAIT, MT_DATA); len = MLEN; } if (m && q->q_src_m->m_flags & M_PKTHDR && - !m_dup_pkthdr(m, q->q_src_m, M_DONTWAIT)) { + !m_dup_pkthdr(m, q->q_src_m, M_NOWAIT)) { m_free(m); m = NULL; } @@ -1402,11 +1402,11 @@ ubsec_process(device_t dev, struct cryptop *crp, int hint) while (totlen > 0) { if (totlen >= MINCLSIZE) { - m = m_getcl(M_DONTWAIT, + m = m_getcl(M_NOWAIT, MT_DATA, 0); len = MCLBYTES; } else { - m = m_get(M_DONTWAIT, MT_DATA); + m = m_get(M_NOWAIT, MT_DATA); len = MLEN; } if (m == NULL) { diff --git a/sys/dev/usb/misc/udbp.c b/sys/dev/usb/misc/udbp.c index 150985e8e781..56f86ae4897b 100644 --- a/sys/dev/usb/misc/udbp.c +++ b/sys/dev/usb/misc/udbp.c @@ -410,12 +410,12 @@ udbp_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) /* allocate new mbuf */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) { goto tr_setup; } - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (!(m->m_flags & M_EXT)) { m_freem(m); diff --git a/sys/dev/usb/net/if_axe.c b/sys/dev/usb/net/if_axe.c index 2f9929f92264..694e5a5c845a 100644 --- a/sys/dev/usb/net/if_axe.c +++ b/sys/dev/usb/net/if_axe.c @@ -1114,7 +1114,7 @@ axe_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset, return (EINVAL); } - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { ifp->if_iqdrops++; return (ENOMEM); diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index 780efe867895..6e0ce97c36f8 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -753,7 +753,7 @@ cdce_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) } } if (m->m_len != m->m_pkthdr.len) { - mt = m_defrag(m, M_DONTWAIT); + mt = m_defrag(m, M_NOWAIT); if (mt == NULL) { m_freem(m); ifp->if_oerrors++; @@ -1369,9 +1369,9 @@ cdce_ncm_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) /* silently ignore this frame */ continue; } else if (temp > (int)(MHLEN - ETHER_ALIGN)) { - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); } else { - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); } DPRINTFN(16, "frame %u, offset = %u, length = %u \n", diff --git a/sys/dev/usb/net/if_usie.c b/sys/dev/usb/net/if_usie.c index cdbdd6b9c4e3..f3dbd9e15430 100644 --- a/sys/dev/usb/net/if_usie.c +++ b/sys/dev/usb/net/if_usie.c @@ -796,7 +796,7 @@ usie_if_rx_callback(struct usb_xfer *xfer, usb_error_t error) tr_setup: if (sc->sc_rxm == NULL) { - sc->sc_rxm = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + sc->sc_rxm = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE /* could be bigger than MCLBYTES */ ); } if (sc->sc_rxm == NULL) { @@ -892,7 +892,7 @@ usie_if_rx_callback(struct usb_xfer *xfer, usb_error_t error) break; } /* copy aggregated frames to another mbuf */ - m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m0 == NULL)) { DPRINTF("could not allocate mbuf\n"); err++; @@ -1388,7 +1388,7 @@ usie_cns_req(struct usie_softc *sc, uint32_t id, uint16_t obj) uint8_t *tmp; uint8_t cns_len; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m == NULL)) { DPRINTF("could not allocate mbuf\n"); ifp->if_ierrors++; diff --git a/sys/dev/usb/net/uhso.c b/sys/dev/usb/net/uhso.c index 40dd1f4848cd..96c633533405 100644 --- a/sys/dev/usb/net/uhso.c +++ b/sys/dev/usb/net/uhso.c @@ -1619,7 +1619,7 @@ uhso_ifnet_read_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_TRANSFERRED: if (actlen > 0 && (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING)) { pc = usbd_xfer_get_frame(xfer, 0); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); usbd_copy_out(pc, 0, mtod(m, uint8_t *), actlen); m->m_pkthdr.len = m->m_len = actlen; /* Enqueue frame for further processing */ @@ -1752,13 +1752,13 @@ uhso_if_rxflush(void *arg) * Allocate a new mbuf for this IP packet and * copy the IP-packet into it. */ - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen); m->m_pkthdr.len = m->m_len = iplen; /* Adjust the size of the original mbuf */ m_adj(m0, iplen); - m0 = m_defrag(m0, M_WAIT); + m0 = m_defrag(m0, M_WAITOK); UHSO_DPRINTF(3, "New mbuf=%p, len=%d/%d, m0=%p, " "m0_len=%d/%d\n", m, m->m_pkthdr.len, m->m_len, diff --git a/sys/dev/usb/net/usb_ethernet.c b/sys/dev/usb/net/usb_ethernet.c index 2a7bddfdbe3d..2f1795915d80 100644 --- a/sys/dev/usb/net/usb_ethernet.c +++ b/sys/dev/usb/net/usb_ethernet.c @@ -557,7 +557,7 @@ uether_newbuf(void) { struct mbuf *m_new; - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m_new == NULL) return (NULL); m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 93e66de82872..4c54aebf5f10 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -907,7 +907,7 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) goto tr_setup; } - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { DPRINTF("could not allocate mbuf\n"); ifp->if_ierrors++; diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index d5c86a6e4788..3d2577f121a4 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -2595,7 +2595,7 @@ run_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: if (sc->rx_m == NULL) { - sc->rx_m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + sc->rx_m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE /* xfer can be bigger than MCLBYTES */); } if (sc->rx_m == NULL) { @@ -2669,7 +2669,7 @@ run_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) } /* copy aggregated frames to another mbuf */ - m0 = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m0 = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m0 == NULL)) { DPRINTF("could not allocate mbuf\n"); ifp->if_ierrors++; diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index b78d7bfa2fa5..25e62a7908ac 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -966,7 +966,7 @@ uath_alloc_data_list(struct uath_softc *sc, struct uath_data data[], dp->sc = sc; if (fillmbuf) { /* XXX check maxsz */ - dp->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + dp->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (dp->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -2611,7 +2611,7 @@ uath_data_rxeof(struct usb_xfer *xfer, struct uath_data *data, } sc->sc_intrx_len += chunklen; - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { DPRINTF(sc, UATH_DEBUG_RECV | UATH_DEBUG_RECV_ALL, "%s: can't get new mbuf, drop frame\n", __func__); diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index ab5b7173e855..ec2b0d9f5112 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -1493,7 +1493,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t *data, int pkglen, int *rssi) /* create mbuf which is suitable for strict alignment archs */ KASSERT((pkglen + ETHER_ALIGN) < MCLBYTES, ("A current mbuf storage is small (%d)", pkglen + ETHER_ALIGN)); - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { device_printf(sc->sc_dev, "could not create RX mbuf\n"); return (NULL); diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index 60096bda3856..14c28687a6cc 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -913,7 +913,7 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) goto tr_setup; } - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { DPRINTF("could not allocate mbuf\n"); ifp->if_ierrors++; diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index 45b72a272981..2c30f6766db1 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -1458,7 +1458,7 @@ urtw_alloc_data_list(struct urtw_softc *sc, struct urtw_data data[], dp->sc = sc; if (fillmbuf) { - dp->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + dp->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (dp->m == NULL) { device_printf(sc->sc_dev, "could not allocate rx mbuf\n"); @@ -3994,7 +3994,7 @@ urtw_rxeof(struct usb_xfer *xfer, struct urtw_data *data, int *rssi_p, noise = rx->noise; } - mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + mnew = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; return (NULL); diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index 0dac7ad88355..b960ce02a6fa 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -2191,9 +2191,9 @@ zyd_rx_data(struct usb_xfer *xfer, int offset, uint16_t len) ifp->if_ierrors++; return; } else if (rlen > (int)MHLEN) - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); else - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { DPRINTF(sc, ZYD_DEBUG_RECV, "%s: could not allocate rx mbuf\n", device_get_nameunit(sc->sc_dev)); diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 402a55c5e228..cdd67e0bedd3 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -1239,7 +1239,7 @@ vge_newbuf(struct vge_softc *sc, int prod) bus_dmamap_t map; int i, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); /* @@ -1827,7 +1827,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head) padlen = VGE_MIN_FRAMELEN - m->m_pkthdr.len; if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1836,7 +1836,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head) *m_head = m; } if (M_TRAILINGSPACE(m) < padlen) { - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1858,7 +1858,7 @@ vge_encap(struct vge_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->vge_cdata.vge_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, 0); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, VGE_MAXTXSEGS); + m = m_collapse(*m_head, M_NOWAIT, VGE_MAXTXSEGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index e6fef9094db2..b2ebbf07716a 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1103,7 +1103,7 @@ vtnet_alloc_rxbuf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp) clsize = sc->vtnet_rx_mbuf_size; - m_head = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, clsize); + m_head = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, clsize); if (m_head == NULL) goto fail; @@ -1115,7 +1115,7 @@ vtnet_alloc_rxbuf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp) ("chained Rx mbuf requested without LRO_NOMRG")); for (i = 1; i < nbufs; i++) { - m = m_getjcl(M_DONTWAIT, MT_DATA, 0, clsize); + m = m_getjcl(M_NOWAIT, MT_DATA, 0, clsize); if (m == NULL) goto fail; @@ -1927,7 +1927,7 @@ vtnet_enqueue_txbuf(struct vtnet_softc *sc, struct mbuf **m_head, if (collapsed) goto fail; - m = m_collapse(m, M_DONTWAIT, VTNET_MAX_TX_SEGS - 1); + m = m_collapse(m, M_NOWAIT, VTNET_MAX_TX_SEGS - 1); if (m == NULL) goto fail; diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 7054042e5753..00e726909ff9 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -1224,7 +1224,7 @@ vr_newbuf(struct vr_softc *sc, int idx) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1800,7 +1800,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) * to copy, just do it all the time. */ if ((sc->vr_quirks & VR_Q_NEEDALIGN) != 0) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1819,7 +1819,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) padlen = VR_MIN_FRAMELEN - m->m_pkthdr.len; if (M_WRITABLE(m) == 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); m_freem(*m_head); if (m == NULL) { *m_head = NULL; @@ -1828,7 +1828,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) *m_head = m; } if (m->m_next != NULL || M_TRAILINGSPACE(m) < padlen) { - m = m_defrag(m, M_DONTWAIT); + m = m_defrag(m, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1850,7 +1850,7 @@ vr_encap(struct vr_softc *sc, struct mbuf **m_head) error = bus_dmamap_load_mbuf_sg(sc->vr_cdata.vr_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { - m = m_collapse(*m_head, M_DONTWAIT, VR_MAXFRAGS); + m = m_collapse(*m_head, M_NOWAIT, VR_MAXFRAGS); if (m == NULL) { m_freem(*m_head); *m_head = NULL; diff --git a/sys/dev/vte/if_vte.c b/sys/dev/vte/if_vte.c index 7865ff23b9b3..dfc06e53609a 100644 --- a/sys/dev/vte/if_vte.c +++ b/sys/dev/vte/if_vte.c @@ -1034,7 +1034,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head) if (M_WRITABLE(m) == 0) { if (m->m_next != NULL || padlen > 0) { /* Get a writable copy. */ - m = m_dup(*m_head, M_DONTWAIT); + m = m_dup(*m_head, M_NOWAIT); /* Release original mbuf chains. */ m_freem(*m_head); if (m == NULL) { @@ -1046,7 +1046,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head) } if (m->m_next != NULL) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1057,7 +1057,7 @@ vte_encap(struct vte_softc *sc, struct mbuf **m_head) if (padlen > 0) { if (M_TRAILINGSPACE(m) < padlen) { - m = m_defrag(*m_head, M_DONTWAIT); + m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { m_freem(*m_head); *m_head = NULL; @@ -1422,7 +1422,7 @@ vte_newbuf(struct vte_softc *sc, struct vte_rxdesc *rxd) bus_dmamap_t map; int nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; @@ -1870,7 +1870,7 @@ vte_init_tx_ring(struct vte_softc *sc) /* Pre-allocate TX mbufs for deep copy. */ if (tx_deep_copy != 0) { for (i = 0; i < VTE_TX_RING_CNT; i++) { - sc->vte_cdata.vte_txmbufs[i] = m_getcl(M_DONTWAIT, + sc->vte_cdata.vte_txmbufs[i] = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (sc->vte_cdata.vte_txmbufs[i] == NULL) return (ENOBUFS); diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index 090bb0c5c9e7..acb9c2fb3123 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -811,7 +811,7 @@ vx_get(struct vx_softc *sc, u_int totlen) m = sc->vx_mb[sc->vx_next_mb]; sc->vx_mb[sc->vx_next_mb] = NULL; if (m == NULL) { - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return NULL; } else { @@ -853,7 +853,7 @@ vx_get(struct vx_softc *sc, u_int totlen) m = sc->vx_mb[sc->vx_next_mb]; sc->vx_mb[sc->vx_next_mb] = NULL; if (m == NULL) { - MGET(m, M_DONTWAIT, MT_DATA); + MGET(m, M_NOWAIT, MT_DATA); if (m == NULL) { m_freem(top); return NULL; @@ -864,7 +864,7 @@ vx_get(struct vx_softc *sc, u_int totlen) len = MLEN; } if (totlen >= MINCLSIZE) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if (m->m_flags & M_EXT) len = MCLBYTES; } @@ -1044,7 +1044,7 @@ vx_mbuf_fill(void *sp) i = sc->vx_last_mb; do { if (sc->vx_mb[i] == NULL) - MGET(sc->vx_mb[i], M_DONTWAIT, MT_DATA); + MGET(sc->vx_mb[i], M_NOWAIT, MT_DATA); if (sc->vx_mb[i] == NULL) break; i = (i + 1) % MAX_MBS; diff --git a/sys/dev/vxge/vxge.c b/sys/dev/vxge/vxge.c index 9948801a5443..c35d84bb8404 100644 --- a/sys/dev/vxge/vxge.c +++ b/sys/dev/vxge/vxge.c @@ -1192,7 +1192,7 @@ vxge_rx_rxd_1b_set(vxge_vpath_t *vpath, vxge_hal_rxd_h rxdh, void *dtr_priv) vxge_dev_t *vdev = vpath->vdev; - mbuf_pkt = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, vdev->rx_mbuf_sz); + mbuf_pkt = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, vdev->rx_mbuf_sz); if (!mbuf_pkt) { err = ENOBUFS; VXGE_DRV_STATS(vpath, rx_no_buf); @@ -3011,7 +3011,7 @@ vxge_dma_mbuf_coalesce(bus_dma_tag_t dma_tag_tx, bus_dmamap_t dma_map, dma_buffers, num_segs, BUS_DMA_NOWAIT); if (err == EFBIG) { /* try to defrag, too many segments */ - mbuf_pkt = m_defrag(*m_headp, M_DONTWAIT); + mbuf_pkt = m_defrag(*m_headp, M_NOWAIT); if (mbuf_pkt == NULL) { err = ENOBUFS; goto _exit0; diff --git a/sys/dev/wb/if_wb.c b/sys/dev/wb/if_wb.c index 0d0dd5599746..8bc28eabcf01 100644 --- a/sys/dev/wb/if_wb.c +++ b/sys/dev/wb/if_wb.c @@ -842,7 +842,7 @@ wb_newbuf(sc, c, m) struct mbuf *m_new = NULL; if (m == NULL) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(ENOBUFS); m_new->m_data = c->wb_buf; @@ -1192,11 +1192,11 @@ wb_encap(sc, c, m_head) if (m != NULL) { struct mbuf *m_new = NULL; - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) return(1); if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_DONTWAIT); + MCLGET(m_new, M_NOWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); return(1); diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index cae3b6fe841f..2ca3c8cf8fa1 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -1360,9 +1360,9 @@ wi_rx_intr(struct wi_softc *sc) } if (off + len > MHLEN) - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); else - m = m_gethdr(M_DONTWAIT, MT_DATA); + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { CSR_WRITE_2(sc, WI_EVENT_ACK, WI_EV_RX); ifp->if_ierrors++; diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index a95997e4225e..c6db4b9f15ae 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -1094,7 +1094,7 @@ wlread(struct wl_softc *sc, u_short fd_p) /* * Allocate a cluster'd mbuf to receive the packet. */ - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { if (wlhwrst(sc) != TRUE) { sc->hacr &= ~HACR_INTRON; diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 365e03e4d36e..465c140d1d86 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -989,7 +989,7 @@ wpi_alloc_rx_ring(struct wpi_softc *sc, struct wpi_rx_ring *ring) __func__, error); goto fail; } - m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); + m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (m == NULL) { device_printf(sc->sc_dev, "%s: could not allocate rx mbuf\n", __func__); @@ -1493,7 +1493,7 @@ wpi_rx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc, } /* XXX don't need mbuf, just dma buffer */ - mnew = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); + mnew = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (mnew == NULL) { DPRINTFN(WPI_DEBUG_RX, ("%s: no mbuf to restock ring\n", __func__)); @@ -1975,7 +1975,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, } if (error != 0) { /* XXX use m_collapse */ - mnew = m_defrag(m0, M_DONTWAIT); + mnew = m_defrag(m0, M_NOWAIT); if (mnew == NULL) { device_printf(sc->sc_dev, "could not defragment mbuf\n"); @@ -2575,7 +2575,7 @@ wpi_scan(struct wpi_softc *sc) desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + data->m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { device_printf(sc->sc_dev, "could not allocate mbuf for scan command\n"); diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 6adc5b328e48..1a77274de2f0 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -100,7 +100,7 @@ wtap_node_write(struct cdev *dev, struct uio *uio, int ioflag) return (err); } - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); m_copyback(m, 0, buf_len, buf); CURVNET_SET(TD_TO_VNET(curthread)); @@ -241,7 +241,7 @@ wtap_beacon_intrp(void *arg) * the beacon frame changed size (probably because * of the TIM bitmap). */ - m = m_dup(avp->beacon, M_DONTWAIT); + m = m_dup(avp->beacon, M_NOWAIT); if (ieee80211_beacon_update(avp->bf_node, &avp->av_boff, m, 0)) { printf("%s, need to remap the memory because the beacon frame" " changed size.\n",__func__); diff --git a/sys/dev/wtap/plugins/visibility.c b/sys/dev/wtap/plugins/visibility.c index 9d2624cf8a31..a73d5203200f 100644 --- a/sys/dev/wtap/plugins/visibility.c +++ b/sys/dev/wtap/plugins/visibility.c @@ -151,7 +151,7 @@ visibility_work(struct wtap_plugin *plugin, struct packet *p) struct wtap_softc *sc = hal->hal_devs[k]; struct mbuf *m = - m_dup(p->m, M_DONTWAIT); + m_dup(p->m, M_NOWAIT); DWTAP_PRINTF("[%d] duplicated old_m=%p" "to new_m=%p\n", p->id, p->m, m); #if 0 diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index 57411bac7f1e..855c8c166433 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -757,14 +757,14 @@ xe_rxintr(struct xe_softc *scp, uint8_t rst0) * read 16-bit words). XXX - Surely there's a * better way to do this alignment? */ - MGETHDR(mbp, M_DONTWAIT, MT_DATA); + MGETHDR(mbp, M_NOWAIT, MT_DATA); if (mbp == NULL) { ifp->if_iqdrops++; continue; } if (len + 3 > MHLEN) { - MCLGET(mbp, M_DONTWAIT); + MCLGET(mbp, M_NOWAIT); if ((mbp->m_flags & M_EXT) == 0) { m_freem(mbp); ifp->if_iqdrops++; diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 7dd5639881bf..856c98885aa2 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -831,13 +831,13 @@ network_alloc_rx_buffers(struct netfront_info *sc) */ batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons); for (i = mbufq_len(&sc->xn_rx_batch); i < batch_target; i++) { - MGETHDR(m_new, M_DONTWAIT, MT_DATA); + MGETHDR(m_new, M_NOWAIT, MT_DATA); if (m_new == NULL) { printf("%s: MGETHDR failed\n", __func__); goto no_mbuf; } - m_cljget(m_new, M_DONTWAIT, MJUMPAGESIZE); + m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE); if ((m_new->m_flags & M_EXT) == 0) { printf("%s: m_cljget failed\n", __func__); m_freem(m_new); @@ -1530,7 +1530,7 @@ xn_assemble_tx_request(struct netfront_info *sc, struct mbuf *m_head) * the Linux network stack. */ if (nfrags > sc->maxfrags) { - m = m_defrag(m_head, M_DONTWAIT); + m = m_defrag(m_head, M_NOWAIT); if (!m) { /* * Defrag failed, so free the mbuf and diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c index 7b2e23fb45eb..90bc0c02cef5 100644 --- a/sys/dev/xl/if_xl.c +++ b/sys/dev/xl/if_xl.c @@ -1762,7 +1762,7 @@ xl_newbuf(struct xl_softc *sc, struct xl_chain_onefrag *c) XL_LOCK_ASSERT(sc); - m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + m_new = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m_new == NULL) return (ENOBUFS); @@ -2358,7 +2358,7 @@ xl_encap(struct xl_softc *sc, struct xl_chain *c, struct mbuf **m_head) * and would waste cycles. */ if (error) { - m_new = m_collapse(*m_head, M_DONTWAIT, XL_MAXFRAGS); + m_new = m_collapse(*m_head, M_NOWAIT, XL_MAXFRAGS); if (m_new == NULL) { m_freem(*m_head); *m_head = NULL;