FIONBIO support in freebsd for bpf

Christian Peron csjp at sqrt.ca
Wed Apr 27 01:49:57 UTC 2016


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…


> On Apr 26, 2016, at 8:31 PM, Christian Peron <csjp at sqrt.ca> wrote:
> 
> 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.
> 
> Hope this helps.
> 
> 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?
>> 
>> static  int
>> bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
>>    struct thread *td)
>> {
>> 
>> ......
>> 
>> case FIONBIO:       /* Non-blocking I/O */
>>        break;
>> 
>> }
>> 
>> Thanks
>> Daya
>> _______________________________________________
>> freebsd-arch at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
>> To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"



More information about the freebsd-arch mailing list