24c77594e0
To enable the gpudev rte_gpu_mem_cpu_map feature to expose GPU memory to the CPU, the GPU CUDA driver library needs the GDRCopy library and driver. If DPDK is built without GDRCopy, the GPU CUDA driver returns error if the is invoked rte_gpu_mem_cpu_map. All the others GPU CUDA driver functionalities are not affected by the absence of GDRCopy, thus this is an optional functionality that can be enabled in the GPU CUDA driver. CUDA driver documentation has been updated accordingly. Signed-off-by: Elena Agostini <eagostini@nvidia.com>
26 lines
645 B
Meson
26 lines
645 B
Meson
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright (c) 2021 NVIDIA Corporation & Affiliates
|
|
|
|
if not is_linux
|
|
build = false
|
|
reason = 'only supported on Linux'
|
|
subdir_done()
|
|
endif
|
|
if not cc.has_header('cuda.h')
|
|
build = false
|
|
reason = 'missing dependency, "cuda.h"'
|
|
subdir_done()
|
|
endif
|
|
if not cc.has_header('cudaTypedefs.h')
|
|
build = false
|
|
reason = 'missing dependency, "cudaTypedefs.h"'
|
|
subdir_done()
|
|
endif
|
|
|
|
if cc.has_header('gdrapi.h')
|
|
dpdk_conf.set('DRIVERS_GPU_CUDA_GDRCOPY_H', 1)
|
|
endif
|
|
|
|
deps += ['gpudev', 'pci', 'bus_pci']
|
|
sources = files('cuda.c', 'gdrcopy.c')
|