Set non blocking on /dev/rdma_cm

Alex Bowden alex.bowden at
Wed Aug 17 16:38:17 UTC 2016

Hey Hans & Krishna,

I've applied the patches. I've got past the initial fcntl call. Do we need to add FIONWRITE and FIONREAD?


From: KrishnamRaju ErapaRaju <Krishna2 at>
Sent: Wednesday, August 17, 2016 9:52 AM
To: Hans Petter Selasky; Alex Bowden; freebsd-infiniband at
Subject: RE: Set non blocking on /dev/rdma_cm

Hi Hans,

The error "Inappropriate ioctl for device" is not occurring after applying your patch.
Will check whether rdma_get_cm_event() is blocking or not when fcntl(O_NONBLOCK) is set.


-----Original Message-----
From: Hans Petter Selasky [mailto:hps at]
Sent: Wednesday, August 17, 2016 3:06 PM
To: KrishnamRaju ErapaRaju <Krishna2 at>; Alex Bowden <alex.bowden at>; freebsd-infiniband at
Subject: Re: Set non blocking on /dev/rdma_cm

On 08/17/16 11:30, Hans Petter Selasky wrote:
> On 08/17/16 09:03, KrishnamRaju ErapaRaju wrote:
>> Hi Alex,
>> I too faced the same issue earlier.  But could not look into
>> it/report it due to other priorities.
>> Hans, if you have root caused it please point me to the patch, few of
>> my apps uses O_NONBLOCK.
> Hi Alex,
> Can you try the attached patch?
> cd /usr/src
> cat ibcore_fionbio.diff | patch -p1
> --HPS


Looks like we also need to support FIOASYNC. Updated patch attached.


More information about the freebsd-infiniband mailing list