From owner-freebsd-bugs Fri Aug 16 1:20:11 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2958A37B400 for ; Fri, 16 Aug 2002 01:20:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD7B043E3B for ; Fri, 16 Aug 2002 01:20:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7G8K5JU033666 for ; Fri, 16 Aug 2002 01:20:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7G8K5Yo033664; Fri, 16 Aug 2002 01:20:05 -0700 (PDT) Date: Fri, 16 Aug 2002 01:20:05 -0700 (PDT) Message-Id: <200208160820.g7G8K5Yo033664@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/36219: poll() behaves erratic on BPF file descriptors. Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/36219; it has been noted by GNATS. From: Bruce Evans To: Lev Walkin Cc: Nate Lawson , , , Subject: Re: kern/36219: poll() behaves erratic on BPF file descriptors. Date: Fri, 16 Aug 2002 18:17:53 +1000 (EST) On Thu, 15 Aug 2002, Lev Walkin wrote: > Nate Lawson wrote: > > I looked over the current state of bpf.c and it seems like this PR can be > > closed. Comments? > > > > if (events & (POLLIN | POLLRDNORM)) { > > /* > > * An imitation of the FIONREAD ioctl code. > > * XXX not quite. An exact imitation: > > *if (d->b_slen != 0 || > > * (d->bd_hbuf != NULL && d->bd_hlen != 0) > > */ > > if (d->bd_hlen != 0 || > > ((d->bd_immediate || d->bd_state == BPF_TIMED_OUT) && > > d->bd_slen != 0)) > > Don't we want a POLLIN event to occur when the BPF_TIMED_OUT > state is reached and there is still no data? > This seems to be a timeout on waiting data, which should > be reported up. Something like that. I think your reply in the middle of the followup mail gives more details. I hoped that jdp would finish fixing this (It has something to do with a change that he made. I don't completely understand it). One point in the original PR seems to have been OBE (E = MFC). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message