[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ALTQ on re(4)
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: ALTQ on re(4)
- From: Armin Wolfermann <aw_(_at_)_osn_(_dot_)_de>
- Date: Tue, 15 Mar 2005 12:04:34 +0100
- Mail-followup-to: tech_(_at_)_openbsd_(_dot_)_org
This diff makes ALTQ work on re(4) for me.
Index: re.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.4
diff -u -r1.4 re.c
--- re.c 25 Feb 2005 12:32:50 -0000 1.4
+++ re.c 15 Mar 2005 10:51:26 -0000
@@ -622,7 +622,7 @@
CSR_WRITE_2(sc, RL_ISR, 0xFFFF);
s = splnet();
- IF_ENQUEUE(&ifp->if_snd, m0);
+ IFQ_ENQUEUE(&ifp->if_snd, m0, NULL, error);
re_start(ifp);
splx(s);
m0 = NULL;
@@ -891,7 +891,7 @@
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);
IFQ_SET_READY(&ifp->if_snd);
timeout_set(&sc->timer_handle, re_tick, sc);
@@ -1347,7 +1347,7 @@
re_rxeof(sc);
re_txeof(sc);
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
(*ifp->if_start)(ifp);
if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */
@@ -1432,7 +1432,7 @@
}
}
- if (ifp->if_snd.ifq_head != NULL)
+ if (!IFQ_IS_EMPTY(&ifp->if_snd))
(*ifp->if_start)(ifp);
#ifdef DEVICE_POLLING
@@ -1582,12 +1582,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_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_DEQUEUE(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
break;
}
Regards,
Armin Wolfermann
Visit your host, monkey.org