]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/gen_stats.h
Merge commit 'v2.6.31-rc8' into next
[mirror_ubuntu-jammy-kernel.git] / include / linux / gen_stats.h
CommitLineData
1da177e4
LT
1#ifndef __LINUX_GEN_STATS_H
2#define __LINUX_GEN_STATS_H
3
4#include <linux/types.h>
5
6enum {
7 TCA_STATS_UNSPEC,
8 TCA_STATS_BASIC,
9 TCA_STATS_RATE_EST,
10 TCA_STATS_QUEUE,
11 TCA_STATS_APP,
12 __TCA_STATS_MAX,
13};
14#define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
15
16/**
17 * struct gnet_stats_basic - byte/packet throughput statistics
18 * @bytes: number of seen bytes
19 * @packets: number of seen packets
20 */
21struct gnet_stats_basic
c1a8f1f1
ED
22{
23 __u64 bytes;
24 __u32 packets;
25};
26struct gnet_stats_basic_packed
1da177e4
LT
27{
28 __u64 bytes;
29 __u32 packets;
5e140dfc 30} __attribute__ ((packed));
1da177e4
LT
31
32/**
33 * struct gnet_stats_rate_est - rate estimator
34 * @bps: current byte rate
35 * @pps: current packet rate
36 */
37struct gnet_stats_rate_est
38{
39 __u32 bps;
40 __u32 pps;
41};
42
43/**
44 * struct gnet_stats_queue - queuing statistics
45 * @qlen: queue length
46 * @backlog: backlog size of queue
47 * @drops: number of dropped packets
48 * @requeues: number of requeues
49 * @overlimits: number of enqueues over the limit
50 */
51struct gnet_stats_queue
52{
53 __u32 qlen;
54 __u32 backlog;
55 __u32 drops;
56 __u32 requeues;
57 __u32 overlimits;
58};
59
60/**
61 * struct gnet_estimator - rate estimator configuration
62 * @interval: sampling period
63 * @ewma_log: the log of measurement window weight
64 */
65struct gnet_estimator
66{
67 signed char interval;
68 unsigned char ewma_log;
69};
70
71
72#endif /* __LINUX_GEN_STATS_H */