21 #ifndef DOCA_PCC_DEV_EVENT_H_
22 #define DOCA_PCC_DEV_EVENT_H_
43 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->
ev_attr));
58 return __builtin_bswap32(event->
flow_tag);
71 return __builtin_bswap32(event->
sn);
84 return __builtin_bswap32(event->
timestamp);
96 #if __NV_DPA == __NV_DPA_BF3
98 #elif __NV_DPA >= __NV_DPA_CX8
99 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->ev_dword2));
101 return ((doca_pcc_dev_event_general_dword2_t *)(&
value))->ttl_hoplimit;
114 #if __NV_DPA == __NV_DPA_BF3
118 #elif __NV_DPA >= __NV_DPA_CX8
119 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->
ev_dword2));
121 return ((doca_pcc_dev_event_general_dword2_t *)(&
value))->flow_qpn;
205 #if __NV_DPA == __NV_DPA_BF3
207 #elif __NV_DPA >= __NV_DPA_CX8
222 #if __NV_DPA == __NV_DPA_BF3
224 #elif __NV_DPA >= __NV_DPA_CX8
239 #if __NV_DPA == __NV_DPA_BF3
241 #elif __NV_DPA >= __NV_DPA_CX8
262 return event->ev_spec_attr.reserved_at_0;
286 #if __NV_DPA == __NV_DPA_BF3
288 #elif __NV_DPA >= __NV_DPA_CX8
289 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->ev_spec_attr.rtt_tstamp.data3));
291 return ((doca_pcc_dev_rtt_spec_data3_t *)(&
value))->np_rx_port_counter;
304 #if __NV_DPA == __NV_DPA_BF3
306 #elif __NV_DPA >= __NV_DPA_CX8
307 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->ev_spec_attr.rtt_tstamp.data3));
309 return ((doca_pcc_dev_rtt_spec_data3_t *)(&
value))->version;
322 #if __NV_DPA == __NV_DPA_BF3
324 #elif __NV_DPA >= __NV_DPA_CX8
325 uint32_t
value = __builtin_bswap32(*(uint32_t *)(&event->ev_spec_attr.rtt_tstamp.data1));
327 return ((doca_pcc_dev_rtt_spec_data1_t *)(&
value))->port_type;
#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.
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
#define FORCE_INLINE
static inline wrapper
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_roce_ack_first_sn(doca_pcc_dev_event_t *event)
For ACK/NACK/CNP events, first coalesced event serial number.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_req_recv_timestamp(doca_pcc_dev_event_t *event)
For RTT events only, the time when RTT request is received.
DOCA_EXPERIMENTAL FORCE_INLINE size_t doca_pcc_dev_get_rtt_raw_data_size(doca_pcc_dev_event_t *event)
Returns the user defined event data size in bytes.
DOCA_STABLE FORCE_INLINE doca_pcc_dev_roce_tx_cntrs_t doca_pcc_dev_get_roce_tx_cntrs(doca_pcc_dev_event_t *event)
For TX events only, counters including byte count and packet count.
FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_resp_port_type(__attribute__((unused)) doca_pcc_dev_event_t *event)
For rtt event, port type: 0 - 25G, 1 - 40G, 2 - 50G, 3 - 100G, 4 - 200G, 5 - 400G,...
FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_np_rx_byte_counter(__attribute__((unused)) doca_pcc_dev_event_t *event)
For rtt event, np port rx byte counter in units of 256 bytes.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_sn(doca_pcc_dev_event_t *event)
For all events, serial number of this event.
FORCE_INLINE uint32_t doca_pcc_dev_get_flow_qpn(doca_pcc_dev_event_t *event)
For all events, return flow qpn (CX8+ all events, BF3 tx event only)
DOCA_EXPERIMENTAL FORCE_INLINE unsigned char * doca_pcc_dev_get_rtt_raw_data(doca_pcc_dev_event_t *event)
Returns the user defined event data.
DOCA_STABLE FORCE_INLINE doca_pcc_dev_ack_nack_cnp_extra_t doca_pcc_dev_get_ack_nack_cnp_extra(doca_pcc_dev_event_t *event)
For ACK/NACK/CNP events, extra information including number of coalesced events.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_roce_first_timestamp(doca_pcc_dev_event_t *event)
For TX/ACK/NACK/CNP events, first coalesced event timestamp.
FORCE_INLINE uint32_t doca_pcc_dev_get_ttl_hoplimit(__attribute__((unused)) doca_pcc_dev_event_t *event)
For all events, TTL (for IPv4) or HopLimit (for IPv6) header’s field in received packet.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_req_send_timestamp(doca_pcc_dev_event_t *event)
For RTT events only, the time when RTT request is sent.
DOCA_STABLE FORCE_INLINE doca_pcc_dev_event_general_attr_t doca_pcc_dev_get_ev_attr(doca_pcc_dev_event_t *event)
For all events, return structure with general information such as event type, subtype,...
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_resp_send_timestamp(doca_pcc_dev_event_t *event)
For RTT events only, the time when RTT response is sent.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_timestamp(doca_pcc_dev_event_t *event)
For all events, timestamp of this event.
FORCE_INLINE uint32_t doca_pcc_dev_get_rtt_resp_version(__attribute__((unused)) doca_pcc_dev_event_t *event)
For rtt event, rtt version.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_flowtag(doca_pcc_dev_event_t *event)
For all events, flow tag to indicate different flows.
DOCA_STABLE FORCE_INLINE uint32_t doca_pcc_dev_get_fw_settings(doca_pcc_dev_event_t *event, int n)
For FW events only, three DWORDs of FW data.
struct mlnx_cc_ack_nack_cnp_extra_t extra
struct mlnx_cc_event_general_dword2_t ev_dword2
struct mlnx_cc_event_general_attr_t ev_attr
union mlnx_cc_event_spec_attr_t ev_spec_attr
struct mlnx_cc_roce_tx_cntrs_t cntrs
struct mlnx_cc_roce_tx_extra_t extra
struct mlnx_cc_rtt_spec_data0_t data0
uint32_t req_send_timestamp
uint32_t resp_send_timestamp
uint32_t req_recv_timestamp
struct mlnx_cc_rtt_spec_data1_t data1
struct mlnx_cc_rtt_spec_data2_t data2
struct mlnx_cc_fw_data_t fw_data
struct mlnx_cc_roce_tx_t roce_tx
struct mlnx_cc_ack_nack_cnp_t ack_nack_cnp
struct mlnx_cc_rtt_tstamp_t rtt_tstamp