NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA PCC Device Services
Collaboration diagram for DOCA PCC Device Services:

Macros

#define DOCA_DPA_DEVICE
 declares that we are compiling for the DPA Device More...
 

Functions

DOCA_EXPERIMENTAL doca_pcc_dev_error_t doca_pcc_dev_user_mailbox_handle (void *request, uint32_t request_size, uint32_t max_response_size, void *response, uint32_t *response_size) __attribute__((weak))
 User callback to process a request from host to device. More...
 
DOCA_STABLE void doca_pcc_dev_printf (const char *format,...) __attribute__((format(printf
 Print to Host. More...
 
DOCA_STABLE void DOCA_STABLE void doca_pcc_dev_trace_5 (int format_id, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5)
 Creates trace message entry with 5 arguments. More...
 
DOCA_STABLE void doca_pcc_dev_trace_flush (void)
 Flush the trace message buffer to Host. More...
 
DOCA_EXPERIMENTAL unsigned int doca_pcc_dev_thread_rank (void)
 Obtains the thread rank. More...
 

Detailed Description

DOCA PCC Device library. For more details please refer to the user guide on DOCA devzone.

Macro Definition Documentation

◆ DOCA_DPA_DEVICE

#define DOCA_DPA_DEVICE

declares that we are compiling for the DPA Device

Note
Must be defined before the first API use/include of DOCA

Definition at line 31 of file doca_pcc_dev_services.h.

Function Documentation

◆ doca_pcc_dev_printf()

DOCA_STABLE void doca_pcc_dev_printf ( const char *  format,
  ... 
)

Print to Host.

This function prints from device to host's standard output stream. Multiple threads may call this routine simultaneously. Printing is a convenience service, and due to limited buffering on the host, not all print statements may appear on the host

Parameters
[in]format- Format string that contains the text to be written to stdout (same as from regular printf)

◆ doca_pcc_dev_thread_rank()

DOCA_EXPERIMENTAL unsigned int doca_pcc_dev_thread_rank ( void  )

Obtains the thread rank.

Retrieves the thread rank from the group of threads that run PCC. The function returns a number in {0..N-1}, where N is the number of threads requested to run PCC

Returns
Returns the thread rank.

◆ doca_pcc_dev_trace_5()

DOCA_STABLE void DOCA_STABLE void doca_pcc_dev_trace_5 ( int  format_id,
uint64_t  arg1,
uint64_t  arg2,
uint64_t  arg3,
uint64_t  arg4,
uint64_t  arg5 
)

Creates trace message entry with 5 arguments.

Parameters
[in]format_id-the template format id to print message accordingly
[in]arg1- argument #1 to format into the template
[in]arg2- argument #2 to format into the template
[in]arg3- argument #3 to format into the template
[in]arg4- argument #4 to format into the template
[in]arg5- argument #5 to format into the template

◆ doca_pcc_dev_trace_flush()

DOCA_STABLE void doca_pcc_dev_trace_flush ( void  )

Flush the trace message buffer to Host.

As soon as a buffer is fully occupied it is internally sent to host, however user can ask partially occupied buffer to be sent to host. Its intended use is at end of run to flush whatever messages left.

Note
: Frequent call to this API might cause performance issues.

◆ doca_pcc_dev_user_mailbox_handle()

DOCA_EXPERIMENTAL doca_pcc_dev_error_t doca_pcc_dev_user_mailbox_handle ( void *  request,
uint32_t  request_size,
uint32_t  max_response_size,
void *  response,
uint32_t *  response_size 
)

User callback to process a request from host to device.

This function is called when the host calls doca_pcc_mailbox_send(). The mailbox format is defined by the user.

Note
: Implementation of this function is optional.
Parameters
[in]request- a buffer storing the request. This buffer is filled by the host side
[in]request_size- request buffer size
[in]max_response_size- max response buffer size set on host side
[out]response- a buffer storing the response. This buffer is filled by the device side
[out]response_size- response size
Returns
-
See also
doca_pcc_dev_error_t

Definition at line 283 of file np_switch_telemetry_dev_main.c.