DOCA MMAP advise DOCA MMAP advise is a context that facilitates invalidating cache.
◆ doca_mmap_advise_task_invalidate_cache_completion_cb_t
| typedef void(* doca_mmap_advise_task_invalidate_cache_completion_cb_t) (struct doca_mmap_advise_task_invalidate_cache *task, union doca_data task_user_data, union doca_data ctx_user_data) |
Invalidate cache task completion callback.
- Parameters
-
| [in] | task | The successfully completed invalidate cache task. The implementation can assume task is not NULL. |
| [in] | task_user_data | Task's user data which was previously set. |
| [in] | ctx_user_data | Context's user data which was previously set. |
Definition at line 66 of file doca_mmap_advise.h.
◆ doca_mmap_advise_as_ctx()
| DOCA_EXPERIMENTAL struct doca_ctx* doca_mmap_advise_as_ctx |
( |
struct doca_mmap_advise * |
mmap_advise | ) |
|
Convert a MMAP advise to a DOCA context.
- Parameters
-
| [in] | mmap_advise | The doca_mmap_advise to be converted |
- Returns
- The matching doca_ctx instance in case of success, NULL otherwise.
◆ doca_mmap_advise_cap_task_cache_invalidate_is_supported()
Check if a given device supports submitting a DOCA MMAP advise cache invalidate task.
- Parameters
-
| [in] | devinfo | The DOCA device information. |
- Returns
- DOCA_SUCCESS - in case device supports submitting a cache invalidate task. Error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - received invalid input.
- DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a cache invalidate task.
◆ doca_mmap_advise_create()
Create an mmap advise instance.
- Parameters
-
| [in] | dev | doca_dev to create the mmap_advise on |
| [out] | mmap_advise | The created doca_mmap_advise instance. |
- Returns
- DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - mmap_advise argument is a NULL pointer.
- DOCA_ERROR_NO_MEMORY - failed to alloc doca_mmap_advise.
◆ doca_mmap_advise_destroy()
Destroy an mmap advise instance.
- Parameters
-
| [in] | mmap_advise | doca_mmap_advise to be destroyed. |
- Returns
- DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - mmap_advise argument is a NULL pointer.
◆ doca_mmap_advise_task_cache_invalidate_get_max_buf_size()
| DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_task_cache_invalidate_get_max_buf_size |
( |
const struct doca_devinfo * |
devinfo, |
|
|
uint64_t * |
buf_size |
|
) |
| |
Get the maximum supported buffer size for cache invalidate.
- Parameters
-
| [in] | devinfo | The DOCA device information. |
| [out] | buf_size | The maximum supported buffer size in bytes. |
- Returns
- DOCA_SUCCESS - upon success Error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - in case of invalid input.
◆ doca_mmap_advise_task_invalidate_cache_alloc_init()
| DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_task_invalidate_cache_alloc_init |
( |
struct doca_mmap_advise * |
mmap_advise, |
|
|
struct doca_buf * |
buf, |
|
|
union doca_data |
user_data, |
|
|
struct doca_mmap_advise_task_invalidate_cache ** |
task |
|
) |
| |
Allocate a DOCA MMAP advise cache invalidate task.
- Parameters
-
| [in] | mmap_advise | The associated mmap advise. |
| [in] | buf | A pointer to the doca_buf to invalidate. |
| [in] | user_data | doca_data to attach the task, which is later passed to the task's completion CBs. |
| [out] | task | The allocated cache invalidate task. |
- Returns
- DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
- DOCA_ERROR_NO_MEMORY - no more tasks to allocate.
◆ doca_mmap_advise_task_invalidate_cache_as_doca_task()
| DOCA_EXPERIMENTAL struct doca_task* doca_mmap_advise_task_invalidate_cache_as_doca_task |
( |
struct doca_mmap_advise_task_invalidate_cache * |
task | ) |
|
Convert a DOCA MMAP advise invalidate cache task to a DOCA Task.
- Parameters
-
| [in] | task | The doca task invalidate cache task. |
- Returns
- The matching doca task in case of success, NULL otherwise.
◆ doca_mmap_advise_task_invalidate_cache_get_buf()
| DOCA_EXPERIMENTAL struct doca_buf* doca_mmap_advise_task_invalidate_cache_get_buf |
( |
const struct doca_mmap_advise_task_invalidate_cache * |
task | ) |
|
Get the doca_buf pointer of a DOCA MMAP advise cache invalidate task.
- Parameters
-
| [in] | task | The task to get its buf pointer. |
- Returns
- The task's buf pointer.
◆ doca_mmap_advise_task_invalidate_cache_set_buf()
| DOCA_EXPERIMENTAL void doca_mmap_advise_task_invalidate_cache_set_buf |
( |
struct doca_mmap_advise_task_invalidate_cache * |
task, |
|
|
struct doca_buf * |
buf |
|
) |
| |
Set the doca_buf pointer of a DOCA MMAP advise cache invalidate task.
- Parameters
-
| [in] | task | The task to set. |
| [in] | buf | A pointer to the doca_buf to invalidate. |
◆ doca_mmap_advise_task_invalidate_cache_set_conf()
Set the DOCA MMAP advise cache invalidate task configuration.
- Parameters
-
| [in] | mmap_advise | The associated mmap advise. |
| [in] | completion_cb | The cache invalidate task completion callback. |
| [in] | error_cb | The cache invalidate task error callback. |
| [in] | num_tasks | Number of cache invalidate tasks. |
- Returns
- DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - received null parameter.
- DOCA_ERROR_NOT_PERMITTED - context not in idle state.