Flow specific packet statistics.
◆ odp_proto_stats_counters_t
ODP proto stats counters.
Statistics that can be enabled in proto stats object. For Tx stats counters, Pktout config odp_pktout_config_opt_t::bit::proto_stats_ena
needs to be enabled.
Tx packet and octet sent/drop statistics might include packets sent/dropped via Traffic Manager or Tx packet Aging or due to any other Tx errors. It is implementation specific as to what all Tx sent/drop events are accounted for.
◆ odp_proto_stats_param_init()
Initialize proto stats parameters.
Initialize an odp_proto_stats_param_t to its default values. By default all the statistics are disabled.
- Parameters
-
param | Proto stats parameter pointer. |
◆ odp_proto_stats_capability()
Get proto stats capability.
Get supported protocol statistics and metadata for a PKTIO.
- Parameters
-
| pktio | Packet IO handle |
[out] | capa | Pointer where capabilities are updated |
- Return values
-
- Examples
- odp_sysinfo.c.
◆ odp_proto_stats_create()
Create a proto stats object.
Create a proto stats object with given name and parameters. A proto stats object can be created with any set of statistics but only the statistics that are supported by a PKTIO are updated in a proto stats object for that PKTIO associated packets. Same proto stats object can be used with any PKTIO.
- Parameters
-
name | Object name. Maximum string length is ODP_PROTO_STATS_NAME_LEN, including the null character. |
param | Proto stats parameters |
- Returns
- Proto stats object handle
- Return values
-
ODP_PROTO_STATS_INVALID | on failure |
◆ odp_proto_stats_lookup()
Lookup a proto stats object by name.
Lookup an already created proto stats object by name.
- Parameters
-
name | Proto stats object name |
- Returns
- Proto stats object handle
- Return values
-
ODP_PROTO_STATS_INVALID | on failure |
◆ odp_proto_stats_destroy()
Destroy a proto stats object.
Destroy a proto stats object already created.
Before destroying proto stats object having tx statistics enabled, for all PKTIO devices to which packets were Tx'ed earlier with this proto stats object, odp_pktio_stop() must be called. Additionally, existing packets that refer to the proto stats object being destroyed must not be sent at the same time as or after the proto stats object destruction.
- Parameters
-
- Return values
-
◆ odp_proto_stats()
Get all proto stats counters.
Get current values of all counters of the proto stats object. The values of counters that are not enabled in the proto stats object are undefined.
- Parameters
-
| stat | Proto stats object handle |
[out] | data | Pointer to a caller allocated structure where the statistics will be written to. |
- Return values
-
=0 | on success |
<0 | on failure |
◆ odp_proto_stats_print()
Print proto stats object info to ODP log.
Print implementation-defined proto stats debug information to ODP log.
- Parameters
-
stat | Proto stats object handle |