On 6/3/2021 8:47 AM, Jerin Jacob wrote: > On Thu, Jun 3, 2021 at 2:05 AM Thomas Monjalon <tho...@monjalon.net> wrote: >> >> From: Elena Agostini <eagost...@nvidia.com> >> >> The new library gpudev is for dealing with GPU from a DPDK application >> in a vendor-agnostic way. >> >> As a first step, the features are focused on memory management. >> A function allows to allocate memory inside the GPU, >> while another one allows to use main (CPU) memory from the GPU. >> >> The infrastructure is prepared to welcome drivers in drivers/gpu/ >> as the upcoming NVIDIA one, implementing the gpudev API. >> Other additions planned for next revisions: >> - C implementation file >> - guide documentation >> - unit tests >> - integration in testpmd to enable Rx/Tx to/from GPU memory. >> >> The next step should focus on GPU processing task control. >> >> Signed-off-by: Elena Agostini <eagost...@nvidia.com> >> Signed-off-by: Thomas Monjalon <tho...@monjalon.net> >> --- >> .gitignore | 1 + >> MAINTAINERS | 6 + >> doc/api/doxy-api-index.md | 1 + >> doc/api/doxy-api.conf.in | 1 + >> doc/guides/conf.py | 8 ++ >> doc/guides/gpus/features/default.ini | 13 ++ >> doc/guides/gpus/index.rst | 11 ++ >> doc/guides/gpus/overview.rst | 7 + >> doc/guides/index.rst | 1 + >> doc/guides/prog_guide/gpu.rst | 5 + >> doc/guides/prog_guide/index.rst | 1 + >> drivers/gpu/meson.build | 4 + >> drivers/meson.build | 1 + >> lib/gpudev/gpu_driver.h | 44 +++++++ >> lib/gpudev/meson.build | 9 ++ >> lib/gpudev/rte_gpudev.h | 183 +++++++++++++++++++++++++++ >> lib/gpudev/version.map | 11 ++ >> lib/meson.build | 1 + >> 18 files changed, 308 insertions(+) >> create mode 100644 doc/guides/gpus/features/default.ini >> create mode 100644 doc/guides/gpus/index.rst >> create mode 100644 doc/guides/gpus/overview.rst >> create mode 100644 doc/guides/prog_guide/gpu.rst >> create mode 100644 drivers/gpu/meson.build >> create mode 100644 lib/gpudev/gpu_driver.h >> create mode 100644 lib/gpudev/meson.build >> create mode 100644 lib/gpudev/rte_gpudev.h >> create mode 100644 lib/gpudev/version.map >> >> diff --git a/.gitignore b/.gitignore >> index b19c0717e6..49494e0c6c 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -14,6 +14,7 @@ doc/guides/compressdevs/overview_feature_table.txt >> doc/guides/regexdevs/overview_feature_table.txt >> doc/guides/vdpadevs/overview_feature_table.txt >> doc/guides/bbdevs/overview_feature_table.txt >> +doc/guides/gpus/overview_feature_table.txt >> >> # ignore generated ctags/cscope files >> cscope.out.po >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 5877a16971..c4755dfe9a 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -452,6 +452,12 @@ F: app/test-regex/ >> F: doc/guides/prog_guide/regexdev.rst >> F: doc/guides/regexdevs/features/default.ini >> >> +GPU API - EXPERIMENTAL >> +M: Elena Agostini <eagost...@nvidia.com> >> +F: lib/gpudev/ >> +F: doc/guides/prog_guide/gpu.rst >> +F: doc/guides/gpus/features/default.ini >> + >> Eventdev API >> M: Jerin Jacob <jer...@marvell.com> >> T: git://dpdk.org/next/dpdk-next-eventdev >> diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md >> index 1992107a03..bd10342ca2 100644 >> --- a/doc/api/doxy-api-index.md >> +++ b/doc/api/doxy-api-index.md >> @@ -21,6 +21,7 @@ The public API headers are grouped by topics: >> [compressdev] (@ref rte_compressdev.h), >> [compress] (@ref rte_comp.h), >> [regexdev] (@ref rte_regexdev.h), >> + [gpudev] (@ref rte_gpudev.h), > > Since this device does not have a queue etc? Shouldn't make it a > library like mempool with vendor-defined ops?
+1 Current RFC announces additional memory allocation capabilities, which can suits better as extension to existing memory related library instead of a new device abstraction library. > Any specific reason for making it a device? The reason why I am asking > this is, as other DPDK devices as symmetry in queue(s), configure, > start, stop operation etc. > > >> + >> +struct rte_gpu_dev { >> + /* Backing device. */ >> + struct rte_device *device; > > See above? > >> + /* GPU info structure. */