Preliminary MCLGETI() support for de(4) -- testing needed !

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Loganaden Velvindron
Date: Tuesday, September 21, 2010 - 2:00 pm

Hi guys,
I'm working on mclgeti() support for de(4). Unfortunately, I don't
have all the revisions of the chipsets. If you any of the 21141,21142, or 21143.
Give it a try and comment back !.

Thanks.

Index: src/sys/dev/pci/if_de.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_de.c,v
retrieving revision 1.106
diff -u -r1.106 if_de.c
--- src/sys/dev/pci/if_de.c	20 Sep 2010 07:40:38 -0000	1.106
+++ src/sys/dev/pci/if_de.c	21 Sep 2010 20:18:23 -0000
@@ -3368,20 +3368,18 @@
 	 */
 	if (accept || ms == NULL) {
 	    struct mbuf *m0;
-	    MGETHDR(m0, M_DONTWAIT, MT_DATA);
+	    m0 = MCLGETI(NULL, M_DONTWAIT, &sc->tulip_ac.ac_if, MCLBYTES);
 	    if (m0 != NULL) {
 #if defined(TULIP_COPY_RXDATA)
 		if (!accept || total_len >= (MHLEN - 2)) {
 #endif
-		    MCLGET(m0, M_DONTWAIT);
-		    if ((m0->m_flags & M_EXT) == 0) {
-			m_freem(m0);
-			m0 = NULL;
-		    }
+		if (!m0)
+			printf("\n no mbuf");	
 #if defined(TULIP_COPY_RXDATA)
 		}
 #endif
 	    }
+
 	    if (accept
 #if defined(TULIP_COPY_RXDATA)
 		&& m0 != NULL
@@ -4707,6 +4705,7 @@
 	tulip_reset(sc);
 
 	IFQ_SET_READY(&ifp->if_snd);
+	m_clsetwms(ifp, MCLBYTES, 2, TULIP_RXDESCS - 1); 
 	if_attach(ifp);
 	ether_ifattach(ifp);
     }

//Logan
C-x-C-c
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Preliminary MCLGETI() support for de(4) -- testing needed !, Loganaden Velvindron, (Tue Sep 21, 2:00 pm)
Re: Preliminary MCLGETI() support for de(4) -- testing nee ..., Christian Weisgerber, (Tue Sep 21, 3:11 pm)