From owner-freebsd-hackers Fri Nov 9 16:10:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by hub.freebsd.org (Postfix) with ESMTP id 64C4737B405 for ; Fri, 9 Nov 2001 16:10:32 -0800 (PST) Received: from k7.mavetju.org (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id 4CEC52B697; Sat, 10 Nov 2001 01:10:17 +0100 (CET) Received: by k7.mavetju.org (Postfix, from userid 1001) id 74953FE; Sat, 10 Nov 2001 11:09:48 +1100 (EST) Date: Sat, 10 Nov 2001 11:09:48 +1100 From: Edwin Groothuis To: Guy Helmer Cc: freebsd-hackers@freebsd.org Subject: Re: pcap/bpf in a multi-threaded environment Message-ID: <20011110110948.B35711@k7.mavetju.org> Mail-Followup-To: Edwin Groothuis , Guy Helmer , freebsd-hackers@freebsd.org References: <20011109225532.A3919@k7.mavetju.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from ghelmer@palisadesys.com on Fri, Nov 09, 2001 at 10:56:30AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Nov 09, 2001 at 10:56:30AM -0600, Guy Helmer wrote: > The problem is probably due to the poll system call that the threaded > library does before performing the read(). In the non-threaded case, the > read() returns when the timeout is hit; in the threaded case, the threaded > library's poll() has to succeed before the read system call will be > executed, and poll() won't succeed until the buffer is full. > > If you would like to try this patch (relative to FreeBSD 4.3) to > /sys/net/bpf.c and /sys/net/bpfdesc.h and let me know if it helps, I will > add this patch to PR 22063 and perhaps commit it if it passes review. It works like a charm now! Thanks for this. It's really really nice to have a 'proper' working application now :-) I would be happy if you could get this fixed in the source-tree, so that I (and other people of course) can enjoy the charms of bpf-access in a threaded environment! Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message