mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland Dreier <rolandd@cisco.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [PATCH 16/16] IB uverbs: add documentation file
Date: Tue, 28 Jun 2005 16:03:44 -0700	[thread overview]
Message-ID: <2005628163.mVVkhZjoFQLjYM7E@cisco.com> (raw)
In-Reply-To: <2005628163.VUsohVlfE72duiiM@cisco.com>

Add documentation for InfiniBand userspace verbs.

Signed-off-by: Roland Dreier <rolandd@cisco.com>

---

 Documentation/infiniband/user_verbs.txt |   69 ++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+)



--- /dev/null	2005-06-23 14:14:38.423479552 -0700
+++ linux/Documentation/infiniband/user_verbs.txt	2005-06-28 15:20:31.245140214 -0700
@@ -0,0 +1,69 @@
+USERSPACE VERBS ACCESS
+
+  The ib_uverbs module, built by enabling CONFIG_INFINIBAND_USER_VERBS,
+  enables direct userspace access to IB hardware via "verbs," as
+  described in chapter 11 of the InfiniBand Architecture Specification.
+
+  To use the verbs, the libibverbs library, available from
+  <http://openib.org/>, is required.  libibverbs contains a
+  device-independent API for using the ib_uverbs interface.
+  libibverbs also requires appropriate device-dependent kernel and
+  userspace driver for your InfiniBand hardware.  For example, to use
+  a Mellanox HCA, you will need the ib_mthca kernel module and the
+  libmthca userspace driver be installed.
+
+User-kernel communication
+
+  Userspace communicates with the kernel for slow path, resource
+  management operations via the /dev/infiniband/uverbsN character
+  devices.  Fast path operations are typically performed by writing
+  directly to hardware registers mmap()ed into userspace, with no
+  system call or context switch into the kernel.
+
+  Commands are sent to the kernel via write()s on these device files.
+  The ABI is defined in drivers/infiniband/include/ib_user_verbs.h.
+  The structs for commands that require a response from the kernel
+  contain a 64-bit field used to pass a pointer to an output buffer.
+  Status is returned to userspace as the return value of the write()
+  system call.
+
+Resource management
+
+  Since creation and destruction of all IB resources is done by
+  commands passed through a file descriptor, the kernel can keep track
+  of which resources are attached to a given userspace context.  The
+  ib_uverbs module maintains idr tables that are used to translate
+  between kernel pointers and opaque userspace handles, so that kernel
+  pointers are never exposed to userspace and userspace cannot trick
+  the kernel into following a bogus pointer.
+
+  This also allows the kernel to clean up when a process exits and
+  prevent one process from touching another process's resources.
+
+Memory pinning
+
+  Direct userspace I/O requires that memory regions that are potential
+  I/O targets be kept resident at the same physical address.  The
+  ib_uverbs module manages pinning and unpinning memory regions via
+  get_user_pages() and put_page() calls.  It also accounts for the
+  amount of memory pinned in the process's locked_vm, and checks that
+  unprivileged processes do not exceed their RLIMIT_MEMLOCK limit.
+
+  Pages that are pinned multiple times are counted each time they are
+  pinned, so the value of locked_vm may be an overestimate of the
+  number of pages pinned by a process.
+
+/dev files
+
+  To create the appropriate character device files automatically with
+  udev, a rule like
+
+    KERNEL="uverbs*", NAME="infiniband/%k"
+
+  can be used.  This will create device nodes named
+
+    /dev/infiniband/uverbs0
+
+  and so on.  Since the InfiniBand userspace verbs should be safe for
+  use by non-privileged processes, it may be useful to add an
+  appropriate MODE or GROUP to the udev rule.

  reply	other threads:[~2005-06-28 23:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28 23:03 [PATCH 00/16] Add InfiniBand userspace verbs (direct userspace access) Roland Dreier
2005-06-28 23:03 ` [PATCH 01/16] IB uverbs: core API extensions Roland Dreier
2005-06-28 23:03   ` [PATCH 02/16] IB uverbs: update kernel midlayer for new API Roland Dreier
2005-06-28 23:03     ` [PATCH 03/16] IB uverbs: update mthca " Roland Dreier
2005-06-28 23:03       ` [PATCH 04/16] IB uverbs: add user verbs ABI header Roland Dreier
2005-06-28 23:03         ` [PATCH 05/16] IB uverbs: core implementation Roland Dreier
2005-06-28 23:03           ` [PATCH 06/16] IB uverbs: memory pinning implementation Roland Dreier
2005-06-28 23:03             ` [PATCH 07/16] IB uverbs: hook up Kconfig/Makefile Roland Dreier
2005-06-28 23:03               ` [PATCH 08/16] IB uverbs: add mthca ABI header Roland Dreier
2005-06-28 23:03                 ` [PATCH 09/16] IB uverbs: add mthca user doorbell record support Roland Dreier
2005-06-28 23:03                   ` [PATCH 10/16] IB uverbs: add mthca user context support Roland Dreier
2005-06-28 23:03                     ` [PATCH 11/16] IB uverbs: add mthca mmap support Roland Dreier
2005-06-28 23:03                       ` [PATCH 12/16] IB uverbs: add mthca user PD support Roland Dreier
2005-06-28 23:03                         ` [PATCH 13/16] IB uverbs: add mthca user MR support Roland Dreier
2005-06-28 23:03                           ` [PATCH 14/16] IB uverbs: add mthca user CQ support Roland Dreier
2005-06-28 23:03                             ` [PATCH 15/16] IB uverbs: add mthca user QP support Roland Dreier
2005-06-28 23:03                               ` Roland Dreier [this message]
2005-06-29  0:10                             ` [PATCH 14/16] IB uverbs: add mthca user CQ support Andrew Morton
2005-06-29 16:06                               ` Roland Dreier
2005-06-29  0:07                         ` [PATCH 12/16] IB uverbs: add mthca user PD support Andrew Morton
2005-06-29 16:06                           ` Roland Dreier
2005-06-29  0:05                       ` [PATCH 11/16] IB uverbs: add mthca mmap support Andrew Morton
2005-06-29 16:06                         ` Roland Dreier
2005-07-05 19:20                         ` Roland Dreier
2005-07-05 20:53                           ` Michael S. Tsirkin
2005-07-05 22:07                             ` Roland Dreier
2005-06-29  0:02             ` [PATCH 06/16] IB uverbs: memory pinning implementation Andrew Morton
2005-06-29 16:06               ` Roland Dreier
2005-06-29  0:27           ` [PATCH 05/16] IB uverbs: core implementation Greg KH
2005-06-29  1:38             ` [openib-general] " Tom Duffy
2005-06-29  4:13             ` Troy Benjegerdes
2005-06-29 16:12               ` Greg KH
2005-06-29 16:32                 ` Troy Benjegerdes
2005-06-29 16:06             ` Roland Dreier
2005-06-29 17:01             ` Roland Dreier
2005-06-29 18:03               ` Greg KH
2005-06-30  3:13             ` [openib-general] " Ronald G. Minnich

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=2005628163.mVVkhZjoFQLjYM7E@cisco.com \
    --to=rolandd@cisco.com \
    --cc=akpm@osdl.org \
    --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

Powered by JetHome