Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 03:44:14 -0000
From:      Dennis Berger <Dennis.Berger@BSDsystems.de>
To:        freebsd-altq@rofug.ro
Cc:        pf4freebsd@freelists.org
Subject:    [pf4freebsd] Re: [ALTQ/FreeBSD] Patch: if_tun.c (forgot the polling)
Message-ID:  <3F301BE0.1040103@BSDsystems.de>
In-Reply-To: <003501c35b54$c5187240$01000001@max900>
References:  <003501c35b54$c5187240$01000001@max900>

next in thread | previous in thread | raw e-mail | index | archive | help
Max Laier wrote:

>Here is a patch for if_tun.c. This should finally enable tun(4) for
>queueing. In my earlier patch sent to Dennis I forgot to modify the polling
>as well:
>
><snip>
>@@ -838,12 +861,14 @@
>        struct tun_softc *tp = dev->si_drv1;
>        struct ifnet    *ifp = &tp->tun_if;
>        int             revents = 0;
>+       struct mbuf     *m;
>
>        s = splimp();
>        TUNDEBUG("%s%d: tunpoll\n", ifp->if_name, ifp->if_unit);
>
>        if (events & (POLLIN | POLLRDNORM)) {
>-               if (ifp->if_snd.ifq_len > 0) {
>+               IFQ_POLL_NOLOCK(&ifp->if_snd, m);
>+               if (m != NULL) {
>                        TUNDEBUG("%s%d: tunpoll q=%d\n", ifp->if_name,
>                            ifp->if_unit, ifp->if_snd.ifq_len);
>                        revents |= events & (POLLIN | POLLRDNORM);
><snap>
>
>I hope this now really does the trick. Tests with Daniel's ACKPRI-Tutorial
>show good results.
>
>@Dennis: What patch format is best for you to incooperate into your release?
>This one is a unified diff against unpatched source.
>
>Regards,
>    Max
>  
>
OK it's integrated and working _very_ well
I released a new patchset 0.4.1
available on 
http://www.nipsi.de/FreeBSD/altq-freebsd-5.1-release-0.4.1.tar.gz

-db






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F301BE0.1040103>