Author: glebius
Date: Thu Jan 16 13:44:47 2014
New Revision: 260718
URL: http://svnweb.freebsd.org/changeset/base/260718

Log:
  Another round of removing historical mbuf(9) allocator flags.
  They are breeding! New ones arouse since last round.
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/dev/altera/atse/if_atse.c
  head/sys/dev/bxe/bxe.c
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  head/sys/dev/qlxge/qls_os.c
  head/sys/net80211/ieee80211_mesh.c

Modified: head/sys/dev/altera/atse/if_atse.c
==============================================================================
--- head/sys/dev/altera/atse/if_atse.c  Thu Jan 16 13:44:37 2014        
(r260717)
+++ head/sys/dev/altera/atse/if_atse.c  Thu Jan 16 13:44:47 2014        
(r260718)
@@ -1174,7 +1174,7 @@ outer:
                sc->atse_rx_cycles--;
 
                if (sc->atse_rx_m == NULL) {
-                       m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+                       m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
                        if (m == NULL)
                                return (rx_npkts);
                        m->m_len = m->m_pkthdr.len = MCLBYTES;

Modified: head/sys/dev/bxe/bxe.c
==============================================================================
--- head/sys/dev/bxe/bxe.c      Thu Jan 16 13:44:37 2014        (r260717)
+++ head/sys/dev/bxe/bxe.c      Thu Jan 16 13:44:47 2014        (r260718)
@@ -5443,7 +5443,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st
         } else if (error == EFBIG) {
             /* possibly recoverable with defragmentation */
             fp->eth_q_stats.mbuf_defrag_attempts++;
-            m0 = m_defrag(*m_head, M_DONTWAIT);
+            m0 = m_defrag(*m_head, M_NOWAIT);
             if (m0 == NULL) {
                 fp->eth_q_stats.mbuf_defrag_failures++;
                 rc = ENOBUFS;
@@ -5504,7 +5504,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, st
         /* lets try to defragment this mbuf */
         fp->eth_q_stats.mbuf_defrag_attempts++;
 
-        m0 = m_defrag(*m_head, M_DONTWAIT);
+        m0 = m_defrag(*m_head, M_NOWAIT);
         if (m0 == NULL) {
             fp->eth_q_stats.mbuf_defrag_failures++;
             /* Ugh, just drop the frame... :( */
@@ -6564,7 +6564,7 @@ bxe_alloc_rx_bd_mbuf(struct bxe_fastpath
     rc = 0;
 
     /* allocate the new RX BD mbuf */
-    m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
+    m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
     if (__predict_false(m == NULL)) {
         fp->eth_q_stats.mbuf_rx_bd_alloc_failed++;
         return (ENOBUFS);
@@ -6645,7 +6645,7 @@ bxe_alloc_rx_tpa_mbuf(struct bxe_fastpat
     int rc = 0;
 
     /* allocate the new TPA mbuf */
-    m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
+    m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, fp->mbuf_alloc_size);
     if (__predict_false(m == NULL)) {
         fp->eth_q_stats.mbuf_rx_tpa_alloc_failed++;
         return (ENOBUFS);
@@ -6707,7 +6707,7 @@ bxe_alloc_rx_sge_mbuf(struct bxe_fastpat
     int rc = 0;
 
     /* 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->eth_q_stats.mbuf_rx_sge_alloc_failed++;
         return (ENOMEM);
@@ -6769,7 +6769,7 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 
 #if __FreeBSD_version >= 800000
         fp->tx_br = buf_ring_alloc(BXE_BR_SIZE, M_DEVBUF,
-                                   M_DONTWAIT, &fp->tx_mtx);
+                                   M_NOWAIT, &fp->tx_mtx);
         if (fp->tx_br == NULL) {
             BLOGE(sc, "buf_ring alloc fail for fp[%02d]\n", i);
             goto bxe_alloc_fp_buffers_error;

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Thu Jan 16 13:44:37 
2014        (r260717)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Thu Jan 16 13:44:47 
2014        (r260718)
@@ -485,7 +485,7 @@ hn_start_locked(struct ifnet *ifp)
                 * bpf_mtap code has a chance to run.
                 */
                if (ifp->if_bpf) {
-                       mc_head = m_copypacket(m_head, M_DONTWAIT);
+                       mc_head = m_copypacket(m_head, M_NOWAIT);
                }
 retry_send:
                /* Set the completion routine */
@@ -594,7 +594,7 @@ hv_m_append(struct mbuf *m0, int len, c_
                 * Allocate a new mbuf; could check space
                 * and allocate a cluster instead.
                 */
-               n = m_getjcl(M_DONTWAIT, m->m_type, 0, MJUMPAGESIZE);
+               n = m_getjcl(M_NOWAIT, m->m_type, 0, MJUMPAGESIZE);
                if (n == NULL)
                        break;
                n->m_len = min(MJUMPAGESIZE, remainder);
@@ -658,7 +658,7 @@ netvsc_recv(struct hv_device *device_ctx
                size = MJUMPAGESIZE;
        }
 
-       m_new = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
+       m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size);
 
        if (m_new == NULL)
                return (0);

Modified: head/sys/dev/qlxge/qls_os.c
==============================================================================
--- head/sys/dev/qlxge/qls_os.c Thu Jan 16 13:44:37 2014        (r260717)
+++ head/sys/dev/qlxge/qls_os.c Thu Jan 16 13:44:47 2014        (r260718)
@@ -1158,7 +1158,7 @@ qls_send(qla_host_t *ha, struct mbuf **m
                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);
@@ -1413,7 +1413,7 @@ qls_get_mbuf(qla_host_t *ha, qla_rx_buf_
 
        if (mp == NULL) {
 
-               mp = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, ha->msize);
+               mp = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ha->msize);
 
                if (mp == NULL) {
 

Modified: head/sys/net80211/ieee80211_mesh.c
==============================================================================
--- head/sys/net80211/ieee80211_mesh.c  Thu Jan 16 13:44:37 2014        
(r260717)
+++ head/sys/net80211/ieee80211_mesh.c  Thu Jan 16 13:44:47 2014        
(r260718)
@@ -2693,7 +2693,7 @@ mesh_send_action(struct ieee80211_node *
                return EIO;             /* XXX */
        }
 
-       M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
+       M_PREPEND(m, sizeof(struct ieee80211_frame), M_NOWAIT);
        if (m == NULL) {
                ieee80211_free_node(ni);
                return ENOMEM;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to