NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_ctx.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <doca_error.h>
#include <doca_types.h>
Include dependency graph for doca_ctx.h:

Go to the source code of this file.

Typedefs

typedef void(* doca_ctx_state_changed_callback_t) (const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
 Function to execute on context state change. More...
 

Enumerations

enum  doca_ctx_states { DOCA_CTX_STATE_IDLE = 0 , DOCA_CTX_STATE_STARTING = 1 , DOCA_CTX_STATE_RUNNING = 2 , DOCA_CTX_STATE_STOPPING = 3 }
 This enum defines the states of a context. More...
 

Functions

DOCA_STABLE doca_error_t doca_ctx_start (struct doca_ctx *ctx)
 Finalizes all configurations, and starts the DOCA CTX. More...
 
DOCA_STABLE doca_error_t doca_ctx_stop (struct doca_ctx *ctx)
 Stops the context allowing reconfiguration. More...
 
DOCA_STABLE doca_error_t doca_ctx_get_num_inflight_tasks (const struct doca_ctx *ctx, size_t *num_inflight_tasks)
 Get number of in flight tasks in a doca context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ctx_set_datapath_on_gpu (struct doca_ctx *ctx, struct doca_gpu *gpu_dev)
 This function binds the DOCA context to a gpu device. More...
 
DOCA_STABLE doca_error_t doca_ctx_set_user_data (struct doca_ctx *ctx, union doca_data user_data)
 set user data to context More...
 
DOCA_STABLE doca_error_t doca_ctx_get_user_data (const struct doca_ctx *ctx, union doca_data *user_data)
 get user data from context More...
 
DOCA_STABLE doca_error_t doca_ctx_set_state_changed_cb (struct doca_ctx *ctx, doca_ctx_state_changed_callback_t cb)
 Set state changed callback. More...
 
DOCA_STABLE doca_error_t doca_ctx_get_state (const struct doca_ctx *ctx, enum doca_ctx_states *state)
 Get context state. More...
 
DOCA_EXPERIMENTAL void doca_ctx_flush_tasks (struct doca_ctx *ctx)
 Flushes tasks that were not flushed during submit. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ctx_set_datapath_on_dpa (struct doca_ctx *ctx, struct doca_dpa *dpa_dev)
 This function binds the DOCA context to a dpa device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ctx_set_completion_vector (struct doca_ctx *ctx, uint32_t comp_vector)
 Set context completion vector. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_ctx_cap_get_num_completion_vectors (const struct doca_devinfo *devinfo, uint32_t *num_comp_vectors)
 Get number of completion vectors. More...