DPDK patches and discussions
 help / color / mirror / Atom feed
From: <eagostini@nvidia.com>
To: <dev@dpdk.org>
Cc: Elena Agostini <eagostini@nvidia.com>
Subject: [PATCH v1 0/1] gpu/cuda: expose GPU memory with GDRCopy
Date: Tue, 11 Jan 2022 17:39:28 +0000	[thread overview]
Message-ID: <20220111173929.28746-1-eagostini@nvidia.com> (raw)

From: Elena Agostini <eagostini@nvidia.com>

GPU CUDA implementation of the new gpudev functions
to expose GPU memory to the CPU.

Today GDRCopy library is required to pin and DMA map
the GPU memory through the BAR1 of the GPU and expose
it to the CPU.

Goal here is to hide technical details GDRCopy library
and expose the functionality through the generic
gpudev layer.

GDRCopy can be found here: https://github.com/NVIDIA/gdrcopy

To build GPU CUDA driver with GDRCopy, you need to build
DPDK indicating the gdrapi.h header file with
-Dc_args="-I/path/to/gdrapi/".

To execute you need to indicate the path to libgdrapi.so
library with the environment variable
GDRCOPY_PATH_L=/path/to/gdrcopy/lib/

If GDRCopy is not built with GPU CUDA driver, the GPU expose
functionality will not be supported by the driver.

This is an indipendent feature.
All the other GPU CUDA driver capabilities are not affected
if GDRCopy is not built.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>

---
Dependency on https://patches.dpdk.org/project/dpdk/patch/20220108000457.31104-1-eagostini@nvidia.com/

Elena Agostini (1):
  gpu/cuda: expose GPU memory with GDRCopy

 drivers/gpu/cuda/cuda.c      | 101 +++++++++++++++++++++++++
 drivers/gpu/cuda/gdrcopy.c   | 139 +++++++++++++++++++++++++++++++++++
 drivers/gpu/cuda/gdrcopy.h   |  29 ++++++++
 drivers/gpu/cuda/meson.build |   6 +-
 4 files changed, 274 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/cuda/gdrcopy.c
 create mode 100644 drivers/gpu/cuda/gdrcopy.h

-- 
2.17.1


             reply	other threads:[~2022-01-11  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 17:39 eagostini [this message]
2022-01-11 17:39 ` [PATCH v1 1/1] " eagostini
2022-02-21 22:44 ` [PATCH v2] gpu/cuda: CPU map " eagostini
2022-02-23 19:44   ` [PATCH v3] " eagostini
2022-02-25  3:12   ` [PATCH v4 1/2] doc/gpus: add cuda.ini into features eagostini
2022-02-25  3:12     ` [PATCH v4 2/2] gpu/cuda: CPU map GPU memory with GDRCopy eagostini
2022-02-27 16:49       ` Thomas Monjalon
2022-02-27 16:48     ` [PATCH v4 1/2] doc/gpus: add cuda.ini into features Thomas Monjalon

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=20220111173929.28746-1-eagostini@nvidia.com \
    --to=eagostini@nvidia.com \
    --cc=dev@dpdk.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).