[PATCH v7 1/1] gpu/cuda: introduce CUDA driver

Stephen Hemminger stephen at networkplumber.org
Tue Nov 16 16:58:11 CET 2021


Minor comments, overall looks fine.


+/* CUDA Driver functions loaded with dlsym() */
+CUresult CUDAAPI (*sym_cuInit)(unsigned int flags) = NULL;
+CUresult CUDAAPI (*sym_cuDriverGetVersion)(int *driverVersion) = NULL;
+CUresult CUDAAPI (*sym_cuGetProcAddress)(const char *symbol,
+		void **pfn, int cudaVersion, uint64_t flags) = NULL;
+

Can these be local (static) since not prefixed with driver specific name.
Also global variables are always loaded as zero so NULL initialization is
unnecessary. For other types checkpatch would complain.


> +/* NVIDIA GPU address map */
> +static struct rte_pci_id pci_id_cuda_map[] = {

Can this be const?


More information about the dev mailing list