[openib-general] Re: RFC: ipath ioctls and their replacements

Muli Ben-Yehuda mulix at mulix.org
Wed Jan 25 14:43:11 PST 2006


On Wed, Jan 25, 2006 at 02:32:41PM -0800, Bryan O'Sullivan wrote:
> I've been flailing away at the ioctls in our driver, with a good degree
> of success.  However, one in particular is proving tricky:
> 
> >         Opening the /dev/ipath special file assigns an appropriate free
> >         unit (chip) and port (context on a chip) to a user process.
> >         Think of it as similar to /dev/ptmx for ttys, except there isn't
> >         a devpts-like filesystem behind it.  Once a process has
> >         opened /dev/ipath, it needs to find out which unit and port it
> >         has opened, so that it can access other attributes in /sys.  To
> >         do this, we provide a GETPORT ioctl.
> 
> I still don't see how to replace this with anything else without
> performing unnatural acts.

If this is all it does, why not keep it as a device file, where open()
assigns the resources, read() returns them, and close() frees them? no
ioctl necessary.

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/




More information about the general mailing list