Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2001 11:09:48 +1100
From:      Edwin Groothuis <edwin@mavetju.org>
To:        Guy Helmer <ghelmer@palisadesys.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: pcap/bpf in a multi-threaded environment
Message-ID:  <20011110110948.B35711@k7.mavetju.org>
In-Reply-To: <HEEHKIJOHDLFOOEBABJIAEJGCAAA.ghelmer@palisadesys.com>; from ghelmer@palisadesys.com on Fri, Nov 09, 2001 at 10:56:30AM -0600
References:  <20011109225532.A3919@k7.mavetju.org> <HEEHKIJOHDLFOOEBABJIAEJGCAAA.ghelmer@palisadesys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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