]> git.proxmox.com Git - mirror_iproute2.git/blame - include/linux/gen_stats.h
iproute2: gnet_stats
[mirror_iproute2.git] / include / linux / gen_stats.h
CommitLineData
e5879dc6 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 * @bytes: number of seen bytes
18 * @packets: number of seen packets
19 */
20struct gnet_stats_basic
21{
22 __u64 bytes;
23 __u32 packets;
24};
25
26/**
27 * @bps: current byte rate
28 * @pps: current packet rate
29 */
30struct gnet_stats_rate_est
31{
32 __u32 bps;
33 __u32 pps;
34};
35
36/**
37 * @qlen: queue length
38 * @backlog: backlog size of queue
39 * @drops: number of dropped packets
40 * @requeues: number of requeues
41 */
42struct gnet_stats_queue
43{
44 __u32 qlen;
45 __u32 backlog;
46 __u32 drops;
47 __u32 requeues;
48 __u32 overlimits;
49};
50
51/**
52 * @interval: sampling period
53 * @ewma_log: the log of measurement window weight
54 */
55struct gnet_estimator
56{
57 signed char interval;
58 unsigned char ewma_log;
59};
60
61
62#endif /* __LINUX_GEN_STATS_H */