This is a discussion on ALTQ on re(4) within the mailing.openbsd.tech forums, part of the OpenBSD category; --> 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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| Thread Tools | |
| Display Modes | |
|
|