[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aca92e27-6be5-1edd-f9de-12fe9abb924f@redhat.com>
Date: Thu, 12 May 2016 16:31:45 -0400
From: Doug Ledford <dledford@...hat.com>
To: Dennis Dalessandro <dennis.dalessandro@...el.com>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: linux-rdma@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/5] IB/hfi1: Remove write() and use ioctl() for user
access
On 05/12/2016 03:53 PM, Dennis Dalessandro wrote:
> On Thu, May 12, 2016 at 01:25:08PM -0600, Jason Gunthorpe wrote:
>> On Thu, May 12, 2016 at 03:07:38PM -0400, Dennis Dalessandro wrote:
>>> >>There is also a driver software version being exported via a sysfs
>>> >>file. This is needed so that user space applications (psm) can
>>> >>determine if it needs to do ioctl() or write().
>>> >
>>> >Why? Don't do this, just call ioctl() and if it fails then use write().
>>>
>>> Is it really that big of a deal to export a version number?
>>
>> If it isn't needed, don't add it..
>
> For the reason I gave, I think it is needed so unless you are vehemently
> opposed to it I would prefer to leave it.
I think Jason has a point here. In particular, if you create an ioctl
to return a driver version, it is probably safe that all future hfi1/psm
user space code can try the ioctl, in the absence of the ioctl working
assume version 0, and in the current and all future versions of the
driver, get a valid return, including potential updates to the version
number, so it's completely possible to use this as an ongoing test of
more than just "is this pre-release code or release code".
--
Doug Ledford <dledford@...hat.com>
GPG KeyID: 0E572FDD
Download attachment "signature.asc" of type "application/pgp-signature" (885 bytes)
Powered by blists - more mailing lists