On Thu, 17 Oct 2024 15:58:02 -0700
Stephen Hemminger <[email protected]> wrote:
> Use function attributes to catch misuse of GPU memory
> at compile time.
>
> Stephen Hemminger (2):
> test-gpudev: avoid use-after-free and free-non-heap warnings
> gpudev: add malloc annotations to rte_gpu_mem_alloc
>
> app/test-gpudev/main.c | 10 ++++++++-
> lib/gpudev/rte_gpudev.h | 46 +++++++++++++++++++++--------------------
> 2 files changed, 33 insertions(+), 23 deletions(-)
>
The problem is that include checker can't handle this.
####################################################################################
#### [Begin job log] "ubuntu-22.04-gcc-debug+doc+examples+tests" at step Build
and test
####################################################################################
from buildtools/chkincs/chkincs.p/gpudev_driver.c:1:
/home/runner/work/dpdk/dpdk/lib/gpudev/rte_gpudev.h:411:9: error:
‘rte_gpu_mem_free’ is deprecated: Symbol is not yet part of stable ABI
[-Werror=deprecated-declarations]
411 | __rte_malloc __rte_dealloc(rte_gpu_mem_free, 2);
| ^~~~~~~~~~~~
/home/runner/work/dpdk/dpdk/lib/gpudev/rte_gpudev.h:380:5: note: declared here
380 | int rte_gpu_mem_free(int16_t dev_id, void *ptr);
| ^~~~~~~~~~~~~~~~
Either include checker needs to be able to handle experimental symbols
or maybe it is time for gpudev to be moved out experimental status for 25.03?