1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __LINUX_GEN_STATS_H
3 #define __LINUX_GEN_STATS_H
5 #include <linux/types.h>
18 #define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
21 * struct gnet_stats_basic - byte/packet throughput statistics
22 * @bytes: number of seen bytes
23 * @packets: number of seen packets
25 struct gnet_stats_basic {
29 struct gnet_stats_basic_packed {
32 } __attribute__ ((packed));
35 * struct gnet_stats_rate_est - rate estimator
36 * @bps: current byte rate
37 * @pps: current packet rate
39 struct gnet_stats_rate_est {
45 * struct gnet_stats_rate_est64 - rate estimator
46 * @bps: current byte rate
47 * @pps: current packet rate
49 struct gnet_stats_rate_est64 {
55 * struct gnet_stats_queue - queuing statistics
57 * @backlog: backlog size of queue
58 * @drops: number of dropped packets
59 * @requeues: number of requeues
60 * @overlimits: number of enqueues over the limit
62 struct gnet_stats_queue {
71 * struct gnet_estimator - rate estimator configuration
72 * @interval: sampling period
73 * @ewma_log: the log of measurement window weight
75 struct gnet_estimator {
77 unsigned char ewma_log;
81 #endif /* __LINUX_GEN_STATS_H */