Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2005 14:21:02 +0200
From:      "Chris Dionissopoulos" <dionch@freemail.gr>
To:        <freebsd-pf@freebsd.org>
Subject:   Realtel Gigabit [re(4)] , altq enable patch
Message-ID:  <001601c50ab3$fec05b10$3c00000a@R3B>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
I made a patch for enabling altq on re(4) driver.
Is against RELENG5 (feb2005), but may works
with older 5.x versions.


Please store this patch in

http://people.freebsd.org/~mlaier/ALTQ_driver/

for further testing.


Chris.

____________________________________________________________________
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.
[-- Attachment #2 --]
--- if_re.c.orig	Fri Feb  4 12:59:42 2005
+++ if_re.c	Fri Feb  4 13:15:32 2005
@@ -1203,7 +1203,9 @@
 		ifp->if_baudrate = 1000000000;
 	else
 		ifp->if_baudrate = 100000000;
-	ifp->if_snd.ifq_maxlen = RL_IFQ_MAXLEN;
+	IFQ_SET_MAXLEN(&ifp->if_snd, RL_IFQ_MAXLEN);
+	ifp->if_snd.ifq_drv_maxlen = RL_IFQ_MAXLEN;
+	IFQ_SET_READY(&ifp->if_snd);
 	ifp->if_capenable = ifp->if_capabilities;
 
 	callout_handle_init(&sc->rl_stat_ch);
@@ -1785,7 +1787,7 @@
 	re_rxeof(sc);
 	re_txeof(sc);
 
-	if (ifp->if_snd.ifq_head != NULL)
+	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		re_start_locked(ifp);
 
 	if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */
@@ -1869,7 +1871,7 @@
 		}
 	}
 
-	if (ifp->if_snd.ifq_head != NULL)
+	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		re_start_locked(ifp);
 
 done_locked:
@@ -2015,12 +2017,12 @@
 	idx = sc->rl_ldata.rl_tx_prodidx;
 
 	while (sc->rl_ldata.rl_tx_mbuf[idx] == NULL) {
-		IF_DEQUEUE(&ifp->if_snd, m_head);
+		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;
 
 		if (re_encap(sc, &m_head, &idx)) {
-			IF_PREPEND(&ifp->if_snd, m_head);
+			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
 			ifp->if_flags |= IFF_OACTIVE;
 			break;
 		}

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001601c50ab3$fec05b10$3c00000a>