23 #ifndef DOCA_PCC_DEV_COMMON_H_
24 #define DOCA_PCC_DEV_COMMON_H_
31 #define DOCA_DPA_DEVICE
44 #define ALWAYS_INLINE __attribute__((always_inline))
49 #define FORCE_INLINE static inline ALWAYS_INLINE
71 #define DOCA_PCC_DEV_GET_PORT_COUNTER_ID(port, type, plane) \
72 (((port & 0xF)) | ((type & 0xF) << 4) | ((plane & 0XF) << 8) | ((1) << 24))
77 #define DOCA_PCC_DEV_MAX_NUM_PORTS (__NV_DPA >= __NV_DPA_CX8 ? 8 : 4)
#define __attribute__(_x_)
To allow compiling functions and structs that are using GCC attributes using attribute() in compilers...
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
DOCA_EXPERIMENTAL ALWAYS_INLINE void doca_pcc_dev_nic_counters_sample(void)
Sample counters according to the prior configuration call.
DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_port_speed(uint32_t portid)
Get speed in Gbps units per a given port.
DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_port_planes(uint32_t portid)
Get number of available planes per a given port.
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.
doca_pcc_dev_nic_port_counter_types_t
NIC counter types.
#define ALWAYS_INLINE
force inline wrapper
DOCA_EXPERIMENTAL void doca_pcc_dev_user_port_info_changed(uint32_t portid) __attribute__((weak))
User callback triggered on a port state change.
doca_pcc_dev_error_t
API functions return status.
DOCA_EXPERIMENTAL uint32_t doca_pcc_dev_get_logical_ports(void)
Get mask of initiated logical ports.
@ DOCA_PCC_DEV_NIC_COUNTER_TYPE_RX_BYTES
@ DOCA_PCC_DEV_NIC_COUNTER_TYPE_TX_BYTES
@ DOCA_PCC_DEV_STATUS_FAIL
uint32_t counter_ids[DOCA_PCC_DEV_MAX_NUM_PORTS]