• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __LINUX_GEN_STATS_H
2 #define __LINUX_GEN_STATS_H
3 
4 enum {
5 	TCA_STATS_UNSPEC,
6 	TCA_STATS_BASIC,
7 	TCA_STATS_RATE_EST,
8 	TCA_STATS_QUEUE,
9 	TCA_STATS_APP,
10 	__TCA_STATS_MAX,
11 };
12 #define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
13 
14 /**
15  * @bytes: number of seen bytes
16  * @packets: number of seen packets
17  */
18 struct gnet_stats_basic
19 {
20 	__u64	bytes;
21 	__u32	packets;
22 };
23 
24 /**
25  * @bps: current byte rate
26  * @pps: current packet rate
27  */
28 struct gnet_stats_rate_est
29 {
30 	__u32	bps;
31 	__u32	pps;
32 };
33 
34 /**
35  * @qlen: queue length
36  * @backlog: backlog size of queue
37  * @drops: number of dropped packets
38  * @requeues: number of requeues
39  */
40 struct gnet_stats_queue
41 {
42 	__u32	qlen;
43 	__u32	backlog;
44 	__u32	drops;
45 	__u32	requeues;
46 	__u32	overlimits;
47 };
48 
49 /**
50  * @interval: sampling period
51  * @ewma_log: the log of measurement window weight
52  */
53 struct gnet_estimator
54 {
55 	signed char	interval;
56 	unsigned char	ewma_log;
57 };
58 
59 
60 #endif /* __LINUX_GEN_STATS_H */
61