NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
comch_ctrl_path_common.c File Reference
#include <string.h>
#include <time.h>
#include <doca_argp.h>
#include <doca_comch.h>
#include <doca_ctx.h>
#include <doca_dev.h>
#include <doca_error.h>
#include <doca_log.h>
#include <doca_pe.h>
#include "comch_ctrl_path_common.h"
#include "common.h"
Include dependency graph for comch_ctrl_path_common.c:

Go to the source code of this file.

Macros

#define CC_REC_QUEUE_SIZE   10 /* Maximum amount of message in queue */
 
#define CC_SEND_TASK_NUM   1024 /* Number of CC send tasks */
 

Functions

 DOCA_LOG_REGISTER (COMCH_CTRL_PATH_COMMON)
 
static doca_error_t pci_addr_callback (void *param, void *config)
 
static doca_error_t rep_pci_addr_callback (void *param, void *config)
 
static doca_error_t text_callback (void *param, void *config)
 
doca_error_t register_comch_params (void)
 
void clean_comch_ctrl_path_client (struct doca_comch_client *client, struct doca_pe *pe)
 
doca_error_t init_comch_ctrl_path_client (const char *server_name, struct doca_dev *hw_dev, struct comch_ctrl_path_client_cb_config *cb_cfg, struct doca_comch_client **client, struct doca_pe **pe)
 
void clean_comch_ctrl_path_server (struct doca_comch_server *server, struct doca_pe *pe)
 
doca_error_t init_comch_ctrl_path_server (const char *server_name, struct doca_dev *hw_dev, struct doca_dev_rep *rep_dev, struct comch_ctrl_path_server_cb_config *cb_cfg, struct doca_comch_server **server, struct doca_pe **pe)
 

Macro Definition Documentation

◆ CC_REC_QUEUE_SIZE

#define CC_REC_QUEUE_SIZE   10 /* Maximum amount of message in queue */

Definition at line 42 of file comch_ctrl_path_common.c.

◆ CC_SEND_TASK_NUM

#define CC_SEND_TASK_NUM   1024 /* Number of CC send tasks */

Definition at line 43 of file comch_ctrl_path_common.c.

Function Documentation

◆ clean_comch_ctrl_path_client()

void clean_comch_ctrl_path_client ( struct doca_comch_client *  client,
struct doca_pe *  pe 
)

Clean client and its PE

@client [in]: Client object to clean @pe [in]: Client PE object to clean

Definition at line 190 of file comch_ctrl_path_common.c.

◆ clean_comch_ctrl_path_server()

void clean_comch_ctrl_path_server ( struct doca_comch_server *  server,
struct doca_pe *  pe 
)

Clean server and its PE

@server [in]: Server object to clean @pe [in]: Server PE object to clean

Definition at line 315 of file comch_ctrl_path_common.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( COMCH_CTRL_PATH_COMMON  )

◆ init_comch_ctrl_path_client()

doca_error_t init_comch_ctrl_path_client ( const char *  server_name,
struct doca_dev *  hw_dev,
struct comch_ctrl_path_client_cb_config cb_cfg,
struct doca_comch_client **  client,
struct doca_pe **  pe 
)

Initialize a cc client and its PE

@server_name [in]: Server name to connect to @hw_dev [in]: Device to use @cb_cfg [in]: Client callback configuration @client [out]: Client object struct to initialize @pe [out]: Client PE object struct to initialize

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 207 of file comch_ctrl_path_common.c.

◆ init_comch_ctrl_path_server()

doca_error_t init_comch_ctrl_path_server ( const char *  server_name,
struct doca_dev *  hw_dev,
struct doca_dev_rep *  rep_dev,
struct comch_ctrl_path_server_cb_config cb_cfg,
struct doca_comch_server **  server,
struct doca_pe **  pe 
)

Initialize a cc server and its PE

@server_name [in]: Server name to connect to @hw_dev [in]: Device to use @rep_dev [in]: Representor device to use @cb_cfg [in]: Server callback configuration @server [out]: Server object struct to initialize @pe [out]: Server PE object struct to initialize

Returns
: DOCA_SUCCESS on success and DOCA_ERROR otherwise

Definition at line 332 of file comch_ctrl_path_common.c.

◆ pci_addr_callback()

static doca_error_t pci_addr_callback ( void *  param,
void *  config 
)
static

Argument parsing section

Definition at line 56 of file comch_ctrl_path_common.c.

◆ register_comch_params()

doca_error_t register_comch_params ( void  )

Definition at line 129 of file comch_ctrl_path_common.c.

◆ rep_pci_addr_callback()

static doca_error_t rep_pci_addr_callback ( void *  param,
void *  config 
)
static

Definition at line 83 of file comch_ctrl_path_common.c.

◆ text_callback()

static doca_error_t text_callback ( void *  param,
void *  config 
)
static

Definition at line 110 of file comch_ctrl_path_common.c.