From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 24 21:36:45 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6595016A4DA for ; Mon, 24 Jul 2006 21:36:45 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id D08B543D46 for ; Mon, 24 Jul 2006 21:36:44 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (nv92z4ct8ym5hc75@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k6OLagV4049549; Mon, 24 Jul 2006 14:36:42 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k6OLagpk049548; Mon, 24 Jul 2006 14:36:42 -0700 (PDT) (envelope-from jmg) Date: Mon, 24 Jul 2006 14:36:42 -0700 From: John-Mark Gurney To: David Gilbert Message-ID: <20060724213642.GQ96589@funkthat.com> Mail-Followup-To: David Gilbert , freebsd-hackers@freebsd.org References: <17605.7478.194820.171800@canoe.dclg.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17605.7478.194820.171800@canoe.dclg.ca> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org Subject: Re: kqueue doesn't see if_tun X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 21:36:45 -0000 David Gilbert wrote this message on Mon, Jul 24, 2006 at 15:19 -0400: > I have some code that sets up a tunnel device and registers a kqueue > filter for it ... ending roughly in: > > EV_SET(&kqev, cons->tunSocket, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, &cons->fsdkq); > kevent(fsd->kq, &kqev, 1, NULL, 0, NULL); > > This event never fires. In another part of a the code, I have a timer > --- so I call the tunnel reading function from there and (low and > behold) there is a packet. > > Does EVFILT_READ just not work on tunnel devices? No one has written a d_kqfilter entry for tun... so, until someone does, kqueue will not work on tun... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."