Unix Technical Forum

ALTQ on re(4)

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:39 AM
Armin Wolfermann
 
Posts: n/a
Default ALTQ on re(4)

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com