From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Mitko Haralanov
<mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 06/10] IB/hfi1: Add ioctl() interface for user commands
Date: Tue, 24 May 2016 23:13:17 +0300 [thread overview]
Message-ID: <20160524201317.GK25500@leon.nu> (raw)
In-Reply-To: <a4477030-c966-636e-e395-96857454c7de-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 5145 bytes --]
On Tue, May 24, 2016 at 03:17:00PM -0400, Doug Ledford wrote:
> On 05/24/2016 01:54 PM, Leon Romanovsky wrote:
> > On Tue, May 24, 2016 at 12:13:56PM -0400, Doug Ledford wrote:
> >> On 05/23/2016 10:10 AM, Dennis Dalessandro wrote:
> >>> On Mon, May 23, 2016 at 04:03:12PM +0300, Leon Romanovsky wrote:
> >>>> On Mon, May 23, 2016 at 08:22:08AM -0400, Dennis Dalessandro wrote:
> >>>>> On Sun, May 22, 2016 at 08:57:15PM +0300, Leon Romanovsky wrote:
> >>>>>> On Sun, May 22, 2016 at 10:03:52AM -0400, Dennis Dalessandro wrote:
> >>>>>>> On Sun, May 22, 2016 at 03:01:29PM +0300, Leon Romanovsky wrote:
> >>>>>>>>>> I think the overall consensus over participants in OFVWG call
> >>>>> was to use
> >>>>>>>>>> one IOCTL to enter into device specific handler which will do all
> >>>>>>>>>> necessary parsing and not spamming common IOCTL interface.
> >>>>>>>>>
> >>>>>>>>> That was for the verbs working group and the verbs 2.0 uAPI. This
> >>>>> is for
> >>>>>>>>> psm.
> >>>>>>>>
> >>>>>>>> I'm glad that you are supporting my point.
> >>>>>>>> It is vendor specific implementation for vendor specific driver
> >>>>> and not
> >>>>>>>> for whole IB core, so there is no need to pollute general IB ioctls.
> >>>>>>>
> >>>>>>> It is making use of and applying a proper classification. Is there a
> >>>>>>> technical concern with this other than that's not how verbs may end
> >>>>> up doing
> >>>>>>> it?
> >>>>>>>
> >>>>>>> I'm not completely opposed to the single ioctl, I just don't
> >>>>> necessarily see
> >>>>>>> that as better in this case but am willing to listen to a technical
> >>>>>>> justification for why it's incorrect.
> >>>>>>
> >>>>>> it will simplify internal and external development by removing the
> >>>>>> tensions over ioctls numbers. Do you plan to take the block of ioctls
> >>>>>> for future expansion? Do you plan to mix hfi's ioctls with verbs's
> >>>>> ioctls
> >>>>>> based on acceptance of new code?
> >>>>>
> >>>>> I'm still not sure what you are getting at here. Can you explain what
> >>>>> you
> >>>>> mean by tensions over ioctl numbers? I guess I don't understand why the
> >>>>> hfi1_x device's use of icotl numbers has any bearing at all on the
> >>>>> ibcore/verbs ioctl(s).
> >>>>>
> >>>>> If and when new code is accepted and hfi1 converges its API to go
> >>>>> through a
> >>>>> common character device, then hfi1 would surely change to match
> >>>>> whatever is
> >>>>> there whether that's a single ioctl with a command type embedded or
> >>>>> something that has not even yet been proposed.
> >>>>
> >>>> Denny,
> >>>>
> >>>> It is easy for everyone to converge hfi1 API from day one, so if and
> >>>> when new code is posted, the hfi1 changes will be summarized by one
> >>>> line change.
> >>>
> >>> Let's put the future API issue, and the specifics of this patch aside
> >>> for just a minute. I'd like to understand the rationale for wanting a
> >>> single ioctl over specific ioctls in the general sense. I know that's
> >>> what folks seem to prefer from the calls, but perhaps we can get that
> >>> down in writing here on the list.
> >>>
> >>> I see an advantage for the specific ioctls because we can classify them
> >>> based on permission. When running things like strace you can decode the
> >>> ioctl number and see what access it is making. It also makes it easy to
> >>> have a gist of what is going on based on the ioctl call itself.
> >>
> >> Personally, if there is no shortage of ioctls (and there shouldn't be in
> >> this case because this is ioctls on the psm cdev, not on the uverbs
> >> device file), then the separate ioctls have their benefits as Dennis
> >> points out. And seeing as how they (Intel) maintain the psm library
> >> that uses this interface, if they want their library using different
> >> ioctls and their driver using different ioctls versus one mega ioctl
> >> with embedded commands, I'm inclined to let them decide how they want it
> >> to be.
> >
> > Except one thing that their device should integrate into already
> > available char device and don't create new one in IB space.
>
> They have always had their own device. Until the verbs 2.0 API is moved
> forward, I expect them to continue to do so. That they used the
> InfiniBand ioctl number means we might need to make sure that the verbs
> 2.0 API ioctl numbers and the ones they used don't clash, but given that
> we have an assigned range of 256 ioctls and this patchset uses up only
> 13 (and 13 that could probably be shared with qib), I don't see this as
> a starvation of ioctl space issue.
Let's assume that you are planning to provide block of 20 ioctls per
device. Right now, there are 10 (or 8 if we count driver families) drivers in
drivers/infiniband/hw/ + 1 is coming (HSI) + uverbs (approximately 40)
=> 8 * 20 + 20 + 40 = 220 ioctls => we already in shortage without room
to expansion.
Why do we need to put ourselves in such situation?
>
>
> --
> Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> GPG KeyID: 0E572FDD
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-24 20:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 12:25 [PATCH 00/10] IB/hfi1: Clean up cdevs, convert write to ioctl, and destage driver Dennis Dalessandro
[not found] ` <20160519122318.22041.58871.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-05-19 12:25 ` [PATCH 01/10] IB/hfi1: Remove multiple device cdev Dennis Dalessandro
2016-05-19 12:25 ` [PATCH 02/10] IB/hfi1: Remove UI char device Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 03/10] IB/hfi1: Remove EPROM functionality from data device Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 04/10] IB/hfi1: Remove snoop/diag interface Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 05/10] IB/hfi1: Remove unused user command Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 06/10] IB/hfi1: Add ioctl() interface for user commands Dennis Dalessandro
[not found] ` <20160519122622.22041.41686.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-05-21 12:34 ` Leon Romanovsky
[not found] ` <20160521123404.GB25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-21 16:23 ` Dennis Dalessandro
[not found] ` <20160521162301.GA16770-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-22 12:01 ` Leon Romanovsky
[not found] ` <20160522120129.GC25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-22 14:03 ` Dennis Dalessandro
[not found] ` <20160522140351.GA10696-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-22 17:57 ` Leon Romanovsky
[not found] ` <20160522175715.GD25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-23 12:22 ` Dennis Dalessandro
[not found] ` <20160523122207.GA16764-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-23 13:03 ` Leon Romanovsky
[not found] ` <20160523130312.GG25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-23 14:10 ` Dennis Dalessandro
[not found] ` <20160523141049.GE16764-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-24 17:14 ` Jason Gunthorpe
[not found] ` <b9dc4ac8-cfa2-d66e-7e36-f28116f23e59@redhat.com>
[not found] ` <20160524175409.GI25500@leon.nu>
[not found] ` <20160524175409.GI25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-24 19:17 ` Doug Ledford
[not found] ` <a4477030-c966-636e-e395-96857454c7de-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-24 20:13 ` Leon Romanovsky [this message]
[not found] ` <20160524201317.GK25500-2ukJVAZIZ/Y@public.gmane.org>
2016-05-24 20:29 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373AB050188-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 20:54 ` Jason Gunthorpe
[not found] ` <20160524205425.GA7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 22:08 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373AB05027E-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-24 22:15 ` Jason Gunthorpe
2016-05-25 17:56 ` Doug Ledford
[not found] ` <d4913637-7167-8491-88ea-fa65d1e0c22d-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-26 16:08 ` Doug Ledford
2016-05-19 12:26 ` [PATCH 07/10] IB/hfi1: Remove write(), use ioctl() for user cmds Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 08/10] IB/hfi1: Add trace message in user IOCTL handling Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 09/10] IB/hfi1: Do not free hfi1 cdev parent structure early Dennis Dalessandro
[not found] ` <20160519122642.22041.66203.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-05-19 18:31 ` Jason Gunthorpe
[not found] ` <20160519183100.GC26130-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-20 15:57 ` Dennis Dalessandro
2016-05-24 14:17 ` Dennis Dalessandro
[not found] ` <20160524141756.GA17438-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-24 17:20 ` Jason Gunthorpe
[not found] ` <20160524172054.GC8037-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-24 19:39 ` Dennis Dalessandro
[not found] ` <20160524193955.GA17130-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-24 21:51 ` Jason Gunthorpe
[not found] ` <20160524215105.GD7950-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-25 18:45 ` Dennis Dalessandro
2016-05-19 12:26 ` [PATCH 10/10] IB/hfi1: Move driver out of staging Dennis Dalessandro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160524201317.GK25500@leon.nu \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).