Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6/mini2440.git] / include / linux / gen_stats.h
blob13f4e74609ac10747eceffb84f3f1293a83e71a7
1 #ifndef __LINUX_GEN_STATS_H
2 #define __LINUX_GEN_STATS_H
4 #include <linux/types.h>
6 enum {
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,
14 #define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
16 /**
17 * struct gnet_stats_basic - byte/packet throughput statistics
18 * @bytes: number of seen bytes
19 * @packets: number of seen packets
21 struct gnet_stats_basic
23 __u64 bytes;
24 __u32 packets;
27 /**
28 * struct gnet_stats_rate_est - rate estimator
29 * @bps: current byte rate
30 * @pps: current packet rate
32 struct gnet_stats_rate_est
34 __u32 bps;
35 __u32 pps;
38 /**
39 * struct gnet_stats_queue - queuing statistics
40 * @qlen: queue length
41 * @backlog: backlog size of queue
42 * @drops: number of dropped packets
43 * @requeues: number of requeues
44 * @overlimits: number of enqueues over the limit
46 struct gnet_stats_queue
48 __u32 qlen;
49 __u32 backlog;
50 __u32 drops;
51 __u32 requeues;
52 __u32 overlimits;
55 /**
56 * struct gnet_estimator - rate estimator configuration
57 * @interval: sampling period
58 * @ewma_log: the log of measurement window weight
60 struct gnet_estimator
62 signed char interval;
63 unsigned char ewma_log;
67 #endif /* __LINUX_GEN_STATS_H */