]> git.proxmox.com Git - mirror_iproute2.git/blame - include/uapi/linux/gen_stats.h
Merge branch 'master' into next
[mirror_iproute2.git] / include / uapi / linux / gen_stats.h
CommitLineData
ba914908 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
e5879dc6 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,
ecefa08c 13 TCA_STATS_RATE_EST64,
31ce6e01 14 TCA_STATS_PAD,
d9c0be4e 15 TCA_STATS_BASIC_HW,
e5879dc6 16 __TCA_STATS_MAX,
17};
18#define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
19
20/**
d639d9d1 21 * struct gnet_stats_basic - byte/packet throughput statistics
e5879dc6 22 * @bytes: number of seen bytes
23 * @packets: number of seen packets
24 */
ab322673 25struct gnet_stats_basic {
f40554f6
SH
26 __u64 bytes;
27 __u32 packets;
28};
ab322673 29struct gnet_stats_basic_packed {
e5879dc6 30 __u64 bytes;
31 __u32 packets;
c40bba69 32} __attribute__ ((packed));
e5879dc6 33
34/**
d639d9d1 35 * struct gnet_stats_rate_est - rate estimator
e5879dc6 36 * @bps: current byte rate
37 * @pps: current packet rate
38 */
ab322673 39struct gnet_stats_rate_est {
e5879dc6 40 __u32 bps;
41 __u32 pps;
42};
43
ecefa08c
SH
44/**
45 * struct gnet_stats_rate_est64 - rate estimator
46 * @bps: current byte rate
47 * @pps: current packet rate
48 */
49struct gnet_stats_rate_est64 {
50 __u64 bps;
51 __u64 pps;
52};
53
e5879dc6 54/**
d639d9d1 55 * struct gnet_stats_queue - queuing statistics
e5879dc6 56 * @qlen: queue length
57 * @backlog: backlog size of queue
58 * @drops: number of dropped packets
59 * @requeues: number of requeues
d639d9d1 60 * @overlimits: number of enqueues over the limit
e5879dc6 61 */
ab322673 62struct gnet_stats_queue {
e5879dc6 63 __u32 qlen;
64 __u32 backlog;
65 __u32 drops;
66 __u32 requeues;
67 __u32 overlimits;
68};
69
70/**
d639d9d1 71 * struct gnet_estimator - rate estimator configuration
e5879dc6 72 * @interval: sampling period
73 * @ewma_log: the log of measurement window weight
74 */
ab322673 75struct gnet_estimator {
e5879dc6 76 signed char interval;
77 unsigned char ewma_log;
78};
79
80
81#endif /* __LINUX_GEN_STATS_H */