Date: Wed, 28 Jul 2004 17:21:41 +0900 From: Pyun YongHyeon <yongari@kt-is.co.kr> To: sparc64@freebsd.org Subject: ALTQ patch for hme(4) Message-ID: <20040728082141.GA8679@kt-is.co.kr>
next in thread | raw e-mail | index | archive | help
--Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, For those users that want to use ALTQ traffic shaping with PF, here is patch for hme(4) driver. The patch was tested on Ultra2(SMP). ATM, CBQ and CBQ's borrowing from parent seems to work as expected. I guess it will work for PRIQ and HFSC too. If you have bad-experience with this patch, please let me know. Best regards, Pyun YongHyeon -- Pyun YongHyeon <http://www.kr.freebsd.org/~yongari> --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hme.altq.patch" --- if_hme.c.orig Sat Jun 12 11:23:06 2004 +++ if_hme.c Wed Jul 28 13:55:42 2004 @@ -276,7 +276,9 @@ ifp->if_ioctl = hme_ioctl; ifp->if_init = hme_init; ifp->if_watchdog = hme_watchdog; - ifp->if_snd.ifq_maxlen = HME_NTXQ; + IFQ_SET_MAXLEN(&ifp->if_snd, HME_NTXQ); + ifp->if_snd.ifq_drv_maxlen = HME_NTXQ; + IFQ_SET_READY(&ifp->if_snd); hme_mifinit(sc); @@ -1002,14 +1004,14 @@ error = 0; for (;;) { - IF_DEQUEUE(&ifp->if_snd, m); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; error = hme_load_txmbuf(sc, m); if (error == -1) { ifp->if_flags |= IFF_OACTIVE; - IF_PREPEND(&ifp->if_snd, m); + IFQ_DRV_PREPEND(&ifp->if_snd, m); break; } else if (error > 0) { printf("hme_start: error %d while loading mbuf\n", --Nq2Wo0NMKNjxTN9z--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040728082141.GA8679>