Hi! I’ve recently been testing the BlueField-3 DPU’s Data-Path Accelerator (DPA) and learning more about its features. Specifically, I have been testing the DPA kernel’s ability to access host-allocated external memory using the window
feature. I am roughly following the instructions provided in the latest documentation: DPA Development - NVIDIA Docs
Regarding this, I believe I might’ve found a small bug in the Flex IO SDK API.
Following the above sample code for configuring a window, I found my program was crashing at the call to flexio_dev_window_ptr_acquire
. Using the DPA GDB, I learned that the crash inside this function was due to passing the dev_ptr
parameter as NULL (initialized to 0x0). Stepping by instruction, I learned that flexio_dev_window_ptr_acquire
was attempting to write into the NULL pointer’s memory address, which fortunately it seems like the DPA’s RTOS catches and segfaults out of.
I resolved my issue by initializing dev_ptr to a separate int value before passing it to the function:
uint64_t dev_ptr_value = 0;
uint64_t *dev_ptr = &dev_ptr_value;
However, checking for NULL pointers is common practice, and unless I’m missing something I think it would be a useful check to have for this function as well.
Best,
Darius