API Reference Manual 1.51.0
Loading...
Searching...
No Matches
spec/packet_io_stats.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2015-2018 Linaro Limited
3 * Copyright (c) 2021-2022 Nokia
4 */
5
12#ifndef ODP_API_SPEC_PACKET_IO_STATS_H_
13#define ODP_API_SPEC_PACKET_IO_STATS_H_
14#include <odp/visibility_begin.h>
15
16#include <odp/api/queue_types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
40typedef struct odp_pktio_stats_t {
43 uint64_t in_octets;
44
46 uint64_t in_packets;
47
50 uint64_t in_ucast_pkts;
51
54 uint64_t in_mcast_pkts;
55
58 uint64_t in_bcast_pkts;
59
62 uint64_t in_discards;
63
66 uint64_t in_errors;
67
70 uint64_t out_octets;
71
73 uint64_t out_packets;
74
78
82
86
89 uint64_t out_discards;
90
92 uint64_t out_errors;
94
103 uint64_t octets;
104
106 uint64_t packets;
107
109 uint64_t discards;
110
112 uint64_t errors;
113
115
124 uint64_t octets;
125
127 uint64_t packets;
128
130 uint64_t discards;
131
133 uint64_t errors;
134
136
142 struct {
144 union {
146 struct {
148 uint64_t in_octets : 1;
149
151 uint64_t in_packets : 1;
152
154 uint64_t in_ucast_pkts : 1;
155
157 uint64_t in_mcast_pkts : 1;
158
160 uint64_t in_bcast_pkts : 1;
161
163 uint64_t in_discards : 1;
164
166 uint64_t in_errors : 1;
167
169 uint64_t out_octets : 1;
170
172 uint64_t out_packets : 1;
173
175 uint64_t out_ucast_pkts : 1;
176
178 uint64_t out_mcast_pkts : 1;
179
181 uint64_t out_bcast_pkts : 1;
182
184 uint64_t out_discards : 1;
185
187 uint64_t out_errors : 1;
189
194 uint64_t all_counters;
195 };
197
199 struct {
201 union {
203 struct {
205 uint64_t octets : 1;
206
208 uint64_t packets : 1;
209
211 uint64_t discards : 1;
212
214 uint64_t errors : 1;
216
221 uint64_t all_counters;
222 };
224
226 struct {
228 union {
230 struct {
232 uint64_t octets : 1;
233
235 uint64_t packets : 1;
236
238 uint64_t discards : 1;
239
241 uint64_t errors : 1;
243
248 uint64_t all_counters;
249 };
251
253
262
275
290
307
322
339
353
376 odp_pktio_extra_stat_info_t info[], int num);
377
398int odp_pktio_extra_stats(odp_pktio_t pktio, uint64_t stats[], int num);
399
415 uint64_t *stat);
416
425
430#ifdef __cplusplus
431}
432#endif
433
434#include <odp/visibility_end.h>
435#endif
ODP queue.
int odp_pktin_queue_stats(odp_pktin_queue_t queue, odp_pktin_queue_stats_t *stats)
Get statistics for direct packet input queue.
void odp_pktio_extra_stats_print(odp_pktio_t pktio)
Print extra statistics for a packet IO interface.
int odp_pktin_event_queue_stats(odp_pktio_t pktio, odp_queue_t queue, odp_pktin_queue_stats_t *stats)
Get statistics for packet input event queue.
int odp_pktio_extra_stat_counter(odp_pktio_t pktio, uint32_t id, uint64_t *stat)
Get extra statistic counter value.
int odp_pktio_extra_stats(odp_pktio_t pktio, uint64_t stats[], int num)
Get extra statistics for a packet IO interface.
#define ODP_PKTIO_STATS_EXTRA_NAME_LEN
Maximum packet IO extra statistics counter name length, including the null character.
int odp_pktout_event_queue_stats(odp_pktio_t pktio, odp_queue_t queue, odp_pktout_queue_stats_t *stats)
Get statistics for packet output event queue.
int odp_pktio_extra_stat_info(odp_pktio_t pktio, odp_pktio_extra_stat_info_t info[], int num)
Get extra statistics counter information for a packet IO interface.
int odp_pktout_queue_stats(odp_pktout_queue_t queue, odp_pktout_queue_stats_t *stats)
Get statistics for direct packet output queue.
int odp_pktio_stats(odp_pktio_t pktio, odp_pktio_stats_t *stats)
Get statistics for pktio handle.
int odp_pktio_stats_reset(odp_pktio_t pktio)
Reset statistics for pktio handle.
Packet IO input queue specific statistics counters.
uint64_t errors
See odp_pktio_stats_t::in_errors.
uint64_t packets
See odp_pktio_stats_t::in_packets.
uint64_t octets
See odp_pktio_stats_t::in_octets.
uint64_t discards
See odp_pktio_stats_t::in_discards.
Packet IO extra statistics counter information.
char name[ODP_PKTIO_STATS_EXTRA_NAME_LEN]
Name of the counter.
Packet IO statistics capabilities.
uint64_t all_counters
All bits of the bit field structure.
struct odp_pktio_stats_capability_t::@95 pktio
Interface level capabilities.
uint64_t errors
See odp_pktin_queue_stats_t::errors.
uint64_t discards
See odp_pktin_queue_stats_t::discards.
uint64_t out_discards
See odp_pktio_stats_t::out_discards.
uint64_t in_errors
See odp_pktio_stats_t::in_errors.
uint64_t out_packets
See odp_pktio_stats_t::out_packets.
uint64_t in_discards
See odp_pktio_stats_t::in_discards.
uint64_t in_octets
See odp_pktio_stats_t::in_octets.
uint64_t out_errors
See odp_pktio_stats_t::out_errors.
uint64_t out_mcast_pkts
See odp_pktio_stats_t::out_mcast_pkts.
uint64_t out_bcast_pkts
See odp_pktio_stats_t::out_bcast_pkts.
struct odp_pktio_stats_capability_t::@96 pktin_queue
Input queue level capabilities.
uint64_t in_ucast_pkts
See odp_pktio_stats_t::in_ucast_pkts.
uint64_t in_packets
See odp_pktio_stats_t::in_packets.
uint64_t packets
See odp_pktin_queue_stats_t::packets.
uint64_t out_ucast_pkts
See odp_pktio_stats_t::out_ucast_pkts.
uint64_t in_bcast_pkts
See odp_pktio_stats_t::in_bcast_pkts.
struct odp_pktio_stats_capability_t::@95::@98::@100 counter
Statistics counters in a bit field structure.
uint64_t octets
See odp_pktin_queue_stats_t::octets.
uint64_t out_octets
See odp_pktio_stats_t::out_octets.
struct odp_pktio_stats_capability_t::@97 pktout_queue
Output queue level capabilities.
uint64_t in_mcast_pkts
See odp_pktio_stats_t::in_mcast_pkts.
Packet IO statistics counters.
uint64_t out_ucast_pkts
Number of successfully transmitted Ethernet packets with a unicast destination MAC address.
uint64_t in_ucast_pkts
Number of successfully received Ethernet packets with a unicast destination MAC address.
uint64_t out_octets
Number of octets in successfully transmitted packets.
uint64_t in_errors
Number of inbound packets with errors.
uint64_t in_octets
Number of octets in successfully received packets.
uint64_t in_discards
Number of inbound packets which were discarded due to a lack of free resources (e....
uint64_t out_discards
Number of outbound packets which were discarded due to a lack of free resources (e....
uint64_t out_errors
Number of packets with transmission errors.
uint64_t in_bcast_pkts
Number of successfully received Ethernet packets with a broadcast destination MAC address.
uint64_t in_mcast_pkts
Number of successfully received Ethernet packets with a multicast destination MAC address.
uint64_t out_mcast_pkts
Number of successfully transmitted Ethernet packets with a multicast destination MAC address.
uint64_t in_packets
Number of successfully received packets.
uint64_t out_bcast_pkts
Number of successfully transmitted Ethernet packets with a broadcast destination MAC address.
uint64_t out_packets
Number of successfully transmitted packets.
Packet IO output queue specific statistics counters.
uint64_t errors
See odp_pktio_stats_t::out_errors.
uint64_t octets
See odp_pktio_stats_t::out_octets.
uint64_t discards
See odp_pktio_stats_t::out_discards.
uint64_t packets
See odp_pktio_stats_t::out_packets.