NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
comch_data_path_high_speed_common.h File Reference
#include <doca_buf_inventory.h>
#include <doca_comch.h>
#include <doca_comch_consumer.h>
#include <doca_comch_producer.h>
#include <doca_dev.h>
#include <doca_error.h>
#include <doca_mmap.h>
#include <doca_pe.h>
Include dependency graph for comch_data_path_high_speed_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  local_mem_bufs
 
struct  comch_producer_cb_config
 
struct  comch_consumer_cb_config
 
struct  comch_data_path_objects
 

Macros

#define CC_DATA_PATH_TASK_NUM   2 /* Maximum amount of CC consumer and producer task number */
 
#define CC_DATA_PATH_MAX_MSG_SIZE   (1024 * 1024) /* CC DATA PATH maximum message size */
 
#define STR_START_DATA_PATH_TEST   "start_data_path_test" /* The negotiation message between client and server */
 
#define STR_STOP_DATA_PATH_TEST   "stop_data_path_test" /* The negotiation message between client and server */
 
#define INVALID_CONSUMER_ID   0xffff
 

Functions

void clean_local_mem_bufs (struct local_mem_bufs *local)
 
doca_error_t init_local_mem_bufs (struct local_mem_bufs *local, struct doca_dev *dev, size_t buf_len, size_t max_bufs)
 
void clean_comch_producer (struct doca_comch_producer *producer, struct doca_pe *pe)
 
doca_error_t init_comch_producer (struct doca_comch_connection *connection, struct comch_producer_cb_config *cb_cfg, struct doca_comch_producer **producer, struct doca_pe **pe)
 
void clean_comch_consumer (struct doca_comch_consumer *consumer, struct doca_pe *pe)
 
doca_error_t init_comch_consumer (struct doca_comch_connection *connection, struct doca_mmap *user_mmap, struct comch_consumer_cb_config *cb_cfg, struct doca_comch_consumer **consumer, struct doca_pe **pe)
 
doca_error_t comch_data_path_send_msg (struct comch_data_path_objects *data_path)
 
doca_error_t comch_data_path_recv_msg (struct comch_data_path_objects *data_path)
 

Macro Definition Documentation

◆ CC_DATA_PATH_MAX_MSG_SIZE

#define CC_DATA_PATH_MAX_MSG_SIZE   (1024 * 1024) /* CC DATA PATH maximum message size */

Definition at line 39 of file comch_data_path_high_speed_common.h.

◆ CC_DATA_PATH_TASK_NUM

#define CC_DATA_PATH_TASK_NUM   2 /* Maximum amount of CC consumer and producer task number */

Definition at line 38 of file comch_data_path_high_speed_common.h.

◆ INVALID_CONSUMER_ID

#define INVALID_CONSUMER_ID   0xffff

Definition at line 44 of file comch_data_path_high_speed_common.h.

◆ STR_START_DATA_PATH_TEST

#define STR_START_DATA_PATH_TEST   "start_data_path_test" /* The negotiation message between client and server */

Definition at line 41 of file comch_data_path_high_speed_common.h.

◆ STR_STOP_DATA_PATH_TEST

#define STR_STOP_DATA_PATH_TEST   "stop_data_path_test" /* The negotiation message between client and server */

Definition at line 42 of file comch_data_path_high_speed_common.h.

Function Documentation

◆ clean_comch_consumer()

void clean_comch_consumer ( struct doca_comch_consumer *  consumer,
struct doca_pe *  pe 
)

Clean consumer and its PE

@consumer [in]: Consumer object to clean @pe [in]: Consumer PE object to clean

Definition at line 234 of file comch_data_path_high_speed_common.c.

◆ clean_comch_producer()

void clean_comch_producer ( struct doca_comch_producer *  producer,
struct doca_pe *  pe 
)

Clean producer and its PE

@producer [in]: Producer object to clean @pe [in]: Producer PE object to clean

Definition at line 149 of file comch_data_path_high_speed_common.c.

◆ clean_local_mem_bufs()

void clean_local_mem_bufs ( struct local_mem_bufs local)

Clean a local memory object

@local [in]: The local memory object to clean

Definition at line 44 of file comch_data_path_high_speed_common.c.

◆ comch_data_path_recv_msg()

doca_error_t comch_data_path_recv_msg ( struct comch_data_path_objects data_path)

Use cc high speed data path to recv a msg

@data_path [in]: CC data path resources

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 709 of file comch_data_path_high_speed_common.c.

◆ comch_data_path_send_msg()

doca_error_t comch_data_path_send_msg ( struct comch_data_path_objects data_path)

Use cc high speed data path to send a msg

@data_path [in]: CC data path resources

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 650 of file comch_data_path_high_speed_common.c.

◆ init_comch_consumer()

doca_error_t init_comch_consumer ( struct doca_comch_connection *  connection,
struct doca_mmap *  user_mmap,
struct comch_consumer_cb_config cb_cfg,
struct doca_comch_consumer **  consumer,
struct doca_pe **  pe 
)

Initialize a cc producer and its PE

@connection [in]: CC connection the consumer is built on @user_mmap [in]: The local memory mmap required by consumer @cb_cfg [in]: Consumer callback configuration @consumer [out]: Consumer objects struct to initialize @pe [out]: Consumer PE objects struct to initialize

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 252 of file comch_data_path_high_speed_common.c.

◆ init_comch_producer()

doca_error_t init_comch_producer ( struct doca_comch_connection *  connection,
struct comch_producer_cb_config cb_cfg,
struct doca_comch_producer **  producer,
struct doca_pe **  pe 
)

Initialize a cc producer and its PE

@connection [in]: CC connection the producer is built on @cb_cfg [in]: Producer callback configuration @producer [out]: Producer objects struct to initialize @pe [out]: Producer PE objects struct to initialize

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 166 of file comch_data_path_high_speed_common.c.

◆ init_local_mem_bufs()

doca_error_t init_local_mem_bufs ( struct local_mem_bufs local,
struct doca_dev *  dev,
size_t  buf_len,
size_t  max_bufs 
)

Initialize a local memory mmap

@local [in]: Local_memory object to initialize @dev [in]: Device to add for this memory mmap @buf_len [in]: Length of each DOCA buf @max_bufs [in]: Number of DOCA buf

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 78 of file comch_data_path_high_speed_common.c.