#include <stdint.h>
#include <doca_compat.h>
#include <doca_error.h>
#include <doca_types.h>
Go to the source code of this file.
◆ DOCA_STA_VTOPHYS_ERROR
| #define DOCA_STA_VTOPHYS_ERROR (0xFFFFFFFFFFFFFFFFULL) |
◆ doca_sta_free_cb_t
| typedef void(* doca_sta_free_cb_t) (void *buf) |
◆ doca_sta_vtophys_cb_t
| typedef uint64_t(* doca_sta_vtophys_cb_t) (const void *buf, uint32_t size) |
Get the physical address of a buffer previously allocated by doca_sta_zmalloc_cb_t.
- Parameters
-
| [in] | buf | A pointer to a buffer. |
| [in] | size | Contains the size of the memory region pointed to by vaddr. |
- Returns
- the physical address of this buffer on success, or DOCA_STA_VTOPHYS_ERROR on failure.
Definition at line 66 of file doca_sta_mem.h.
◆ doca_sta_zmalloc_cb_t
| typedef void*(* doca_sta_zmalloc_cb_t) (size_t size, size_t align, uint64_t *phys_addr) |
Function to allocate a pinned memory buffer with the given size and alignment. The buffer will be zeroed.
- Parameters
-
| [in] | size | Size in bytes. |
| [in] | align | If non-zero, the allocated buffer is aligned to a multiple of align. In this case, it must be a power of two. The returned buffer is always aligned to at least cache line size. |
| [in] | phys_addr | A pointer to the variable to hold the physical address of the allocated buffer is passed. If NULL, the physical address is not returned. |
- Returns
- a pointer to the allocated memory buffer.
Definition at line 45 of file doca_sta_mem.h.
◆ doca_sta_mem_allocator_register()