[pf4freebsd] Re: [ALTQ/FreeBSD] Patch: if_tun.c (forgot the polling)
Dennis Berger
Dennis.Berger at BSDsystems.de
Wed Sep 15 20:44:14 PDT 2004
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
More information about the freebsd-pf
mailing list