Date: Wed, 17 Aug 2016 11:35:42 +0200 From: Hans Petter Selasky <hps@selasky.org> To: KrishnamRaju ErapaRaju <Krishna2@chelsio.com>, Alex Bowden <alex.bowden@outlook.com>, "freebsd-infiniband@freebsd.org" <freebsd-infiniband@freebsd.org> Subject: Re: Set non blocking on /dev/rdma_cm Message-ID: <ad67ccbe-4552-7fbd-b804-252d2ee385eb@selasky.org> In-Reply-To: <516f3566-33f0-c1d6-ab2d-997290a16ae5@selasky.org> References: <DM2PR05MB75118A2E53E97548A432608F7130@DM2PR05MB751.namprd05.prod.outlook.com> <BN4PR12MB081885693F06A5B5666629D494140@BN4PR12MB0818.namprd12.prod.outlook.com> <516f3566-33f0-c1d6-ab2d-997290a16ae5@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------9D6206EFA0B1F1CE84EBEBB7 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 > Hi, Looks like we also need to support FIOASYNC. Updated patch attached. --HPS --------------9D6206EFA0B1F1CE84EBEBB7 Content-Type: text/x-patch; name="ibcore_fionbio.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ibcore_fionbio.diff" diff --git a/sys/ofed/drivers/infiniband/core/ucma.c b/sys/ofed/drivers/infiniband/core/ucma.c index 56f8786..eb10aa8 100644 --- a/sys/ofed/drivers/infiniband/core/ucma.c +++ b/sys/ofed/drivers/infiniband/core/ucma.c @@ -49,6 +49,8 @@ #include <rdma/ib_addr.h> #include <rdma/ib.h> +#include <sys/filio.h> + /* RDMA Userspace Connection Manager Access */ static unsigned int max_backlog = 1024; @@ -1825,11 +1827,25 @@ static int ucma_close(struct inode *inode, struct file *filp) return 0; } +static long +ucma_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + + switch (cmd) { + case FIONBIO: + case FIOASYNC: + return (0); + default: + return (-ENOTTY); + } +} + static const struct file_operations ucma_fops = { .owner = THIS_MODULE, .open = ucma_open, .release = ucma_close, .write = ucma_write, + .unlocked_ioctl = ucma_ioctl, .poll = ucma_poll, .llseek = no_llseek, }; --------------9D6206EFA0B1F1CE84EBEBB7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ad67ccbe-4552-7fbd-b804-252d2ee385eb>