| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Macros | |
| #define | DOCA_DPA_DEVICE |
| declares that we are compiling for the DPA Device More... | |
| #define | ALWAYS_INLINE __attribute__((always_inline)) |
| force inline wrapper More... | |
| #define | FORCE_INLINE static inline ALWAYS_INLINE |
| static inline wrapper More... | |
| #define | DOCA_PCC_DEV_GET_PORT_COUNTER_ID(port, type, plane) (((port & 0xF)) | ((type & 0xF) << 4) | ((plane & 0XF) << 8) | ((1) << 24)) |
| Generates a unique ID using the logical port number, counter type, and plane parameters for identifying specific port counters. More... | |
| #define | DOCA_PCC_DEV_MAX_NUM_PORTS (__NV_DPA >= __NV_DPA_CX8 ? 8 : 4) |
| Max number of NIC ports supported by the lib. More... | |
Enumerations | |
| enum | doca_pcc_dev_error_t { DOCA_PCC_DEV_STATUS_OK = 0 , DOCA_PCC_DEV_STATUS_FAIL = 1 } |
| API functions return status. More... | |
| enum | doca_pcc_dev_nic_port_counter_types_t { DOCA_PCC_DEV_NIC_COUNTER_TYPE_RX_BYTES = 0x1 , DOCA_PCC_DEV_NIC_COUNTER_TYPE_TX_BYTES = 0x2 } |
| NIC counter types. More... | |
Functions | |
| DOCA_EXPERIMENTAL void | doca_pcc_dev_nic_counters_config (uint32_t *counter_ids, uint32_t num_counters, uint32_t *values) |
| Prepare a list of counters to read. More... | |
| DOCA_EXPERIMENTAL ALWAYS_INLINE void | doca_pcc_dev_nic_counters_sample (void) |
| Sample counters according to the prior configuration call. More... | |
| DOCA_EXPERIMENTAL uint32_t | doca_pcc_dev_get_logical_ports (void) |
| Get mask of initiated logical ports. More... | |
| DOCA_EXPERIMENTAL uint32_t | doca_pcc_dev_get_port_planes (uint32_t portid) |
| Get number of available planes per a given port. More... | |
| DOCA_EXPERIMENTAL uint32_t | doca_pcc_dev_get_port_speed (uint32_t portid) |
| Get speed in Gbps units per a given port. More... | |
| DOCA_EXPERIMENTAL void | doca_pcc_dev_user_port_info_changed (uint32_t portid) __attribute__((weak)) |
| User callback triggered on a port state change. More... | |
DOCA PCC Device library. For more details please refer to the user guide on DOCA devzone.
| #define ALWAYS_INLINE __attribute__((always_inline)) |
force inline wrapper
Definition at line 44 of file doca_pcc_dev_common.h.
| #define DOCA_DPA_DEVICE |
declares that we are compiling for the DPA Device
Definition at line 31 of file doca_pcc_dev_common.h.
| #define DOCA_PCC_DEV_GET_PORT_COUNTER_ID | ( | port, | |
| type, | |||
| plane | |||
| ) | (((port & 0xF)) | ((type & 0xF) << 4) | ((plane & 0XF) << 8) | ((1) << 24)) |
Generates a unique ID using the logical port number, counter type, and plane parameters for identifying specific port counters.
Definition at line 71 of file doca_pcc_dev_common.h.
| #define DOCA_PCC_DEV_MAX_NUM_PORTS (__NV_DPA >= __NV_DPA_CX8 ? 8 : 4) |
Max number of NIC ports supported by the lib.
Definition at line 77 of file doca_pcc_dev_common.h.
| #define FORCE_INLINE static inline ALWAYS_INLINE |
static inline wrapper
Definition at line 49 of file doca_pcc_dev_common.h.
| enum doca_pcc_dev_error_t |
API functions return status.
| Enumerator | |
|---|---|
| DOCA_PCC_DEV_STATUS_OK | completed successfully |
| DOCA_PCC_DEV_STATUS_FAIL | Failed |
Definition at line 54 of file doca_pcc_dev_common.h.
NIC counter types.
| Enumerator | |
|---|---|
| DOCA_PCC_DEV_NIC_COUNTER_TYPE_RX_BYTES | RX bytes NIC counter type |
| DOCA_PCC_DEV_NIC_COUNTER_TYPE_TX_BYTES | TX bytes NIC counter type |
Definition at line 62 of file doca_pcc_dev_common.h.
| DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_logical_ports | ( | void | ) |
Get mask of initiated logical ports.
| DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_port_planes | ( | uint32_t | portid | ) |
Get number of available planes per a given port.
| [in] | portid | - port number |
| DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_port_speed | ( | uint32_t | portid | ) |
Get speed in Gbps units per a given port.
| [in] | portid | - port number |
| DOCA_EXPERIMENTAL void doca_pcc_dev_nic_counters_config | ( | uint32_t * | counter_ids, |
| uint32_t | num_counters, | ||
| uint32_t * | values | ||
| ) |
Prepare a list of counters to read.
The list is stored in kernel memory. A single counters config per process is supported.
| [in] | counter_ids | - An array of counter ids. |
| [in] | num_counters | - number of counters in the counter_ids array |
| [out] | values | - buffer to store counters values (32b) read by doca_pcc_dev_nic_counters_sample() |
| DOCA_EXPERIMENTAL ALWAYS_INLINE void doca_pcc_dev_nic_counters_sample | ( | void | ) |
Sample counters according to the prior configuration call.
Sample counter_ids, num_counters and values buffer provided in the last successful call to doca_pcc_dev_nic_counters_config(). This call ensures fastest sampling on a pre-checked counter ids and buffers.
| DOCA_EXPERIMENTAL void doca_pcc_dev_user_port_info_changed | ( | uint32_t | portid | ) |
User callback triggered on a port state change.
The user may implement this function to initiate port related operations, E.G counter sampling, or parameters changes
| [in] | portid | - changed port id |
Definition at line 57 of file np_nic_telemetry_dev_main.c.