net_sched: extend packet counter to 64bit
[linux-2.6-block.git] / include / uapi / linux / gen_stats.h
CommitLineData
6f52b16c 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
1da177e4
LT
2#ifndef __LINUX_GEN_STATS_H
3#define __LINUX_GEN_STATS_H
4
5#include <linux/types.h>
6
7enum {
8 TCA_STATS_UNSPEC,
9 TCA_STATS_BASIC,
10 TCA_STATS_RATE_EST,
11 TCA_STATS_QUEUE,
12 TCA_STATS_APP,
45203a3b 13 TCA_STATS_RATE_EST64,
9854518e 14 TCA_STATS_PAD,
5e111210 15 TCA_STATS_BASIC_HW,
1da177e4
LT
16 __TCA_STATS_MAX,
17};
18#define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
19
20/**
21 * struct gnet_stats_basic - byte/packet throughput statistics
22 * @bytes: number of seen bytes
23 * @packets: number of seen packets
24 */
d94d9fee 25struct gnet_stats_basic {
c1a8f1f1
ED
26 __u64 bytes;
27 __u32 packets;
28};
1da177e4
LT
29
30/**
31 * struct gnet_stats_rate_est - rate estimator
32 * @bps: current byte rate
33 * @pps: current packet rate
34 */
d94d9fee 35struct gnet_stats_rate_est {
1da177e4
LT
36 __u32 bps;
37 __u32 pps;
38};
39
45203a3b
ED
40/**
41 * struct gnet_stats_rate_est64 - rate estimator
42 * @bps: current byte rate
43 * @pps: current packet rate
44 */
45struct gnet_stats_rate_est64 {
46 __u64 bps;
47 __u64 pps;
48};
49
1da177e4
LT
50/**
51 * struct gnet_stats_queue - queuing statistics
52 * @qlen: queue length
53 * @backlog: backlog size of queue
54 * @drops: number of dropped packets
55 * @requeues: number of requeues
56 * @overlimits: number of enqueues over the limit
57 */
d94d9fee 58struct gnet_stats_queue {
1da177e4
LT
59 __u32 qlen;
60 __u32 backlog;
61 __u32 drops;
62 __u32 requeues;
63 __u32 overlimits;
64};
65
66/**
67 * struct gnet_estimator - rate estimator configuration
68 * @interval: sampling period
69 * @ewma_log: the log of measurement window weight
70 */
d94d9fee 71struct gnet_estimator {
1da177e4
LT
72 signed char interval;
73 unsigned char ewma_log;
74};
75
76
77#endif /* __LINUX_GEN_STATS_H */