public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH][RFC/v1][9/12] Add InfiniBand userspace MAD support
Date: Mon, 22 Nov 2004 15:05:40 -0800	[thread overview]
Message-ID: <52oehpbi2j.fsf@topspin.com> (raw)
In-Reply-To: <20041122225033.GD15634@kroah.com> (Greg KH's message of "Mon, 22 Nov 2004 14:50:33 -0800")

    >> Add a driver that provides a character special device for each
    >> InfiniBand port.  This device allows userspace to send and
    >> receive MADs via write() and read() (with some control
    >> operations implemented as ioctls).

    Greg> Do you really need these ioctls?

    Greg> This could be in a sysfs file, right?

The API version definitely can be, good point.

    Greg> You are letting any user, with any privilege register or
    Greg> unregister an "agent"?

They have to be able to open the device node.  We could add a check
that they have it open for writing but there's not really much point
in opening this device read-only.

    Greg> And shouldn't you lock your list of agent ids when adding or
    Greg> removing one, or are you relying on the BKL of the ioctl
    Greg> call?  If so, please document this.

Each file has an "agent_mutex" rwsem that protects this... the global
list of agents handled by the lower level API is protected by its own locking.

    Greg> Also, these "agents" seem to be a type of filter, right?  Is
    Greg> there no other way to implement this than an ioctl?

ioctl seems to be the least bad way to me.  This really feels like a
legitimate use of ioctl to me -- we use read/write to handle passing
data through our file descriptor, and ioctl for control of the
properties of the descriptor.

What would you suggest as an ioctl replacement?

Thanks,
 Roland

  reply	other threads:[~2004-11-22 23:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041122713.cSeT4UFKGqJDdZ8T@topspin.com>
2004-11-22 15:13 ` [PATCH][RFC/v1][6/12] IPoIB IPv4 multicast Roland Dreier
2004-11-22 15:13   ` [PATCH][RFC/v1][7/12] IPoIB IPv6 support Roland Dreier
2004-11-22 15:14     ` [PATCH][RFC/v1][8/12] Add IPoIB (IP-over-InfiniBand) driver Roland Dreier
2004-11-22 15:14       ` [PATCH][RFC/v1][9/12] Add InfiniBand userspace MAD support Roland Dreier
2004-11-22 15:14         ` [PATCH][RFC/v1][10/12] Document InfiniBand ioctl use Roland Dreier
2004-11-22 15:14           ` [PATCH][RFC/v1][11/12] Add InfiniBand Documentation files Roland Dreier
2004-11-22 15:14             ` [PATCH][RFC/v1][12/12] InfiniBand MAINTAINERS entry Roland Dreier
2004-11-22 15:31             ` [PATCH][RFC/v1][11/12] Add InfiniBand Documentation files Christoph Hellwig
2004-11-22 15:41               ` Roland Dreier
2004-11-23  8:49               ` [openib-general] " Eric W. Biederman
2004-11-22 22:53             ` Greg KH
2004-11-22 22:58               ` Roland Dreier
2004-11-22 23:05                 ` Greg KH
2004-11-22 23:21                   ` Roland Dreier
2004-11-22 23:30                   ` [openib-general] " Johannes Erdfelt
2004-11-23  6:45                     ` Greg KH
2004-11-23  6:51                       ` Johannes Erdfelt
2004-11-23  7:38                         ` Greg KH
2004-11-22 22:50         ` [PATCH][RFC/v1][9/12] Add InfiniBand userspace MAD support Greg KH
2004-11-22 23:05           ` Roland Dreier [this message]
2004-11-23  7:45             ` Greg KH
2004-11-23 15:04               ` Roland Dreier
2004-11-23  2:08           ` Roland Dreier
2004-11-23  6:30             ` Greg KH
2004-11-23  6:45               ` Roland Dreier
2004-11-23  7:43                 ` Greg KH
2004-11-23 15:06                   ` Roland Dreier
2004-11-23 15:17                     ` Greg KH
2004-11-22 19:40       ` [PATCH][RFC/v1][8/12] Add IPoIB (IP-over-InfiniBand) driver Sam Ravnborg
2004-11-22 22:34       ` Greg KH
2004-11-22 23:18         ` Roland Dreier

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=52oehpbi2j.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openib-general@openib.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