From owner-freebsd-pf@FreeBSD.ORG Thu Sep 16 03:43:59 2004 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 674) id B2BF516A4CF; Thu, 16 Sep 2004 03:43:59 +0000 (GMT) Delivered-To: mlaier@vampire.homelinux.org Received: (qmail 880 invoked by uid 1005); 5 Aug 2003 12:26:01 -0000 Delivered-To: max@vampire.homelinux.org Received: (qmail 877 invoked from network); 5 Aug 2003 12:26:00 -0000 Received: from moutng.kundenserver.de (212.227.126.186) by pd9530e20.dip.t-dialin.net with SMTP; 5 Aug 2003 12:26:00 -0000 Received: from [212.227.126.146] (helo=mxng03.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19k1ln-0005XV-00 for max@vampire.homelinux.org; Tue, 05 Aug 2003 15:22:31 +0200 Received: from [206.53.239.180] (helo=turing.freelists.org) by mxng03.kundenserver.de with esmtp (Exim 3.35 #1) id 19k1le-0003Mi-00 for max@love2party.net; Tue, 05 Aug 2003 15:22:22 +0200 Received: from turing (localhost [127.0.0.1])ESMTP id 6C2B03953A0; Tue, 5 Aug 2003 08:26:42 -0500 (EST) Received: with ECARTIS (v1.0.0; list pf4freebsd); Tue, 05 Aug 2003 08:26:38 -0500 (EST) Delivered-To: pf4freebsd@freelists.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189])ESMTP id 3E5C8394FA8 for ; Tue, 5 Aug 2003 08:26:37 -0500 (EST) Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19k1lV-0001oE-00; Tue, 05 Aug 2003 15:22:13 +0200 Received: from [217.83.14.32] (helo=max900) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19k1lU-000776-00; Tue, 05 Aug 2003 15:22:12 +0200 Message-ID: <003501c35b54$c5187240$01000001@max900> From: "Max Laier" To: MIME-Version: 1.0 Content-type: text/plain X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Content-Transfer-Encoding: 8bit X-archive-position: 72 X-ecartis-version: Ecartis v1.0.0 Sender: pf4freebsd-bounce@freelists.org Errors-To: pf4freebsd-bounce@freelists.org X-original-sender: max@love2party.net Precedence: normal X-list: pf4freebsd X-UID: 174 X-Length: 3677 X-Mailman-Approved-At: Thu, 16 Sep 2004 03:55:51 +0000 cc: Dennis Berger cc: freebsd-altq@rofug.ro Subject: [pf4freebsd] Patch: if_tun.c (forgot the polling) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Reply-To: pf4freebsd@freelists.org List-Id: Technical discussion and general questions about packet filter (pf) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Thu, 16 Sep 2004 03:43:59 -0000 X-Original-Date: Tue, 5 Aug 2003 15:23:33 +0200 X-List-Received-Date: Thu, 16 Sep 2004 03:43:59 -0000 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: @@ -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); 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 -- Binary/unsupported file stripped by Ecartis -- -- Type: application/octet-stream -- File: if_tun.c.diff