NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_mmap_advise.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
24 #ifndef DOCA_MMAP_ADVISE_H_
25 #define DOCA_MMAP_ADVISE_H_
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include <doca_compat.h>
31 #include <doca_error.h>
32 #include <doca_types.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /**********************************************************************************************************************
39  * opaque types
40  *********************************************************************************************************************/
41 struct doca_ctx;
42 struct doca_dev;
43 struct doca_devinfo;
44 struct doca_mmap_advise;
45 struct doca_buf;
46 
53 struct doca_mmap_advise_task_invalidate_cache;
54 
67  struct doca_mmap_advise_task_invalidate_cache *task,
68  union doca_data task_user_data,
69  union doca_data ctx_user_data);
70 
86 doca_error_t doca_mmap_advise_create(struct doca_dev *dev, struct doca_mmap_advise **mmap_advise);
87 
100 doca_error_t doca_mmap_advise_destroy(struct doca_mmap_advise *mmap_advise);
101 
113 struct doca_ctx *doca_mmap_advise_as_ctx(struct doca_mmap_advise *mmap_advise);
114 
129 
146  uint64_t *buf_size);
147 
168  struct doca_mmap_advise *mmap_advise,
171  uint32_t num_tasks);
172 
192  struct doca_buf *buf,
193  union doca_data user_data,
194  struct doca_mmap_advise_task_invalidate_cache **task);
195 
207  struct doca_mmap_advise_task_invalidate_cache *task);
208 
218 void doca_mmap_advise_task_invalidate_cache_set_buf(struct doca_mmap_advise_task_invalidate_cache *task,
219  struct doca_buf *buf);
220 
232  const struct doca_mmap_advise_task_invalidate_cache *task);
233 
234 #ifdef __cplusplus
235 }
236 #endif
237 
240 #endif /* DOCA_MMAP_ADVISE_H_ */
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
enum doca_error doca_error_t
DOCA API return codes.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_task_cache_invalidate_get_max_buf_size(const struct doca_devinfo *devinfo, uint64_t *buf_size)
DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_cap_task_cache_invalidate_is_supported(const struct doca_devinfo *devinfo)
Check if a given device supports submitting a DOCA MMAP advise cache invalidate task.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_destroy(struct doca_mmap_advise *mmap_advise)
Destroy an mmap advise instance.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_task_invalidate_cache_set_conf(struct doca_mmap_advise *mmap_advise, doca_mmap_advise_task_invalidate_cache_completion_cb_t completion_cb, doca_mmap_advise_task_invalidate_cache_completion_cb_t error_cb, uint32_t num_tasks)
Set the DOCA MMAP advise cache invalidate task configuration.
DOCA_EXPERIMENTAL struct doca_ctx * doca_mmap_advise_as_ctx(struct doca_mmap_advise *mmap_advise)
Convert a MMAP advise to a DOCA context.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_advise_create(struct doca_dev *dev, struct doca_mmap_advise **mmap_advise)
Create an mmap advise instance.
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.
Convenience type for representing opaque data.
Definition: doca_types.h:56