gpu/cuda: missing slash in libcuda.so path

Message ID 20220301194205.20204-1-eagostini@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series gpu/cuda: missing slash in libcuda.so path |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Elena Agostini March 1, 2022, 7:42 p.m. UTC
  From: Elena Agostini <eagostini@nvidia.com>

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
---
 drivers/gpu/cuda/cuda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon March 7, 2022, 9:47 p.m. UTC | #1
01/03/2022 20:42, eagostini@nvidia.com:
> From: Elena Agostini <eagostini@nvidia.com>
> 
> Signed-off-by: Elena Agostini <eagostini@nvidia.com>

Applied with this title and commit log:

    gpu/cuda: fix dependency loading path
    
    A slash was missing in libcuda.so path for dlopen.
  
Kevin Traynor March 8, 2022, 2:24 p.m. UTC | #2
Hi Elena,

On 07/03/2022 21:47, Thomas Monjalon wrote:
> 01/03/2022 20:42, eagostini@nvidia.com:
>> From: Elena Agostini <eagostini@nvidia.com>
>>
>> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
> 
> Applied with this title and commit log:
> 
>      gpu/cuda: fix dependency loading path
>      
>      A slash was missing in libcuda.so path for dlopen.
> 
> 
> 

This seems like a good candidate for backport to LTS, so I added it to 
the queue for 21.11.1.

Please let me know if you do *not* want it backported 21.11.1.

thanks,
Kevin.
  
Elena Agostini March 8, 2022, 2:24 p.m. UTC | #3
Yes please

Thanks
EA

From: Kevin Traynor <ktraynor@redhat.com>
Date: Tuesday, 8 March 2022 at 15:24
To: Elena Agostini <eagostini@nvidia.com>
Cc: dev@dpdk.org <dev@dpdk.org>, NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>
Subject: Re: [PATCH] gpu/cuda: missing slash in libcuda.so path
External email: Use caution opening links or attachments


Hi Elena,

On 07/03/2022 21:47, Thomas Monjalon wrote:
> 01/03/2022 20:42, eagostini@nvidia.com:
>> From: Elena Agostini <eagostini@nvidia.com>
>>
>> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
>
> Applied with this title and commit log:
>
>      gpu/cuda: fix dependency loading path
>
>      A slash was missing in libcuda.so path for dlopen.
>
>
>

This seems like a good candidate for backport to LTS, so I added it to
the queue for 21.11.1.

Please let me know if you do *not* want it backported 21.11.1.

thanks,
Kevin.
  
Thomas Monjalon March 8, 2022, 2:29 p.m. UTC | #4
08/03/2022 15:24, Elena Agostini:
> Yes please
> 
> Thanks
> EA
> 
> From: Kevin Traynor <ktraynor@redhat.com>
> 
> Hi Elena,
> 
> On 07/03/2022 21:47, Thomas Monjalon wrote:
> > 01/03/2022 20:42, eagostini@nvidia.com:
> >> From: Elena Agostini <eagostini@nvidia.com>
> >>
> >> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
> >
> > Applied with this title and commit log:
> >
> >      gpu/cuda: fix dependency loading path
> >
> >      A slash was missing in libcuda.so path for dlopen.
> >
> >
> >
> 
> This seems like a good candidate for backport to LTS, so I added it to
> the queue for 21.11.1.
> 
> Please let me know if you do *not* want it backported 21.11.1.
> 
> thanks,
> Kevin.


I forgot the Fixes: line and Cc: stable@dpdk.org

Elena, please remind to add such lines next time,
it makes the process more automatic.
  

Patch

diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 2f8c4684ce..8505d39d64 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -169,7 +169,7 @@  cuda_loader(void)
 	if (getenv("CUDA_PATH_L") == NULL)
 		snprintf(cuda_path, 1024, "%s", "libcuda.so");
 	else
-		snprintf(cuda_path, 1024, "%s%s", getenv("CUDA_PATH_L"), "libcuda.so");
+		snprintf(cuda_path, 1024, "%s/%s", getenv("CUDA_PATH_L"), "libcuda.so");
 
 	cudalib = dlopen(cuda_path, RTLD_LAZY);
 	if (cudalib == NULL) {