All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Dennis Dalessandro
	<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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>
Subject: Re: [PATCH 06/10] IB/hfi1: Add ioctl() interface for user commands
Date: Sat, 21 May 2016 15:34:04 +0300	[thread overview]
Message-ID: <20160521123404.GB25500@leon.nu> (raw)
In-Reply-To: <20160519122622.22041.41686.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]

On Thu, May 19, 2016 at 05:26:24AM -0700, Dennis Dalessandro wrote:
> IOCTL is more suited to what user space commands need to do than the
> write() interface. Add IOCTL definitions for all existing write commands
> and the handling for those. The write() interface will be removed in a
> follow on patch.
> 
> Reviewed-by: Mitko Haralanov <mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/staging/rdma/hfi1/common.h   |    5 +
>  drivers/staging/rdma/hfi1/file_ops.c |  204 ++++++++++++++++++++++++++++++++++
>  include/uapi/rdma/hfi/hfi1_user.h    |   40 +++++++
>  3 files changed, 248 insertions(+), 1 deletions(-)
> 

<...>

> +#define IB_IOCTL_MAGIC 0x1b /* See Documentation/ioctl/ioctl-number.txt */
> +
> +struct hfi1_cmd;
> +#define HFI1_IOCTL_ASSIGN_CTXT \
> +	_IOWR(IB_IOCTL_MAGIC, HFI1_CMD_ASSIGN_CTXT, struct hfi1_user_info)
> +#define HFI1_IOCTL_CTXT_INFO \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_CTXT_INFO, struct hfi1_ctxt_info)
> +#define HFI1_IOCTL_USER_INFO \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_USER_INFO, struct hfi1_base_info)
> +#define HFI1_IOCTL_TID_UPDATE \
> +	_IOWR(IB_IOCTL_MAGIC, HFI1_CMD_TID_UPDATE, struct hfi1_tid_info)
> +#define HFI1_IOCTL_TID_FREE \
> +	_IOWR(IB_IOCTL_MAGIC, HFI1_CMD_TID_FREE, struct hfi1_tid_info)
> +#define HFI1_IOCTL_CREDIT_UPD \
> +	_IO(IB_IOCTL_MAGIC, HFI1_CMD_CREDIT_UPD)
> +#define HFI1_IOCTL_RECV_CTRL \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_RECV_CTRL, int)
> +#define HFI1_IOCTL_POLL_TYPE \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_POLL_TYPE, int)
> +#define HFI1_IOCTL_ACK_EVENT \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_ACK_EVENT, unsigned long)
> +#define HFI1_IOCTL_SET_PKEY \
> +	_IOW(IB_IOCTL_MAGIC, HFI1_CMD_SET_PKEY, __u16)
> +#define HFI1_IOCTL_CTXT_RESET \
> +	_IO(IB_IOCTL_MAGIC, HFI1_CMD_CTXT_RESET)
> +#define HFI1_IOCTL_TID_INVAL_READ \
> +	_IOWR(IB_IOCTL_MAGIC, HFI1_CMD_TID_INVAL_READ, struct hfi1_tid_info)
> +#define HFI1_IOCTL_GET_VERS \
> +	_IOR(IB_IOCTL_MAGIC, HFI1_CMD_GET_VERS, int)
>  

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-05-21 12:34 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 [this message]
     [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
     [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=20160521123404.GB25500@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=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.