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
This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C50AC4.C153A780
Content-Type: text/plain;charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable

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.
------=_NextPart_000_0012_01C50AC4.C153A780
Content-Type: application/octet-stream;
	name="if_re.c.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="if_re.c.patch"

--- if_re.c.orig	Fri Feb  4 12:59:42 2005=0A=
+++ if_re.c	Fri Feb  4 13:15:32 2005=0A=
@@ -1203,7 +1203,9 @@=0A=
 		ifp->if_baudrate =3D 1000000000;=0A=
 	else=0A=
 		ifp->if_baudrate =3D 100000000;=0A=
-	ifp->if_snd.ifq_maxlen =3D RL_IFQ_MAXLEN;=0A=
+	IFQ_SET_MAXLEN(&ifp->if_snd, RL_IFQ_MAXLEN);=0A=
+	ifp->if_snd.ifq_drv_maxlen =3D RL_IFQ_MAXLEN;=0A=
+	IFQ_SET_READY(&ifp->if_snd);=0A=
 	ifp->if_capenable =3D ifp->if_capabilities;=0A=
 =0A=
 	callout_handle_init(&sc->rl_stat_ch);=0A=
@@ -1785,7 +1787,7 @@=0A=
 	re_rxeof(sc);=0A=
 	re_txeof(sc);=0A=
 =0A=
-	if (ifp->if_snd.ifq_head !=3D NULL)=0A=
+	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))=0A=
 		re_start_locked(ifp);=0A=
 =0A=
 	if (cmd =3D=3D POLL_AND_CHECK_STATUS) { /* also check status register =
*/=0A=
@@ -1869,7 +1871,7 @@=0A=
 		}=0A=
 	}=0A=
 =0A=
-	if (ifp->if_snd.ifq_head !=3D NULL)=0A=
+	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))=0A=
 		re_start_locked(ifp);=0A=
 =0A=
 done_locked:=0A=
@@ -2015,12 +2017,12 @@=0A=
 	idx =3D sc->rl_ldata.rl_tx_prodidx;=0A=
 =0A=
 	while (sc->rl_ldata.rl_tx_mbuf[idx] =3D=3D NULL) {=0A=
-		IF_DEQUEUE(&ifp->if_snd, m_head);=0A=
+		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);=0A=
 		if (m_head =3D=3D NULL)=0A=
 			break;=0A=
 =0A=
 		if (re_encap(sc, &m_head, &idx)) {=0A=
-			IF_PREPEND(&ifp->if_snd, m_head);=0A=
+			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);=0A=
 			ifp->if_flags |=3D IFF_OACTIVE;=0A=
 			break;=0A=
 		}=0A=

------=_NextPart_000_0012_01C50AC4.C153A780--



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