| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
 | 2 |  **************************************************************************** | 
 | 3 |  *** | 
 | 4 |  ***   This header was automatically generated from a Linux kernel header | 
 | 5 |  ***   of the same name, to make information necessary for userspace to | 
 | 6 |  ***   call into the kernel available to libc.  It contains only constants, | 
 | 7 |  ***   structures, and macros generated from the original header, and thus, | 
 | 8 |  ***   contains no copyrightable information. | 
 | 9 |  *** | 
 | 10 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef __LINUX_PKT_SCHED_H | 
 | 20 | #define __LINUX_PKT_SCHED_H | 
 | 21 | #include <linux/types.h> | 
 | 22 | #define TC_PRIO_BESTEFFORT 0 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define TC_PRIO_FILLER 1 | 
 | 24 | #define TC_PRIO_BULK 2 | 
 | 25 | #define TC_PRIO_INTERACTIVE_BULK 4 | 
 | 26 | #define TC_PRIO_INTERACTIVE 6 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define TC_PRIO_CONTROL 7 | 
 | 28 | #define TC_PRIO_MAX 15 | 
 | 29 | struct tc_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 30 |   __u64 bytes; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 |   __u32 packets; | 
 | 32 |   __u32 drops; | 
 | 33 |   __u32 overlimits; | 
 | 34 |   __u32 bps; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 |   __u32 pps; | 
 | 36 |   __u32 qlen; | 
 | 37 |   __u32 backlog; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | struct tc_estimator { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 |   signed char interval; | 
 | 41 |   unsigned char ewma_log; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define TC_H_MAJ_MASK (0xFFFF0000U) | 
 | 44 | #define TC_H_MIN_MASK (0x0000FFFFU) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | #define TC_H_MAJ(h) ((h) & TC_H_MAJ_MASK) | 
 | 46 | #define TC_H_MIN(h) ((h) & TC_H_MIN_MASK) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | #define TC_H_MAKE(maj,min) (((maj) & TC_H_MAJ_MASK) | ((min) & TC_H_MIN_MASK)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | #define TC_H_UNSPEC (0U) | 
 | 49 | #define TC_H_ROOT (0xFFFFFFFFU) | 
 | 50 | #define TC_H_INGRESS (0xFFFFFFF1U) | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 51 | #define TC_H_CLSACT TC_H_INGRESS | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 52 | #define TC_H_MIN_PRIORITY 0xFFE0U | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 53 | #define TC_H_MIN_INGRESS 0xFFF2U | 
 | 54 | #define TC_H_MIN_EGRESS 0xFFF3U | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 55 | enum tc_link_layer { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 |   TC_LINKLAYER_UNAWARE, | 
 | 57 |   TC_LINKLAYER_ETHERNET, | 
 | 58 |   TC_LINKLAYER_ATM, | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 59 | }; | 
 | 60 | #define TC_LINKLAYER_MASK 0x0F | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | struct tc_ratespec { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 62 |   unsigned char cell_log; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 |   __u8 linklayer; | 
 | 64 |   unsigned short overhead; | 
 | 65 |   short cell_align; | 
 | 66 |   unsigned short mpu; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 |   __u32 rate; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; | 
 | 69 | #define TC_RTAB_SIZE 1024 | 
 | 70 | struct tc_sizespec { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 |   unsigned char cell_log; | 
 | 72 |   unsigned char size_log; | 
 | 73 |   short cell_align; | 
 | 74 |   int overhead; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 |   unsigned int linklayer; | 
 | 76 |   unsigned int mpu; | 
 | 77 |   unsigned int mtu; | 
 | 78 |   unsigned int tsize; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | }; | 
 | 80 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 81 |   TCA_STAB_UNSPEC, | 
 | 82 |   TCA_STAB_BASE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 |   TCA_STAB_DATA, | 
 | 84 |   __TCA_STAB_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | }; | 
 | 86 | #define TCA_STAB_MAX (__TCA_STAB_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | struct tc_fifo_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 88 |   __u32 limit; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 89 | }; | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 90 | #define SKBPRIO_MAX_PRIORITY 64 | 
 | 91 | struct tc_skbprio_qopt { | 
 | 92 |   __u32 limit; | 
 | 93 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | #define TCQ_PRIO_BANDS 16 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define TCQ_MIN_PRIO_BANDS 2 | 
 | 96 | struct tc_prio_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 97 |   int bands; | 
 | 98 |   __u8 priomap[TC_PRIO_MAX + 1]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | }; | 
 | 100 | struct tc_multiq_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 101 |   __u16 bands; | 
 | 102 |   __u16 max_bands; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | }; | 
 | 104 | #define TCQ_PLUG_BUFFER 0 | 
 | 105 | #define TCQ_PLUG_RELEASE_ONE 1 | 
 | 106 | #define TCQ_PLUG_RELEASE_INDEFINITE 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define TCQ_PLUG_LIMIT 3 | 
 | 108 | struct tc_plug_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 109 |   int action; | 
 | 110 |   __u32 limit; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | }; | 
 | 112 | struct tc_tbf_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 113 |   struct tc_ratespec rate; | 
 | 114 |   struct tc_ratespec peakrate; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 |   __u32 limit; | 
 | 116 |   __u32 buffer; | 
 | 117 |   __u32 mtu; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 118 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 |   TCA_TBF_UNSPEC, | 
 | 121 |   TCA_TBF_PARMS, | 
 | 122 |   TCA_TBF_RTAB, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 123 |   TCA_TBF_PTAB, | 
 | 124 |   TCA_TBF_RATE64, | 
 | 125 |   TCA_TBF_PRATE64, | 
 | 126 |   TCA_TBF_BURST, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 127 |   TCA_TBF_PBURST, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 128 |   TCA_TBF_PAD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 129 |   __TCA_TBF_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | }; | 
 | 131 | #define TCA_TBF_MAX (__TCA_TBF_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | struct tc_sfq_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 133 |   unsigned quantum; | 
 | 134 |   int perturb_period; | 
 | 135 |   __u32 limit; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 136 |   unsigned divisor; | 
 | 137 |   unsigned flows; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 138 | }; | 
 | 139 | struct tc_sfqred_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 |   __u32 prob_drop; | 
 | 141 |   __u32 forced_drop; | 
 | 142 |   __u32 prob_mark; | 
 | 143 |   __u32 forced_mark; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 144 |   __u32 prob_mark_head; | 
 | 145 |   __u32 forced_mark_head; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | }; | 
 | 147 | struct tc_sfq_qopt_v1 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 |   struct tc_sfq_qopt v0; | 
 | 149 |   unsigned int depth; | 
 | 150 |   unsigned int headdrop; | 
 | 151 |   __u32 limit; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 152 |   __u32 qth_min; | 
 | 153 |   __u32 qth_max; | 
 | 154 |   unsigned char Wlog; | 
 | 155 |   unsigned char Plog; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 156 |   unsigned char Scell_log; | 
 | 157 |   unsigned char flags; | 
 | 158 |   __u32 max_P; | 
 | 159 |   struct tc_sfqred_stats stats; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | }; | 
 | 161 | struct tc_sfq_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 162 |   __s32 allot; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 163 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 165 |   TCA_RED_UNSPEC, | 
 | 166 |   TCA_RED_PARMS, | 
 | 167 |   TCA_RED_STAB, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 168 |   TCA_RED_MAX_P, | 
 | 169 |   __TCA_RED_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 170 | }; | 
 | 171 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 172 | struct tc_red_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 173 |   __u32 limit; | 
 | 174 |   __u32 qth_min; | 
 | 175 |   __u32 qth_max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 176 |   unsigned char Wlog; | 
 | 177 |   unsigned char Plog; | 
 | 178 |   unsigned char Scell_log; | 
 | 179 |   unsigned char flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 180 | #define TC_RED_ECN 1 | 
 | 181 | #define TC_RED_HARDDROP 2 | 
 | 182 | #define TC_RED_ADAPTATIVE 4 | 
 | 183 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 184 | struct tc_red_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 185 |   __u32 early; | 
 | 186 |   __u32 pdrop; | 
 | 187 |   __u32 other; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 188 |   __u32 marked; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 189 | }; | 
 | 190 | #define MAX_DPs 16 | 
 | 191 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 192 |   TCA_GRED_UNSPEC, | 
 | 193 |   TCA_GRED_PARMS, | 
 | 194 |   TCA_GRED_STAB, | 
 | 195 |   TCA_GRED_DPS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 196 |   TCA_GRED_MAX_P, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 197 |   TCA_GRED_LIMIT, | 
| Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 198 |   TCA_GRED_VQ_LIST, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 199 |   __TCA_GRED_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 200 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 201 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) | 
| Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 202 | enum { | 
 | 203 |   TCA_GRED_VQ_ENTRY_UNSPEC, | 
 | 204 |   TCA_GRED_VQ_ENTRY, | 
 | 205 |   __TCA_GRED_VQ_ENTRY_MAX, | 
 | 206 | }; | 
 | 207 | #define TCA_GRED_VQ_ENTRY_MAX (__TCA_GRED_VQ_ENTRY_MAX - 1) | 
 | 208 | enum { | 
 | 209 |   TCA_GRED_VQ_UNSPEC, | 
 | 210 |   TCA_GRED_VQ_PAD, | 
 | 211 |   TCA_GRED_VQ_DP, | 
 | 212 |   TCA_GRED_VQ_STAT_BYTES, | 
 | 213 |   TCA_GRED_VQ_STAT_PACKETS, | 
 | 214 |   TCA_GRED_VQ_STAT_BACKLOG, | 
 | 215 |   TCA_GRED_VQ_STAT_PROB_DROP, | 
 | 216 |   TCA_GRED_VQ_STAT_PROB_MARK, | 
 | 217 |   TCA_GRED_VQ_STAT_FORCED_DROP, | 
 | 218 |   TCA_GRED_VQ_STAT_FORCED_MARK, | 
 | 219 |   TCA_GRED_VQ_STAT_PDROP, | 
 | 220 |   TCA_GRED_VQ_STAT_OTHER, | 
 | 221 |   TCA_GRED_VQ_FLAGS, | 
 | 222 |   __TCA_GRED_VQ_MAX | 
 | 223 | }; | 
 | 224 | #define TCA_GRED_VQ_MAX (__TCA_GRED_VQ_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 225 | struct tc_gred_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 226 |   __u32 limit; | 
 | 227 |   __u32 qth_min; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 228 |   __u32 qth_max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 229 |   __u32 DP; | 
 | 230 |   __u32 backlog; | 
 | 231 |   __u32 qave; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 232 |   __u32 forced; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 233 |   __u32 early; | 
 | 234 |   __u32 other; | 
 | 235 |   __u32 pdrop; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 236 |   __u8 Wlog; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 237 |   __u8 Plog; | 
 | 238 |   __u8 Scell_log; | 
 | 239 |   __u8 prio; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 240 |   __u32 packets; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 241 |   __u32 bytesin; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 242 | }; | 
 | 243 | struct tc_gred_sopt { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 244 |   __u32 DPs; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 245 |   __u32 def_DP; | 
 | 246 |   __u8 grio; | 
 | 247 |   __u8 flags; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 248 |   __u16 pad1; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 249 | }; | 
 | 250 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 251 |   TCA_CHOKE_UNSPEC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 252 |   TCA_CHOKE_PARMS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 253 |   TCA_CHOKE_STAB, | 
 | 254 |   TCA_CHOKE_MAX_P, | 
 | 255 |   __TCA_CHOKE_MAX, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 256 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 257 | #define TCA_CHOKE_MAX (__TCA_CHOKE_MAX - 1) | 
 | 258 | struct tc_choke_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 259 |   __u32 limit; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 260 |   __u32 qth_min; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 261 |   __u32 qth_max; | 
 | 262 |   unsigned char Wlog; | 
 | 263 |   unsigned char Plog; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 264 |   unsigned char Scell_log; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 265 |   unsigned char flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 266 | }; | 
 | 267 | struct tc_choke_xstats { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 268 |   __u32 early; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 269 |   __u32 pdrop; | 
 | 270 |   __u32 other; | 
 | 271 |   __u32 marked; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 272 |   __u32 matched; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 273 | }; | 
 | 274 | #define TC_HTB_NUMPRIO 8 | 
 | 275 | #define TC_HTB_MAXDEPTH 8 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 276 | #define TC_HTB_PROTOVER 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 277 | struct tc_htb_opt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 278 |   struct tc_ratespec rate; | 
 | 279 |   struct tc_ratespec ceil; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 280 |   __u32 buffer; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 281 |   __u32 cbuffer; | 
 | 282 |   __u32 quantum; | 
 | 283 |   __u32 level; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 284 |   __u32 prio; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 285 | }; | 
 | 286 | struct tc_htb_glob { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 287 |   __u32 version; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 288 |   __u32 rate2quantum; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 289 |   __u32 defcls; | 
 | 290 |   __u32 debug; | 
 | 291 |   __u32 direct_pkts; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 292 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 293 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 294 |   TCA_HTB_UNSPEC, | 
 | 295 |   TCA_HTB_PARMS, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 296 |   TCA_HTB_INIT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 297 |   TCA_HTB_CTAB, | 
 | 298 |   TCA_HTB_RTAB, | 
 | 299 |   TCA_HTB_DIRECT_QLEN, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 300 |   TCA_HTB_RATE64, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 301 |   TCA_HTB_CEIL64, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 302 |   TCA_HTB_PAD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 303 |   __TCA_HTB_MAX, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 304 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 305 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 306 | struct tc_htb_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 307 |   __u32 lends; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 308 |   __u32 borrows; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 309 |   __u32 giants; | 
| Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 310 |   __s32 tokens; | 
 | 311 |   __s32 ctokens; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 312 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 313 | struct tc_hfsc_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 314 |   __u16 defcls; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 315 | }; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 316 | struct tc_service_curve { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 317 |   __u32 m1; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 318 |   __u32 d; | 
 | 319 |   __u32 m2; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 320 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 321 | struct tc_hfsc_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 322 |   __u64 work; | 
 | 323 |   __u64 rtwork; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 324 |   __u32 period; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 325 |   __u32 level; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 326 | }; | 
 | 327 | enum { | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 328 |   TCA_HFSC_UNSPEC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 329 |   TCA_HFSC_RSC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 330 |   TCA_HFSC_FSC, | 
 | 331 |   TCA_HFSC_USC, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 332 |   __TCA_HFSC_MAX, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 333 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 334 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) | 
 | 335 | #define TC_CBQ_MAXPRIO 8 | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 336 | #define TC_CBQ_MAXLEVEL 8 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 337 | #define TC_CBQ_DEF_EWMA 5 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 338 | struct tc_cbq_lssopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 339 |   unsigned char change; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 340 |   unsigned char flags; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 341 | #define TCF_CBQ_LSS_BOUNDED 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 342 | #define TCF_CBQ_LSS_ISOLATED 2 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 343 |   unsigned char ewma_log; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 344 |   unsigned char level; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 345 | #define TCF_CBQ_LSS_FLAGS 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 346 | #define TCF_CBQ_LSS_EWMA 2 | 
 | 347 | #define TCF_CBQ_LSS_MAXIDLE 4 | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 348 | #define TCF_CBQ_LSS_MINIDLE 8 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 349 | #define TCF_CBQ_LSS_OFFTIME 0x10 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 350 | #define TCF_CBQ_LSS_AVPKT 0x20 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 351 |   __u32 maxidle; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 352 |   __u32 minidle; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 353 |   __u32 offtime; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 354 |   __u32 avpkt; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 355 | }; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 356 | struct tc_cbq_wrropt { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 357 |   unsigned char flags; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 358 |   unsigned char priority; | 
 | 359 |   unsigned char cpriority; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 360 |   unsigned char __reserved; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 361 |   __u32 allot; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 362 |   __u32 weight; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 363 | }; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 364 | struct tc_cbq_ovl { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 365 |   unsigned char strategy; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 366 | #define TC_CBQ_OVL_CLASSIC 0 | 
 | 367 | #define TC_CBQ_OVL_DELAY 1 | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 368 | #define TC_CBQ_OVL_LOWPRIO 2 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 369 | #define TC_CBQ_OVL_DROP 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 370 | #define TC_CBQ_OVL_RCLASSIC 4 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 371 |   unsigned char priority2; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 372 |   __u16 pad; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 373 |   __u32 penalty; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 374 | }; | 
 | 375 | struct tc_cbq_police { | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 376 |   unsigned char police; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 377 |   unsigned char __res1; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 378 |   unsigned short __res2; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 379 | }; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 380 | struct tc_cbq_fopt { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 381 |   __u32 split; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 382 |   __u32 defmap; | 
 | 383 |   __u32 defchange; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 384 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 385 | struct tc_cbq_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 386 |   __u32 borrows; | 
 | 387 |   __u32 overactions; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 388 |   __s32 avgidle; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 389 |   __s32 undertime; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 390 | }; | 
 | 391 | enum { | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 392 |   TCA_CBQ_UNSPEC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 393 |   TCA_CBQ_LSSOPT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 394 |   TCA_CBQ_WRROPT, | 
 | 395 |   TCA_CBQ_FOPT, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 396 |   TCA_CBQ_OVL_STRATEGY, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 397 |   TCA_CBQ_RATE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 398 |   TCA_CBQ_RTAB, | 
 | 399 |   TCA_CBQ_POLICE, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 400 |   __TCA_CBQ_MAX, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 401 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 402 | #define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1) | 
 | 403 | enum { | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 404 |   TCA_DSMARK_UNSPEC, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 405 |   TCA_DSMARK_INDICES, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 406 |   TCA_DSMARK_DEFAULT_INDEX, | 
 | 407 |   TCA_DSMARK_SET_TC_INDEX, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 408 |   TCA_DSMARK_MASK, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 409 |   TCA_DSMARK_VALUE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 410 |   __TCA_DSMARK_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | }; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 412 | #define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 413 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 414 |   TCA_ATM_UNSPEC, | 
 | 415 |   TCA_ATM_FD, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 416 |   TCA_ATM_PTR, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 417 |   TCA_ATM_HDR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 418 |   TCA_ATM_EXCESS, | 
 | 419 |   TCA_ATM_ADDR, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 420 |   TCA_ATM_STATE, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 421 |   __TCA_ATM_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 422 | }; | 
 | 423 | #define TCA_ATM_MAX (__TCA_ATM_MAX - 1) | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 424 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 425 |   TCA_NETEM_UNSPEC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 426 |   TCA_NETEM_CORR, | 
 | 427 |   TCA_NETEM_DELAY_DIST, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 428 |   TCA_NETEM_REORDER, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 429 |   TCA_NETEM_CORRUPT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 430 |   TCA_NETEM_LOSS, | 
 | 431 |   TCA_NETEM_RATE, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 432 |   TCA_NETEM_ECN, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 433 |   TCA_NETEM_RATE64, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 434 |   TCA_NETEM_PAD, | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 435 |   TCA_NETEM_LATENCY64, | 
 | 436 |   TCA_NETEM_JITTER64, | 
 | 437 |   TCA_NETEM_SLOT, | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 438 |   TCA_NETEM_SLOT_DIST, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 439 |   __TCA_NETEM_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 440 | }; | 
 | 441 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 442 | struct tc_netem_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 443 |   __u32 latency; | 
 | 444 |   __u32 limit; | 
 | 445 |   __u32 loss; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 446 |   __u32 gap; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 447 |   __u32 duplicate; | 
 | 448 |   __u32 jitter; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 449 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 450 | struct tc_netem_corr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 451 |   __u32 delay_corr; | 
 | 452 |   __u32 loss_corr; | 
 | 453 |   __u32 dup_corr; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 454 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 455 | struct tc_netem_reorder { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 456 |   __u32 probability; | 
 | 457 |   __u32 correlation; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 458 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 459 | struct tc_netem_corrupt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 460 |   __u32 probability; | 
 | 461 |   __u32 correlation; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 462 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 463 | struct tc_netem_rate { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 464 |   __u32 rate; | 
 | 465 |   __s32 packet_overhead; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 466 |   __u32 cell_size; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 467 |   __s32 cell_overhead; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 468 | }; | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 469 | struct tc_netem_slot { | 
 | 470 |   __s64 min_delay; | 
 | 471 |   __s64 max_delay; | 
 | 472 |   __s32 max_packets; | 
 | 473 |   __s32 max_bytes; | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 474 |   __s64 dist_delay; | 
 | 475 |   __s64 dist_jitter; | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 476 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 477 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 478 |   NETEM_LOSS_UNSPEC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 479 |   NETEM_LOSS_GI, | 
 | 480 |   NETEM_LOSS_GE, | 
 | 481 |   __NETEM_LOSS_MAX | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 482 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 483 | #define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 484 | struct tc_netem_gimodel { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 485 |   __u32 p13; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 486 |   __u32 p31; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 487 |   __u32 p32; | 
 | 488 |   __u32 p14; | 
 | 489 |   __u32 p23; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 490 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 491 | struct tc_netem_gemodel { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 492 |   __u32 p; | 
 | 493 |   __u32 r; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 494 |   __u32 h; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 495 |   __u32 k1; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 496 | }; | 
 | 497 | #define NETEM_DIST_SCALE 8192 | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 498 | #define NETEM_DIST_MAX 16384 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 499 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 500 |   TCA_DRR_UNSPEC, | 
 | 501 |   TCA_DRR_QUANTUM, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 502 |   __TCA_DRR_MAX | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 503 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 504 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) | 
 | 505 | struct tc_drr_stats { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 506 |   __u32 deficit; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 507 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 508 | #define TC_QOPT_BITMASK 15 | 
 | 509 | #define TC_QOPT_MAX_QUEUE 16 | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 510 | enum { | 
 | 511 |   TC_MQPRIO_HW_OFFLOAD_NONE, | 
 | 512 |   TC_MQPRIO_HW_OFFLOAD_TCS, | 
 | 513 |   __TC_MQPRIO_HW_OFFLOAD_MAX | 
 | 514 | }; | 
 | 515 | #define TC_MQPRIO_HW_OFFLOAD_MAX (__TC_MQPRIO_HW_OFFLOAD_MAX - 1) | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 516 | enum { | 
 | 517 |   TC_MQPRIO_MODE_DCB, | 
 | 518 |   TC_MQPRIO_MODE_CHANNEL, | 
 | 519 |   __TC_MQPRIO_MODE_MAX | 
 | 520 | }; | 
 | 521 | #define __TC_MQPRIO_MODE_MAX (__TC_MQPRIO_MODE_MAX - 1) | 
 | 522 | enum { | 
 | 523 |   TC_MQPRIO_SHAPER_DCB, | 
 | 524 |   TC_MQPRIO_SHAPER_BW_RATE, | 
 | 525 |   __TC_MQPRIO_SHAPER_MAX | 
 | 526 | }; | 
 | 527 | #define __TC_MQPRIO_SHAPER_MAX (__TC_MQPRIO_SHAPER_MAX - 1) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 528 | struct tc_mqprio_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 529 |   __u8 num_tc; | 
 | 530 |   __u8 prio_tc_map[TC_QOPT_BITMASK + 1]; | 
 | 531 |   __u8 hw; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 532 |   __u16 count[TC_QOPT_MAX_QUEUE]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 533 |   __u16 offset[TC_QOPT_MAX_QUEUE]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 534 | }; | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 535 | #define TC_MQPRIO_F_MODE 0x1 | 
 | 536 | #define TC_MQPRIO_F_SHAPER 0x2 | 
 | 537 | #define TC_MQPRIO_F_MIN_RATE 0x4 | 
 | 538 | #define TC_MQPRIO_F_MAX_RATE 0x8 | 
 | 539 | enum { | 
 | 540 |   TCA_MQPRIO_UNSPEC, | 
 | 541 |   TCA_MQPRIO_MODE, | 
 | 542 |   TCA_MQPRIO_SHAPER, | 
 | 543 |   TCA_MQPRIO_MIN_RATE64, | 
 | 544 |   TCA_MQPRIO_MAX_RATE64, | 
 | 545 |   __TCA_MQPRIO_MAX, | 
 | 546 | }; | 
 | 547 | #define TCA_MQPRIO_MAX (__TCA_MQPRIO_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 548 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 549 |   TCA_SFB_UNSPEC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 550 |   TCA_SFB_PARMS, | 
 | 551 |   __TCA_SFB_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 552 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 553 | #define TCA_SFB_MAX (__TCA_SFB_MAX - 1) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 554 | struct tc_sfb_qopt { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 555 |   __u32 rehash_interval; | 
 | 556 |   __u32 warmup_time; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 557 |   __u32 max; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 558 |   __u32 bin_size; | 
 | 559 |   __u32 increment; | 
 | 560 |   __u32 decrement; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 561 |   __u32 limit; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 562 |   __u32 penalty_rate; | 
 | 563 |   __u32 penalty_burst; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 564 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 565 | struct tc_sfb_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 566 |   __u32 earlydrop; | 
 | 567 |   __u32 penaltydrop; | 
 | 568 |   __u32 bucketdrop; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 569 |   __u32 queuedrop; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 570 |   __u32 childdrop; | 
 | 571 |   __u32 marked; | 
 | 572 |   __u32 maxqlen; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 573 |   __u32 maxprob; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 574 |   __u32 avgprob; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 575 | }; | 
 | 576 | #define SFB_MAX_PROB 0xFFFF | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 577 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 578 |   TCA_QFQ_UNSPEC, | 
 | 579 |   TCA_QFQ_WEIGHT, | 
 | 580 |   TCA_QFQ_LMAX, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 581 |   __TCA_QFQ_MAX | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 582 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 583 | #define TCA_QFQ_MAX (__TCA_QFQ_MAX - 1) | 
 | 584 | struct tc_qfq_stats { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 585 |   __u32 weight; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 586 |   __u32 lmax; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 587 | }; | 
 | 588 | enum { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 589 |   TCA_CODEL_UNSPEC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 590 |   TCA_CODEL_TARGET, | 
 | 591 |   TCA_CODEL_LIMIT, | 
 | 592 |   TCA_CODEL_INTERVAL, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 593 |   TCA_CODEL_ECN, | 
 | 594 |   TCA_CODEL_CE_THRESHOLD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 595 |   __TCA_CODEL_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 596 | }; | 
 | 597 | #define TCA_CODEL_MAX (__TCA_CODEL_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 598 | struct tc_codel_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 599 |   __u32 maxpacket; | 
 | 600 |   __u32 count; | 
 | 601 |   __u32 lastcount; | 
 | 602 |   __u32 ldelay; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 603 |   __s32 drop_next; | 
 | 604 |   __u32 drop_overlimit; | 
 | 605 |   __u32 ecn_mark; | 
 | 606 |   __u32 dropping; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 607 |   __u32 ce_mark; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 608 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 609 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 610 |   TCA_FQ_CODEL_UNSPEC, | 
 | 611 |   TCA_FQ_CODEL_TARGET, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 612 |   TCA_FQ_CODEL_LIMIT, | 
 | 613 |   TCA_FQ_CODEL_INTERVAL, | 
 | 614 |   TCA_FQ_CODEL_ECN, | 
 | 615 |   TCA_FQ_CODEL_FLOWS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 616 |   TCA_FQ_CODEL_QUANTUM, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 617 |   TCA_FQ_CODEL_CE_THRESHOLD, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 618 |   TCA_FQ_CODEL_DROP_BATCH_SIZE, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 619 |   TCA_FQ_CODEL_MEMORY_LIMIT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 620 |   __TCA_FQ_CODEL_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 621 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 622 | #define TCA_FQ_CODEL_MAX (__TCA_FQ_CODEL_MAX - 1) | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 623 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 624 |   TCA_FQ_CODEL_XSTATS_QDISC, | 
 | 625 |   TCA_FQ_CODEL_XSTATS_CLASS, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 626 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 627 | struct tc_fq_codel_qd_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 628 |   __u32 maxpacket; | 
 | 629 |   __u32 drop_overlimit; | 
 | 630 |   __u32 ecn_mark; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 631 |   __u32 new_flow_count; | 
 | 632 |   __u32 new_flows_len; | 
 | 633 |   __u32 old_flows_len; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 634 |   __u32 ce_mark; | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 635 |   __u32 memory_usage; | 
 | 636 |   __u32 drop_overmemory; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 637 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 638 | struct tc_fq_codel_cl_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 639 |   __s32 deficit; | 
 | 640 |   __u32 ldelay; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 641 |   __u32 count; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 642 |   __u32 lastcount; | 
 | 643 |   __u32 dropping; | 
 | 644 |   __s32 drop_next; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 645 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 646 | struct tc_fq_codel_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 647 |   __u32 type; | 
 | 648 |   union { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 649 |     struct tc_fq_codel_qd_stats qdisc_stats; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 650 |     struct tc_fq_codel_cl_stats class_stats; | 
 | 651 |   }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 652 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 653 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 654 |   TCA_FQ_UNSPEC, | 
 | 655 |   TCA_FQ_PLIMIT, | 
 | 656 |   TCA_FQ_FLOW_PLIMIT, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 657 |   TCA_FQ_QUANTUM, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 658 |   TCA_FQ_INITIAL_QUANTUM, | 
 | 659 |   TCA_FQ_RATE_ENABLE, | 
 | 660 |   TCA_FQ_FLOW_DEFAULT_RATE, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 661 |   TCA_FQ_FLOW_MAX_RATE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 662 |   TCA_FQ_BUCKETS_LOG, | 
 | 663 |   TCA_FQ_FLOW_REFILL_DELAY, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 664 |   TCA_FQ_ORPHAN_MASK, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 665 |   TCA_FQ_LOW_RATE_THRESHOLD, | 
| Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 666 |   TCA_FQ_CE_THRESHOLD, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 667 |   __TCA_FQ_MAX | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 668 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 669 | #define TCA_FQ_MAX (__TCA_FQ_MAX - 1) | 
 | 670 | struct tc_fq_qd_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 671 |   __u64 gc_flows; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 672 |   __u64 highprio_packets; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 673 |   __u64 tcp_retrans; | 
 | 674 |   __u64 throttled; | 
 | 675 |   __u64 flows_plimit; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 676 |   __u64 pkts_too_long; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 677 |   __u64 allocation_errors; | 
 | 678 |   __s64 time_next_delayed_flow; | 
 | 679 |   __u32 flows; | 
 | 680 |   __u32 inactive_flows; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 681 |   __u32 throttled_flows; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 682 |   __u32 unthrottle_latency_ns; | 
| Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 683 |   __u64 ce_mark; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 684 | }; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 685 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 686 |   TCA_HHF_UNSPEC, | 
 | 687 |   TCA_HHF_BACKLOG_LIMIT, | 
 | 688 |   TCA_HHF_QUANTUM, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 689 |   TCA_HHF_HH_FLOWS_LIMIT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 690 |   TCA_HHF_RESET_TIMEOUT, | 
 | 691 |   TCA_HHF_ADMIT_BYTES, | 
 | 692 |   TCA_HHF_EVICT_TIMEOUT, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 693 |   TCA_HHF_NON_HH_WEIGHT, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 694 |   __TCA_HHF_MAX | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 695 | }; | 
 | 696 | #define TCA_HHF_MAX (__TCA_HHF_MAX - 1) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 697 | struct tc_hhf_xstats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 698 |   __u32 drop_overlimit; | 
 | 699 |   __u32 hh_overlimit; | 
 | 700 |   __u32 hh_tot_count; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 701 |   __u32 hh_cur_count; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 702 | }; | 
 | 703 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 704 |   TCA_PIE_UNSPEC, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 705 |   TCA_PIE_TARGET, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 706 |   TCA_PIE_LIMIT, | 
 | 707 |   TCA_PIE_TUPDATE, | 
 | 708 |   TCA_PIE_ALPHA, | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 709 |   TCA_PIE_BETA, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 710 |   TCA_PIE_ECN, | 
 | 711 |   TCA_PIE_BYTEMODE, | 
 | 712 |   __TCA_PIE_MAX | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 713 | }; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 714 | #define TCA_PIE_MAX (__TCA_PIE_MAX - 1) | 
 | 715 | struct tc_pie_xstats { | 
| Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 716 |   __u64 prob; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 717 |   __u32 delay; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 718 |   __u32 avg_dq_rate; | 
 | 719 |   __u32 packets_in; | 
 | 720 |   __u32 dropped; | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 721 |   __u32 overlimit; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 722 |   __u32 maxq; | 
 | 723 |   __u32 ecn_mark; | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 724 | }; | 
| Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 725 | struct tc_cbs_qopt { | 
 | 726 |   __u8 offload; | 
 | 727 |   __u8 _pad[3]; | 
 | 728 |   __s32 hicredit; | 
 | 729 |   __s32 locredit; | 
 | 730 |   __s32 idleslope; | 
 | 731 |   __s32 sendslope; | 
 | 732 | }; | 
 | 733 | enum { | 
 | 734 |   TCA_CBS_UNSPEC, | 
 | 735 |   TCA_CBS_PARMS, | 
 | 736 |   __TCA_CBS_MAX, | 
 | 737 | }; | 
 | 738 | #define TCA_CBS_MAX (__TCA_CBS_MAX - 1) | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 739 | struct tc_etf_qopt { | 
 | 740 |   __s32 delta; | 
 | 741 |   __s32 clockid; | 
 | 742 |   __u32 flags; | 
 | 743 | #define TC_ETF_DEADLINE_MODE_ON BIT(0) | 
 | 744 | #define TC_ETF_OFFLOAD_ON BIT(1) | 
 | 745 | }; | 
 | 746 | enum { | 
 | 747 |   TCA_ETF_UNSPEC, | 
 | 748 |   TCA_ETF_PARMS, | 
 | 749 |   __TCA_ETF_MAX, | 
 | 750 | }; | 
 | 751 | #define TCA_ETF_MAX (__TCA_ETF_MAX - 1) | 
 | 752 | enum { | 
 | 753 |   TCA_CAKE_UNSPEC, | 
 | 754 |   TCA_CAKE_PAD, | 
 | 755 |   TCA_CAKE_BASE_RATE64, | 
 | 756 |   TCA_CAKE_DIFFSERV_MODE, | 
 | 757 |   TCA_CAKE_ATM, | 
 | 758 |   TCA_CAKE_FLOW_MODE, | 
 | 759 |   TCA_CAKE_OVERHEAD, | 
 | 760 |   TCA_CAKE_RTT, | 
 | 761 |   TCA_CAKE_TARGET, | 
 | 762 |   TCA_CAKE_AUTORATE, | 
 | 763 |   TCA_CAKE_MEMORY, | 
 | 764 |   TCA_CAKE_NAT, | 
 | 765 |   TCA_CAKE_RAW, | 
 | 766 |   TCA_CAKE_WASH, | 
 | 767 |   TCA_CAKE_MPU, | 
 | 768 |   TCA_CAKE_INGRESS, | 
 | 769 |   TCA_CAKE_ACK_FILTER, | 
 | 770 |   TCA_CAKE_SPLIT_GSO, | 
| Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 771 |   TCA_CAKE_FWMARK, | 
| Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 772 |   __TCA_CAKE_MAX | 
 | 773 | }; | 
 | 774 | #define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1) | 
 | 775 | enum { | 
 | 776 |   __TCA_CAKE_STATS_INVALID, | 
 | 777 |   TCA_CAKE_STATS_PAD, | 
 | 778 |   TCA_CAKE_STATS_CAPACITY_ESTIMATE64, | 
 | 779 |   TCA_CAKE_STATS_MEMORY_LIMIT, | 
 | 780 |   TCA_CAKE_STATS_MEMORY_USED, | 
 | 781 |   TCA_CAKE_STATS_AVG_NETOFF, | 
 | 782 |   TCA_CAKE_STATS_MIN_NETLEN, | 
 | 783 |   TCA_CAKE_STATS_MAX_NETLEN, | 
 | 784 |   TCA_CAKE_STATS_MIN_ADJLEN, | 
 | 785 |   TCA_CAKE_STATS_MAX_ADJLEN, | 
 | 786 |   TCA_CAKE_STATS_TIN_STATS, | 
 | 787 |   TCA_CAKE_STATS_DEFICIT, | 
 | 788 |   TCA_CAKE_STATS_COBALT_COUNT, | 
 | 789 |   TCA_CAKE_STATS_DROPPING, | 
 | 790 |   TCA_CAKE_STATS_DROP_NEXT_US, | 
 | 791 |   TCA_CAKE_STATS_P_DROP, | 
 | 792 |   TCA_CAKE_STATS_BLUE_TIMER_US, | 
 | 793 |   __TCA_CAKE_STATS_MAX | 
 | 794 | }; | 
 | 795 | #define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1) | 
 | 796 | enum { | 
 | 797 |   __TCA_CAKE_TIN_STATS_INVALID, | 
 | 798 |   TCA_CAKE_TIN_STATS_PAD, | 
 | 799 |   TCA_CAKE_TIN_STATS_SENT_PACKETS, | 
 | 800 |   TCA_CAKE_TIN_STATS_SENT_BYTES64, | 
 | 801 |   TCA_CAKE_TIN_STATS_DROPPED_PACKETS, | 
 | 802 |   TCA_CAKE_TIN_STATS_DROPPED_BYTES64, | 
 | 803 |   TCA_CAKE_TIN_STATS_ACKS_DROPPED_PACKETS, | 
 | 804 |   TCA_CAKE_TIN_STATS_ACKS_DROPPED_BYTES64, | 
 | 805 |   TCA_CAKE_TIN_STATS_ECN_MARKED_PACKETS, | 
 | 806 |   TCA_CAKE_TIN_STATS_ECN_MARKED_BYTES64, | 
 | 807 |   TCA_CAKE_TIN_STATS_BACKLOG_PACKETS, | 
 | 808 |   TCA_CAKE_TIN_STATS_BACKLOG_BYTES, | 
 | 809 |   TCA_CAKE_TIN_STATS_THRESHOLD_RATE64, | 
 | 810 |   TCA_CAKE_TIN_STATS_TARGET_US, | 
 | 811 |   TCA_CAKE_TIN_STATS_INTERVAL_US, | 
 | 812 |   TCA_CAKE_TIN_STATS_WAY_INDIRECT_HITS, | 
 | 813 |   TCA_CAKE_TIN_STATS_WAY_MISSES, | 
 | 814 |   TCA_CAKE_TIN_STATS_WAY_COLLISIONS, | 
 | 815 |   TCA_CAKE_TIN_STATS_PEAK_DELAY_US, | 
 | 816 |   TCA_CAKE_TIN_STATS_AVG_DELAY_US, | 
 | 817 |   TCA_CAKE_TIN_STATS_BASE_DELAY_US, | 
 | 818 |   TCA_CAKE_TIN_STATS_SPARSE_FLOWS, | 
 | 819 |   TCA_CAKE_TIN_STATS_BULK_FLOWS, | 
 | 820 |   TCA_CAKE_TIN_STATS_UNRESPONSIVE_FLOWS, | 
 | 821 |   TCA_CAKE_TIN_STATS_MAX_SKBLEN, | 
 | 822 |   TCA_CAKE_TIN_STATS_FLOW_QUANTUM, | 
 | 823 |   __TCA_CAKE_TIN_STATS_MAX | 
 | 824 | }; | 
 | 825 | #define TCA_CAKE_TIN_STATS_MAX (__TCA_CAKE_TIN_STATS_MAX - 1) | 
 | 826 | #define TC_CAKE_MAX_TINS (8) | 
 | 827 | enum { | 
 | 828 |   CAKE_FLOW_NONE = 0, | 
 | 829 |   CAKE_FLOW_SRC_IP, | 
 | 830 |   CAKE_FLOW_DST_IP, | 
 | 831 |   CAKE_FLOW_HOSTS, | 
 | 832 |   CAKE_FLOW_FLOWS, | 
 | 833 |   CAKE_FLOW_DUAL_SRC, | 
 | 834 |   CAKE_FLOW_DUAL_DST, | 
 | 835 |   CAKE_FLOW_TRIPLE, | 
 | 836 |   CAKE_FLOW_MAX, | 
 | 837 | }; | 
 | 838 | enum { | 
 | 839 |   CAKE_DIFFSERV_DIFFSERV3 = 0, | 
 | 840 |   CAKE_DIFFSERV_DIFFSERV4, | 
 | 841 |   CAKE_DIFFSERV_DIFFSERV8, | 
 | 842 |   CAKE_DIFFSERV_BESTEFFORT, | 
 | 843 |   CAKE_DIFFSERV_PRECEDENCE, | 
 | 844 |   CAKE_DIFFSERV_MAX | 
 | 845 | }; | 
 | 846 | enum { | 
 | 847 |   CAKE_ACK_NONE = 0, | 
 | 848 |   CAKE_ACK_FILTER, | 
 | 849 |   CAKE_ACK_AGGRESSIVE, | 
 | 850 |   CAKE_ACK_MAX | 
 | 851 | }; | 
 | 852 | enum { | 
 | 853 |   CAKE_ATM_NONE = 0, | 
 | 854 |   CAKE_ATM_ATM, | 
 | 855 |   CAKE_ATM_PTM, | 
 | 856 |   CAKE_ATM_MAX | 
 | 857 | }; | 
| Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 858 | enum { | 
 | 859 |   TC_TAPRIO_CMD_SET_GATES = 0x00, | 
 | 860 |   TC_TAPRIO_CMD_SET_AND_HOLD = 0x01, | 
 | 861 |   TC_TAPRIO_CMD_SET_AND_RELEASE = 0x02, | 
 | 862 | }; | 
 | 863 | enum { | 
 | 864 |   TCA_TAPRIO_SCHED_ENTRY_UNSPEC, | 
 | 865 |   TCA_TAPRIO_SCHED_ENTRY_INDEX, | 
 | 866 |   TCA_TAPRIO_SCHED_ENTRY_CMD, | 
 | 867 |   TCA_TAPRIO_SCHED_ENTRY_GATE_MASK, | 
 | 868 |   TCA_TAPRIO_SCHED_ENTRY_INTERVAL, | 
 | 869 |   __TCA_TAPRIO_SCHED_ENTRY_MAX, | 
 | 870 | }; | 
 | 871 | #define TCA_TAPRIO_SCHED_ENTRY_MAX (__TCA_TAPRIO_SCHED_ENTRY_MAX - 1) | 
 | 872 | enum { | 
 | 873 |   TCA_TAPRIO_SCHED_UNSPEC, | 
 | 874 |   TCA_TAPRIO_SCHED_ENTRY, | 
 | 875 |   __TCA_TAPRIO_SCHED_MAX, | 
 | 876 | }; | 
 | 877 | #define TCA_TAPRIO_SCHED_MAX (__TCA_TAPRIO_SCHED_MAX - 1) | 
 | 878 | enum { | 
 | 879 |   TCA_TAPRIO_ATTR_UNSPEC, | 
 | 880 |   TCA_TAPRIO_ATTR_PRIOMAP, | 
 | 881 |   TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST, | 
 | 882 |   TCA_TAPRIO_ATTR_SCHED_BASE_TIME, | 
 | 883 |   TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY, | 
 | 884 |   TCA_TAPRIO_ATTR_SCHED_CLOCKID, | 
 | 885 |   TCA_TAPRIO_PAD, | 
 | 886 |   __TCA_TAPRIO_ATTR_MAX, | 
 | 887 | }; | 
 | 888 | #define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1) | 
| Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 889 | #endif |