[Midnightbsd-cvs] src [8929] trunk/sys/dev/ti/if_ti.c: switch to malloc flags

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Sep 26 18:57:49 EDT 2016


Revision: 8929
          http://svnweb.midnightbsd.org/src/?rev=8929
Author:   laffer1
Date:     2016-09-26 18:57:49 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
switch to malloc flags

Modified Paths:
--------------
    trunk/sys/dev/ti/if_ti.c

Modified: trunk/sys/dev/ti/if_ti.c
===================================================================
--- trunk/sys/dev/ti/if_ti.c	2016-09-26 22:57:46 UTC (rev 8928)
+++ trunk/sys/dev/ti/if_ti.c	2016-09-26 22:57:49 UTC (rev 8929)
@@ -1381,7 +1381,7 @@
 	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 @@
 	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 @@
 
 	(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;
@@ -1578,19 +1578,19 @@
 		}
 	} 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");
@@ -1599,7 +1599,7 @@
 		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");
@@ -3052,7 +3052,7 @@
 	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;



More information about the Midnightbsd-cvs mailing list