API Reference Manual
1.46.0
|
The odp_tm_query_info_t record type is used to return the various counts as requested by functions like odp_tm_queue_query() and odp_tm_total_query(). More...
#include <traffic_mngr.h>
Data Fields | |
uint64_t | total_pkt_cnt |
The total_pkt_cnt field is the total number of packets currently stored/associated with the requested set of tm_queues. More... | |
uint64_t | max_pkt_cnt |
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it, then this is the max_pkt_cnt set in the profile params. More... | |
uint64_t | total_byte_cnt |
The total_byte_cnt can either be the actual number of bytes used or an approximation of the number of bytes used based upon the number of fixed sized buffers used multiplied by the buffer size. More... | |
uint64_t | max_byte_cnt |
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it, then this is the max_byte_cnt set in the profile params. More... | |
odp_bool_t | total_pkt_cnt_valid |
The following boolean values indicate which of the counts above are valid. More... | |
odp_bool_t | max_pkt_cnt_valid |
TRUE if max_pkt_cnt is valid. | |
odp_bool_t | total_byte_cnt_valid |
TRUE if total_byte_cnt is valid. | |
odp_bool_t | max_byte_cnt_valid |
TRUE if max_byte_cnt is valid. | |
odp_bool_t | approx_byte_cnt |
The approx_byte_cnt is TRUE if the total_byte_cnt field is valid AND if the buffer counting method is used. | |
The odp_tm_query_info_t record type is used to return the various counts as requested by functions like odp_tm_queue_query() and odp_tm_total_query().
Definition at line 2202 of file api/spec/traffic_mngr.h.
uint64_t odp_tm_query_info_t::total_pkt_cnt |
The total_pkt_cnt field is the total number of packets currently stored/associated with the requested set of tm_queues.
Note that because the packet queues are potentially being manipulated by multiple cpu's, the values here are only accurate when the tm system is "stopped" (i.e. the egress spigot is stopped and no odp_tm_enq calls are taking place). Implementations are free to batch update these counters - up to a dozen or so packets.
Definition at line 2210 of file api/spec/traffic_mngr.h.
uint64_t odp_tm_query_info_t::max_pkt_cnt |
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it, then this is the max_pkt_cnt set in the profile params.
Returning this field is a convenience to the ODP programmer, enabling them to quickly see how the total_pkt_cnt compares to the maximum packet count threshold. Note that there is no requirement that total_pkt_cnt be <= max_pkt_cnt.
Definition at line 2218 of file api/spec/traffic_mngr.h.
uint64_t odp_tm_query_info_t::total_byte_cnt |
The total_byte_cnt can either be the actual number of bytes used or an approximation of the number of bytes used based upon the number of fixed sized buffers used multiplied by the buffer size.
In both cases the total_byte_cnt should correspond to the same set of packets that were counted above. For instance, if the total_pkt_cnt is updated in a batch, then the total_byte_cnt should also be updated in the same batch. The approx_byte_cnt field below indicates whether the total_byte_cnt is buffer count based or not. In the case that the number of bytes used by a packet is rounded up to a 2, 4, 8, or 16 byte boundary, it is recommended that approx_byte_cnt be false. It is implementation dependent whether the byte count of a packet includes the CRC, but it is recommended that it not include headroom, preamble or IPG. Of course when the buffer counting method is used, it is expected that any headroom in the first buffer is implicitly included. Finally in the case of variable length pkt based buffering, instead of taking the total_pkt_cnt and multiplying it by the maximum ethernet packet size, it is recommended that byte_cnt_valid be FALSE - even when query_flags includes ODP_TM_QUERY_BYTE_CNT.
Definition at line 2239 of file api/spec/traffic_mngr.h.
uint64_t odp_tm_query_info_t::max_byte_cnt |
If the requested set of tm_queues has an odp_tm_threshold_t profile associated with it, then this is the max_byte_cnt set in the profile params.
Returning this field is a convenience to the ODP programmer, enabling them to quickly see how the total_byte_cnt compares to the maximum byte count threshold. Note that there is no requirement that total_byte_cnt be <= max_byte_cnt.
Definition at line 2247 of file api/spec/traffic_mngr.h.
odp_bool_t odp_tm_query_info_t::total_pkt_cnt_valid |
The following boolean values indicate which of the counts above are valid.
Invalid count values must be 0. TRUE if total_pkt_cnt is valid
Definition at line 2251 of file api/spec/traffic_mngr.h.