From owner-freebsd-arch@freebsd.org Wed Apr 27 01:49:57 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A671B1D8D9 for ; Wed, 27 Apr 2016 01:49:57 +0000 (UTC) (envelope-from csjp@sqrt.ca) Received: from mx01.sqrt.ca (i4hg.x.rootbsd.net [208.79.81.26]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0341B12 for ; Wed, 27 Apr 2016 01:49:56 +0000 (UTC) (envelope-from csjp@sqrt.ca) Received: by mx01.sqrt.ca (Postfix, from userid 58) id 2E875233802; Tue, 26 Apr 2016 21:48:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ion X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.1 Received: from [192.168.100.103] (wnpgmb1316w-ds01-111-250.dynamic.mtsallstream.net [142.161.111.250]) by mx01.sqrt.ca (Postfix) with ESMTPSA id B6A74233800; Tue, 26 Apr 2016 21:48:33 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: FIONBIO support in freebsd for bpf From: Christian Peron In-Reply-To: <20160427013155.GA3880@xor.gateway.mts.net> Date: Tue, 26 Apr 2016 20:49:50 -0500 Cc: freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <5DCCBADE-B367-46DA-9B48-9393F7A3C2AD@sqrt.ca> References: <20160427013155.GA3880@xor.gateway.mts.net> To: dayanidhi sreenivasan X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2016 01:49:57 -0000 Actually, upon inspection of the code, it appears that ioctl(fd, = FIONBIO, ..); works as expected. This ioctl cmd appears to be handled = further up the stack=E2=80=A6 > On Apr 26, 2016, at 8:31 PM, Christian Peron wrote: >=20 > It is supported. If you want to put the descriptor into non-blocking = mode, open it up with > the device with the O_NONBLOCK flag specified. It probably wouldn't = be too difficult to implement > this via ioctl(FIONBIO) but I would need to look at it. Not certain = why it can't be done using this > method. >=20 > Hope this helps. >=20 > On Tue, Apr 26, 2016 at 07:22:20PM -0400, dayanidhi sreenivasan wrote: >> Hi Guys, >> Can somebody tell me why there is no support for non blocking IO for = bpf yet? >>=20 >> static int >> bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, >> struct thread *td) >> { >>=20 >> ...... >>=20 >> case FIONBIO: /* Non-blocking I/O */ >> break; >>=20 >> } >>=20 >> Thanks >> Daya >> _______________________________________________ >> freebsd-arch@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-arch >> To unsubscribe, send any mail to = "freebsd-arch-unsubscribe@freebsd.org"