Re: [PATCH 0/7] IB/hfi1: Remove write() and use ioctl() for user access
From: Jason Gunthorpe
Date: Thu Apr 14 2016 - 14:57:09 EST
On Thu, Apr 14, 2016 at 02:42:01PM -0400, Dennis Dalessandro wrote:
> >It certainly can't be years.
>
> Does fixing the current write()/writev() problem have any real
> impact on how we proceed for the "1 char dev to rule them all" idea?
We aren't going to take a bad uAPI into mainline. So how many times do
you want to redo the userspace? I have no objection to the patch
landing, just as long as it stays in staging until we have the uAPI
discussion as a community.
As for the 'one char device', I actually think it would be really
simple.
Add a new uverbs ioctl:
int hfi1_fd = ioctl(uverbs_fd, RDMA_GET_DRIVER_OPS_FD, "psm2.intel.com");
ioctl(hfi1_fd, HFI1_IOCTL_ASSIGN_CTXT, ...);
write(hfi1_fd, ...);
At least that gives us far better options for discovery and versioning
of this stuff than a driver-specific char device.
[eg this would use anon_inode_getfile, like event fds, completion
channels, etc]
You guys need this the most, propose something already.
* driver specific ioctls might be nicer, but people argue that is not
performant enough for what you want... Unclear to me.
Jason