aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-12-31 18:57:37 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-12-31 18:57:37 +0000
commit98ee06d3d46aa7f89c204681c7075b53300a6a6e (patch)
tree0f5cafbb22cd83fb73e024acba658c7a51582951 /networking/libiproute/linux
parent806116b23407bdf95f22646f11f50b1d14e1cfc2 (diff)
downloadbusybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.tar.gz
busybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.tar.bz2
busybox-w32-98ee06d3d46aa7f89c204681c7075b53300a6a6e.zip
stop using __u32 etc. uint32_t is there for a reason
Diffstat (limited to 'networking/libiproute/linux')
-rw-r--r--networking/libiproute/linux/pkt_sched.h169
1 files changed, 83 insertions, 86 deletions
diff --git a/networking/libiproute/linux/pkt_sched.h b/networking/libiproute/linux/pkt_sched.h
index d6cf1fc06..36c0a46e3 100644
--- a/networking/libiproute/linux/pkt_sched.h
+++ b/networking/libiproute/linux/pkt_sched.h
@@ -15,7 +15,7 @@
15 filler or even bulk. 15 filler or even bulk.
16 */ 16 */
17 17
18#include <asm/types.h> 18//#include <asm/types.h>
19 19
20#define TC_PRIO_BESTEFFORT 0 20#define TC_PRIO_BESTEFFORT 0
21#define TC_PRIO_FILLER 1 21#define TC_PRIO_FILLER 1
@@ -32,15 +32,15 @@
32 32
33struct tc_stats 33struct tc_stats
34{ 34{
35 __u64 bytes; /* NUmber of enqueues bytes */ 35 uint64_t bytes; /* Nnmber of enqueued bytes */
36 __u32 packets; /* Number of enqueued packets */ 36 uint32_t packets; /* Number of enqueued packets */
37 __u32 drops; /* Packets dropped because of lack of resources */ 37 uint32_t drops; /* Packets dropped because of lack of resources */
38 __u32 overlimits; /* Number of throttle events when this 38 uint32_t overlimits; /* Number of throttle events when this
39 * flow goes out of allocated bandwidth */ 39 * flow goes out of allocated bandwidth */
40 __u32 bps; /* Current flow byte rate */ 40 uint32_t bps; /* Current flow byte rate */
41 __u32 pps; /* Current flow packet rate */ 41 uint32_t pps; /* Current flow packet rate */
42 __u32 qlen; 42 uint32_t qlen;
43 __u32 backlog; 43 uint32_t backlog;
44#ifdef __KERNEL__ 44#ifdef __KERNEL__
45 spinlock_t *lock; 45 spinlock_t *lock;
46#endif 46#endif
@@ -86,14 +86,14 @@ struct tc_ratespec
86 unsigned short feature; 86 unsigned short feature;
87 short addend; 87 short addend;
88 unsigned short mpu; 88 unsigned short mpu;
89 __u32 rate; 89 uint32_t rate;
90}; 90};
91 91
92/* FIFO section */ 92/* FIFO section */
93 93
94struct tc_fifo_qopt 94struct tc_fifo_qopt
95{ 95{
96 __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ 96 uint32_t limit; /* Queue length: bytes for bfifo, packets for pfifo */
97}; 97};
98 98
99/* PRIO section */ 99/* PRIO section */
@@ -103,7 +103,7 @@ struct tc_fifo_qopt
103struct tc_prio_qopt 103struct tc_prio_qopt
104{ 104{
105 int bands; /* Number of bands */ 105 int bands; /* Number of bands */
106 __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ 106 uint8_t priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
107}; 107};
108 108
109/* CSZ section */ 109/* CSZ section */
@@ -113,7 +113,7 @@ struct tc_csz_qopt
113 int flows; /* Maximal number of guaranteed flows */ 113 int flows; /* Maximal number of guaranteed flows */
114 unsigned char R_log; /* Fixed point position for round number */ 114 unsigned char R_log; /* Fixed point position for round number */
115 unsigned char delta_log; /* Log of maximal managed time interval */ 115 unsigned char delta_log; /* Log of maximal managed time interval */
116 __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> CSZ band */ 116 uint8_t priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> CSZ band */
117}; 117};
118 118
119struct tc_csz_copt 119struct tc_csz_copt
@@ -121,9 +121,9 @@ struct tc_csz_copt
121 struct tc_ratespec slice; 121 struct tc_ratespec slice;
122 struct tc_ratespec rate; 122 struct tc_ratespec rate;
123 struct tc_ratespec peakrate; 123 struct tc_ratespec peakrate;
124 __u32 limit; 124 uint32_t limit;
125 __u32 buffer; 125 uint32_t buffer;
126 __u32 mtu; 126 uint32_t mtu;
127}; 127};
128 128
129enum 129enum
@@ -140,9 +140,9 @@ struct tc_tbf_qopt
140{ 140{
141 struct tc_ratespec rate; 141 struct tc_ratespec rate;
142 struct tc_ratespec peakrate; 142 struct tc_ratespec peakrate;
143 __u32 limit; 143 uint32_t limit;
144 __u32 buffer; 144 uint32_t buffer;
145 __u32 mtu; 145 uint32_t mtu;
146}; 146};
147 147
148enum 148enum
@@ -164,7 +164,7 @@ struct tc_sfq_qopt
164{ 164{
165 unsigned quantum; /* Bytes per round allocated to flow */ 165 unsigned quantum; /* Bytes per round allocated to flow */
166 int perturb_period; /* Period of hash perturbation */ 166 int perturb_period; /* Period of hash perturbation */
167 __u32 limit; /* Maximal packets in queue */ 167 uint32_t limit; /* Maximal packets in queue */
168 unsigned divisor; /* Hash divisor */ 168 unsigned divisor; /* Hash divisor */
169 unsigned flows; /* Maximal number of flows */ 169 unsigned flows; /* Maximal number of flows */
170}; 170};
@@ -189,9 +189,9 @@ enum
189 189
190struct tc_red_qopt 190struct tc_red_qopt
191{ 191{
192 __u32 limit; /* HARD maximal queue length (bytes) */ 192 uint32_t limit; /* HARD maximal queue length (bytes) */
193 __u32 qth_min; /* Min average length threshold (bytes) */ 193 uint32_t qth_min; /* Min average length threshold (bytes) */
194 __u32 qth_max; /* Max average length threshold (bytes) */ 194 uint32_t qth_max; /* Max average length threshold (bytes) */
195 unsigned char Wlog; /* log(W) */ 195 unsigned char Wlog; /* log(W) */
196 unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ 196 unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
197 unsigned char Scell_log; /* cell size for idle damping */ 197 unsigned char Scell_log; /* cell size for idle damping */
@@ -201,10 +201,10 @@ struct tc_red_qopt
201 201
202struct tc_red_xstats 202struct tc_red_xstats
203{ 203{
204 __u32 early; /* Early drops */ 204 uint32_t early; /* Early drops */
205 __u32 pdrop; /* Drops due to queue limits */ 205 uint32_t pdrop; /* Drops due to queue limits */
206 __u32 other; /* Drops due to drop() calls */ 206 uint32_t other; /* Drops due to drop() calls */
207 __u32 marked; /* Marked packets */ 207 uint32_t marked; /* Marked packets */
208}; 208};
209 209
210/* GRED section */ 210/* GRED section */
@@ -222,33 +222,30 @@ enum
222#define TCA_SET_OFF TCA_GRED_PARMS 222#define TCA_SET_OFF TCA_GRED_PARMS
223struct tc_gred_qopt 223struct tc_gred_qopt
224{ 224{
225 __u32 limit; /* HARD maximal queue length (bytes) 225 uint32_t limit; /* HARD maximal queue length (bytes) */
226*/ 226 uint32_t qth_min; /* Min average length threshold (bytes) */
227 __u32 qth_min; /* Min average length threshold (bytes) 227 uint32_t qth_max; /* Max average length threshold (bytes) */
228*/ 228 uint32_t DP; /* upto 2^32 DPs */
229 __u32 qth_max; /* Max average length threshold (bytes) 229 uint32_t backlog;
230*/ 230 uint32_t qave;
231 __u32 DP; /* upto 2^32 DPs */ 231 uint32_t forced;
232 __u32 backlog; 232 uint32_t early;
233 __u32 qave; 233 uint32_t other;
234 __u32 forced; 234 uint32_t pdrop;
235 __u32 early; 235
236 __u32 other; 236 unsigned char Wlog; /* log(W) */
237 __u32 pdrop;
238
239 unsigned char Wlog; /* log(W) */
240 unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ 237 unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
241 unsigned char Scell_log; /* cell size for idle damping */ 238 unsigned char Scell_log; /* cell size for idle damping */
242 __u8 prio; /* prio of this VQ */ 239 uint8_t prio; /* prio of this VQ */
243 __u32 packets; 240 uint32_t packets;
244 __u32 bytesin; 241 uint32_t bytesin;
245}; 242};
246/* gred setup */ 243/* gred setup */
247struct tc_gred_sopt 244struct tc_gred_sopt
248{ 245{
249 __u32 DPs; 246 uint32_t DPs;
250 __u32 def_DP; 247 uint32_t def_DP;
251 __u8 grio; 248 uint8_t grio;
252}; 249};
253 250
254/* HTB section */ 251/* HTB section */
@@ -257,30 +254,30 @@ struct tc_gred_sopt
257 254
258struct tc_htb_opt 255struct tc_htb_opt
259{ 256{
260 struct tc_ratespec rate; 257 struct tc_ratespec rate;
261 struct tc_ratespec ceil; 258 struct tc_ratespec ceil;
262 __u32 buffer; 259 uint32_t buffer;
263 __u32 cbuffer; 260 uint32_t cbuffer;
264 __u32 quantum; /* out only */ 261 uint32_t quantum; /* out only */
265 __u32 level; /* out only */ 262 uint32_t level; /* out only */
266 __u8 prio; 263 uint8_t prio;
267 __u8 injectd; /* inject class distance */ 264 uint8_t injectd; /* inject class distance */
268 __u8 pad[2]; 265 uint8_t pad[2];
269}; 266};
270struct tc_htb_glob 267struct tc_htb_glob
271{ 268{
272 __u32 rate2quantum; /* bps->quantum divisor */ 269 uint32_t rate2quantum; /* bps->quantum divisor */
273 __u32 defcls; /* default class number */ 270 uint32_t defcls; /* default class number */
274 __u32 use_dcache; /* use dequeue cache ? */ 271 uint32_t use_dcache; /* use dequeue cache ? */
275 __u32 debug; /* debug flags */ 272 uint32_t debug; /* debug flags */
276 273
277 274
278 /* stats */ 275 /* stats */
279 __u32 deq_rate; /* dequeue rate */ 276 uint32_t deq_rate; /* dequeue rate */
280 __u32 utilz; /* dequeue utilization */ 277 uint32_t utilz; /* dequeue utilization */
281 __u32 trials; /* deq_prio trials per dequeue */ 278 uint32_t trials; /* deq_prio trials per dequeue */
282 __u32 dcache_hits; 279 uint32_t dcache_hits;
283 __u32 direct_pkts; /* count of non shapped packets */ 280 uint32_t direct_pkts; /* count of non shapped packets */
284}; 281};
285enum 282enum
286{ 283{
@@ -292,12 +289,12 @@ enum
292}; 289};
293struct tc_htb_xstats 290struct tc_htb_xstats
294{ 291{
295 __u32 lends; 292 uint32_t lends;
296 __u32 borrows; 293 uint32_t borrows;
297 __u32 giants; /* too big packets (rate will not be accurate) */ 294 uint32_t giants; /* too big packets (rate will not be accurate) */
298 __u32 injects; /* how many times leaf used injected bw */ 295 uint32_t injects; /* how many times leaf used injected bw */
299 __u32 tokens; 296 uint32_t tokens;
300 __u32 ctokens; 297 uint32_t ctokens;
301}; 298};
302 299
303/* CBQ section */ 300/* CBQ section */
@@ -320,10 +317,10 @@ struct tc_cbq_lssopt
320#define TCF_CBQ_LSS_MINIDLE 8 317#define TCF_CBQ_LSS_MINIDLE 8
321#define TCF_CBQ_LSS_OFFTIME 0x10 318#define TCF_CBQ_LSS_OFFTIME 0x10
322#define TCF_CBQ_LSS_AVPKT 0x20 319#define TCF_CBQ_LSS_AVPKT 0x20
323 __u32 maxidle; 320 uint32_t maxidle;
324 __u32 minidle; 321 uint32_t minidle;
325 __u32 offtime; 322 uint32_t offtime;
326 __u32 avpkt; 323 uint32_t avpkt;
327}; 324};
328 325
329struct tc_cbq_wrropt 326struct tc_cbq_wrropt
@@ -332,8 +329,8 @@ struct tc_cbq_wrropt
332 unsigned char priority; 329 unsigned char priority;
333 unsigned char cpriority; 330 unsigned char cpriority;
334 unsigned char __reserved; 331 unsigned char __reserved;
335 __u32 allot; 332 uint32_t allot;
336 __u32 weight; 333 uint32_t weight;
337}; 334};
338 335
339struct tc_cbq_ovl 336struct tc_cbq_ovl
@@ -345,7 +342,7 @@ struct tc_cbq_ovl
345#define TC_CBQ_OVL_DROP 3 342#define TC_CBQ_OVL_DROP 3
346#define TC_CBQ_OVL_RCLASSIC 4 343#define TC_CBQ_OVL_RCLASSIC 4
347 unsigned char priority2; 344 unsigned char priority2;
348 __u32 penalty; 345 uint32_t penalty;
349}; 346};
350 347
351struct tc_cbq_police 348struct tc_cbq_police
@@ -357,17 +354,17 @@ struct tc_cbq_police
357 354
358struct tc_cbq_fopt 355struct tc_cbq_fopt
359{ 356{
360 __u32 split; 357 uint32_t split;
361 __u32 defmap; 358 uint32_t defmap;
362 __u32 defchange; 359 uint32_t defchange;
363}; 360};
364 361
365struct tc_cbq_xstats 362struct tc_cbq_xstats
366{ 363{
367 __u32 borrows; 364 uint32_t borrows;
368 __u32 overactions; 365 uint32_t overactions;
369 __s32 avgidle; 366 int32_t avgidle;
370 __s32 undertime; 367 int32_t undertime;
371}; 368};
372 369
373enum 370enum