NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
np_nic_telemetry_dev_main.c File Reference
#include <doca_pcc_np_dev.h>
#include "pcc_common_dev.h"
Include dependency graph for np_nic_telemetry_dev_main.c:

Go to the source code of this file.

Functions

FORCE_INLINE uint32_t count_ports (uint32_t ports_mask)
 Count the number of available logical ports from queried mask. More...
 
void doca_pcc_dev_user_port_info_changed (uint32_t portid)
 User callback triggered on a port state change. More...
 
doca_pcc_dev_error_t doca_pcc_dev_np_user_packet_handler (struct doca_pcc_np_dev_request_packet *in, struct doca_pcc_np_dev_response_packet *out)
 Main user function (implemented by the user) Called by the lib upon receiving a packet. The user: More...
 

Variables

uint32_t counter_ids [DOCA_PCC_DEV_MAX_NUM_PORTS] = {0}
 
uint32_t current_sampled_rx_bytes [DOCA_PCC_DEV_MAX_NUM_PORTS] = {0}
 
uint32_t counters_started = 0
 
uint32_t ports_num = 0
 

Function Documentation

◆ count_ports()

FORCE_INLINE uint32_t count_ports ( uint32_t  ports_mask)

Count the number of available logical ports from queried mask.

Parameters
[in]ports_mask- ports_mask
Returns
- number of available logical ports initiated in mask

Definition at line 45 of file np_nic_telemetry_dev_main.c.

Variable Documentation

◆ counter_ids

uint32_t counter_ids[DOCA_PCC_DEV_MAX_NUM_PORTS] = {0}

< Counters IDs to configure and read from Table of RX bytes counters to sample to

Definition at line 30 of file np_nic_telemetry_dev_main.c.

◆ counters_started

uint32_t counters_started = 0

Number of available and initiated logical ports

Definition at line 34 of file np_nic_telemetry_dev_main.c.

◆ current_sampled_rx_bytes

uint32_t current_sampled_rx_bytes[DOCA_PCC_DEV_MAX_NUM_PORTS] = {0}

Flag to indicate that the counters have been initiated

Definition at line 32 of file np_nic_telemetry_dev_main.c.

◆ ports_num

uint32_t ports_num = 0

Definition at line 36 of file np_nic_telemetry_dev_main.c.