diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
| commit | 709334c87dbdb44150ce436b3d13c814db0dcae9 (patch) | |
| tree | 5861a45f70c1f283720337abd864498f5afb3dbe /include/linux/pkt_sched.h | |
| parent | 0d64b568fcd48b133721c1d322e7c51d85eb12df (diff) | |
| parent | f74890277a196949e4004fe2955e1d4fb3930f98 (diff) | |
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-linus
Diffstat (limited to 'include/linux/pkt_sched.h')
| -rw-r--r-- | include/linux/pkt_sched.h | 111 |
1 files changed, 37 insertions, 74 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d51a2b3e221e..2cfa4bc8dea6 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
| @@ -29,8 +29,7 @@ | |||
| 29 | Particular schedulers may have also their private records. | 29 | Particular schedulers may have also their private records. |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | struct tc_stats | 32 | struct tc_stats { |
| 33 | { | ||
| 34 | __u64 bytes; /* NUmber of enqueues bytes */ | 33 | __u64 bytes; /* NUmber of enqueues bytes */ |
| 35 | __u32 packets; /* Number of enqueued packets */ | 34 | __u32 packets; /* Number of enqueued packets */ |
| 36 | __u32 drops; /* Packets dropped because of lack of resources */ | 35 | __u32 drops; /* Packets dropped because of lack of resources */ |
| @@ -42,8 +41,7 @@ struct tc_stats | |||
| 42 | __u32 backlog; | 41 | __u32 backlog; |
| 43 | }; | 42 | }; |
| 44 | 43 | ||
| 45 | struct tc_estimator | 44 | struct tc_estimator { |
| 46 | { | ||
| 47 | signed char interval; | 45 | signed char interval; |
| 48 | unsigned char ewma_log; | 46 | unsigned char ewma_log; |
| 49 | }; | 47 | }; |
| @@ -75,8 +73,7 @@ struct tc_estimator | |||
| 75 | #define TC_H_ROOT (0xFFFFFFFFU) | 73 | #define TC_H_ROOT (0xFFFFFFFFU) |
| 76 | #define TC_H_INGRESS (0xFFFFFFF1U) | 74 | #define TC_H_INGRESS (0xFFFFFFF1U) |
| 77 | 75 | ||
| 78 | struct tc_ratespec | 76 | struct tc_ratespec { |
| 79 | { | ||
| 80 | unsigned char cell_log; | 77 | unsigned char cell_log; |
| 81 | unsigned char __reserved; | 78 | unsigned char __reserved; |
| 82 | unsigned short overhead; | 79 | unsigned short overhead; |
| @@ -109,8 +106,7 @@ enum { | |||
| 109 | 106 | ||
| 110 | /* FIFO section */ | 107 | /* FIFO section */ |
| 111 | 108 | ||
| 112 | struct tc_fifo_qopt | 109 | struct tc_fifo_qopt { |
| 113 | { | ||
| 114 | __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ | 110 | __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ |
| 115 | }; | 111 | }; |
| 116 | 112 | ||
| @@ -119,8 +115,7 @@ struct tc_fifo_qopt | |||
| 119 | #define TCQ_PRIO_BANDS 16 | 115 | #define TCQ_PRIO_BANDS 16 |
| 120 | #define TCQ_MIN_PRIO_BANDS 2 | 116 | #define TCQ_MIN_PRIO_BANDS 2 |
| 121 | 117 | ||
| 122 | struct tc_prio_qopt | 118 | struct tc_prio_qopt { |
| 123 | { | ||
| 124 | int bands; /* Number of bands */ | 119 | int bands; /* Number of bands */ |
| 125 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 120 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
| 126 | }; | 121 | }; |
| @@ -134,8 +129,7 @@ struct tc_multiq_qopt { | |||
| 134 | 129 | ||
| 135 | /* TBF section */ | 130 | /* TBF section */ |
| 136 | 131 | ||
| 137 | struct tc_tbf_qopt | 132 | struct tc_tbf_qopt { |
| 138 | { | ||
| 139 | struct tc_ratespec rate; | 133 | struct tc_ratespec rate; |
| 140 | struct tc_ratespec peakrate; | 134 | struct tc_ratespec peakrate; |
| 141 | __u32 limit; | 135 | __u32 limit; |
| @@ -143,8 +137,7 @@ struct tc_tbf_qopt | |||
| 143 | __u32 mtu; | 137 | __u32 mtu; |
| 144 | }; | 138 | }; |
| 145 | 139 | ||
| 146 | enum | 140 | enum { |
| 147 | { | ||
| 148 | TCA_TBF_UNSPEC, | 141 | TCA_TBF_UNSPEC, |
| 149 | TCA_TBF_PARMS, | 142 | TCA_TBF_PARMS, |
| 150 | TCA_TBF_RTAB, | 143 | TCA_TBF_RTAB, |
| @@ -161,8 +154,7 @@ enum | |||
| 161 | 154 | ||
| 162 | /* SFQ section */ | 155 | /* SFQ section */ |
| 163 | 156 | ||
| 164 | struct tc_sfq_qopt | 157 | struct tc_sfq_qopt { |
| 165 | { | ||
| 166 | unsigned quantum; /* Bytes per round allocated to flow */ | 158 | unsigned quantum; /* Bytes per round allocated to flow */ |
| 167 | int perturb_period; /* Period of hash perturbation */ | 159 | int perturb_period; /* Period of hash perturbation */ |
| 168 | __u32 limit; /* Maximal packets in queue */ | 160 | __u32 limit; /* Maximal packets in queue */ |
| @@ -170,8 +162,7 @@ struct tc_sfq_qopt | |||
| 170 | unsigned flows; /* Maximal number of flows */ | 162 | unsigned flows; /* Maximal number of flows */ |
| 171 | }; | 163 | }; |
| 172 | 164 | ||
| 173 | struct tc_sfq_xstats | 165 | struct tc_sfq_xstats { |
| 174 | { | ||
| 175 | __s32 allot; | 166 | __s32 allot; |
| 176 | }; | 167 | }; |
| 177 | 168 | ||
| @@ -186,8 +177,7 @@ struct tc_sfq_xstats | |||
| 186 | 177 | ||
| 187 | /* RED section */ | 178 | /* RED section */ |
| 188 | 179 | ||
| 189 | enum | 180 | enum { |
| 190 | { | ||
| 191 | TCA_RED_UNSPEC, | 181 | TCA_RED_UNSPEC, |
| 192 | TCA_RED_PARMS, | 182 | TCA_RED_PARMS, |
| 193 | TCA_RED_STAB, | 183 | TCA_RED_STAB, |
| @@ -196,8 +186,7 @@ enum | |||
| 196 | 186 | ||
| 197 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) | 187 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) |
| 198 | 188 | ||
| 199 | struct tc_red_qopt | 189 | struct tc_red_qopt { |
| 200 | { | ||
| 201 | __u32 limit; /* HARD maximal queue length (bytes) */ | 190 | __u32 limit; /* HARD maximal queue length (bytes) */ |
| 202 | __u32 qth_min; /* Min average length threshold (bytes) */ | 191 | __u32 qth_min; /* Min average length threshold (bytes) */ |
| 203 | __u32 qth_max; /* Max average length threshold (bytes) */ | 192 | __u32 qth_max; /* Max average length threshold (bytes) */ |
| @@ -209,8 +198,7 @@ struct tc_red_qopt | |||
| 209 | #define TC_RED_HARDDROP 2 | 198 | #define TC_RED_HARDDROP 2 |
| 210 | }; | 199 | }; |
| 211 | 200 | ||
| 212 | struct tc_red_xstats | 201 | struct tc_red_xstats { |
| 213 | { | ||
| 214 | __u32 early; /* Early drops */ | 202 | __u32 early; /* Early drops */ |
| 215 | __u32 pdrop; /* Drops due to queue limits */ | 203 | __u32 pdrop; /* Drops due to queue limits */ |
| 216 | __u32 other; /* Drops due to drop() calls */ | 204 | __u32 other; /* Drops due to drop() calls */ |
| @@ -221,8 +209,7 @@ struct tc_red_xstats | |||
| 221 | 209 | ||
| 222 | #define MAX_DPs 16 | 210 | #define MAX_DPs 16 |
| 223 | 211 | ||
| 224 | enum | 212 | enum { |
| 225 | { | ||
| 226 | TCA_GRED_UNSPEC, | 213 | TCA_GRED_UNSPEC, |
| 227 | TCA_GRED_PARMS, | 214 | TCA_GRED_PARMS, |
| 228 | TCA_GRED_STAB, | 215 | TCA_GRED_STAB, |
| @@ -232,8 +219,7 @@ enum | |||
| 232 | 219 | ||
| 233 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) | 220 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) |
| 234 | 221 | ||
| 235 | struct tc_gred_qopt | 222 | struct tc_gred_qopt { |
| 236 | { | ||
| 237 | __u32 limit; /* HARD maximal queue length (bytes) */ | 223 | __u32 limit; /* HARD maximal queue length (bytes) */ |
| 238 | __u32 qth_min; /* Min average length threshold (bytes) */ | 224 | __u32 qth_min; /* Min average length threshold (bytes) */ |
| 239 | __u32 qth_max; /* Max average length threshold (bytes) */ | 225 | __u32 qth_max; /* Max average length threshold (bytes) */ |
| @@ -253,8 +239,7 @@ struct tc_gred_qopt | |||
| 253 | }; | 239 | }; |
| 254 | 240 | ||
| 255 | /* gred setup */ | 241 | /* gred setup */ |
| 256 | struct tc_gred_sopt | 242 | struct tc_gred_sopt { |
| 257 | { | ||
| 258 | __u32 DPs; | 243 | __u32 DPs; |
| 259 | __u32 def_DP; | 244 | __u32 def_DP; |
| 260 | __u8 grio; | 245 | __u8 grio; |
| @@ -267,8 +252,7 @@ struct tc_gred_sopt | |||
| 267 | #define TC_HTB_MAXDEPTH 8 | 252 | #define TC_HTB_MAXDEPTH 8 |
| 268 | #define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */ | 253 | #define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */ |
| 269 | 254 | ||
| 270 | struct tc_htb_opt | 255 | struct tc_htb_opt { |
| 271 | { | ||
| 272 | struct tc_ratespec rate; | 256 | struct tc_ratespec rate; |
| 273 | struct tc_ratespec ceil; | 257 | struct tc_ratespec ceil; |
| 274 | __u32 buffer; | 258 | __u32 buffer; |
| @@ -277,8 +261,7 @@ struct tc_htb_opt | |||
| 277 | __u32 level; /* out only */ | 261 | __u32 level; /* out only */ |
| 278 | __u32 prio; | 262 | __u32 prio; |
| 279 | }; | 263 | }; |
| 280 | struct tc_htb_glob | 264 | struct tc_htb_glob { |
| 281 | { | ||
| 282 | __u32 version; /* to match HTB/TC */ | 265 | __u32 version; /* to match HTB/TC */ |
| 283 | __u32 rate2quantum; /* bps->quantum divisor */ | 266 | __u32 rate2quantum; /* bps->quantum divisor */ |
| 284 | __u32 defcls; /* default class number */ | 267 | __u32 defcls; /* default class number */ |
| @@ -287,8 +270,7 @@ struct tc_htb_glob | |||
| 287 | /* stats */ | 270 | /* stats */ |
| 288 | __u32 direct_pkts; /* count of non shapped packets */ | 271 | __u32 direct_pkts; /* count of non shapped packets */ |
| 289 | }; | 272 | }; |
| 290 | enum | 273 | enum { |
| 291 | { | ||
| 292 | TCA_HTB_UNSPEC, | 274 | TCA_HTB_UNSPEC, |
| 293 | TCA_HTB_PARMS, | 275 | TCA_HTB_PARMS, |
| 294 | TCA_HTB_INIT, | 276 | TCA_HTB_INIT, |
| @@ -299,8 +281,7 @@ enum | |||
| 299 | 281 | ||
| 300 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) | 282 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) |
| 301 | 283 | ||
| 302 | struct tc_htb_xstats | 284 | struct tc_htb_xstats { |
| 303 | { | ||
| 304 | __u32 lends; | 285 | __u32 lends; |
| 305 | __u32 borrows; | 286 | __u32 borrows; |
| 306 | __u32 giants; /* too big packets (rate will not be accurate) */ | 287 | __u32 giants; /* too big packets (rate will not be accurate) */ |
| @@ -310,28 +291,24 @@ struct tc_htb_xstats | |||
| 310 | 291 | ||
| 311 | /* HFSC section */ | 292 | /* HFSC section */ |
| 312 | 293 | ||
| 313 | struct tc_hfsc_qopt | 294 | struct tc_hfsc_qopt { |
| 314 | { | ||
| 315 | __u16 defcls; /* default class */ | 295 | __u16 defcls; /* default class */ |
| 316 | }; | 296 | }; |
| 317 | 297 | ||
| 318 | struct tc_service_curve | 298 | struct tc_service_curve { |
| 319 | { | ||
| 320 | __u32 m1; /* slope of the first segment in bps */ | 299 | __u32 m1; /* slope of the first segment in bps */ |
| 321 | __u32 d; /* x-projection of the first segment in us */ | 300 | __u32 d; /* x-projection of the first segment in us */ |
| 322 | __u32 m2; /* slope of the second segment in bps */ | 301 | __u32 m2; /* slope of the second segment in bps */ |
| 323 | }; | 302 | }; |
| 324 | 303 | ||
| 325 | struct tc_hfsc_stats | 304 | struct tc_hfsc_stats { |
| 326 | { | ||
| 327 | __u64 work; /* total work done */ | 305 | __u64 work; /* total work done */ |
| 328 | __u64 rtwork; /* work done by real-time criteria */ | 306 | __u64 rtwork; /* work done by real-time criteria */ |
| 329 | __u32 period; /* current period */ | 307 | __u32 period; /* current period */ |
| 330 | __u32 level; /* class level in hierarchy */ | 308 | __u32 level; /* class level in hierarchy */ |
| 331 | }; | 309 | }; |
| 332 | 310 | ||
| 333 | enum | 311 | enum { |
| 334 | { | ||
| 335 | TCA_HFSC_UNSPEC, | 312 | TCA_HFSC_UNSPEC, |
| 336 | TCA_HFSC_RSC, | 313 | TCA_HFSC_RSC, |
| 337 | TCA_HFSC_FSC, | 314 | TCA_HFSC_FSC, |
| @@ -348,8 +325,7 @@ enum | |||
| 348 | #define TC_CBQ_MAXLEVEL 8 | 325 | #define TC_CBQ_MAXLEVEL 8 |
| 349 | #define TC_CBQ_DEF_EWMA 5 | 326 | #define TC_CBQ_DEF_EWMA 5 |
| 350 | 327 | ||
| 351 | struct tc_cbq_lssopt | 328 | struct tc_cbq_lssopt { |
| 352 | { | ||
| 353 | unsigned char change; | 329 | unsigned char change; |
| 354 | unsigned char flags; | 330 | unsigned char flags; |
| 355 | #define TCF_CBQ_LSS_BOUNDED 1 | 331 | #define TCF_CBQ_LSS_BOUNDED 1 |
| @@ -368,8 +344,7 @@ struct tc_cbq_lssopt | |||
| 368 | __u32 avpkt; | 344 | __u32 avpkt; |
| 369 | }; | 345 | }; |
| 370 | 346 | ||
| 371 | struct tc_cbq_wrropt | 347 | struct tc_cbq_wrropt { |
| 372 | { | ||
| 373 | unsigned char flags; | 348 | unsigned char flags; |
| 374 | unsigned char priority; | 349 | unsigned char priority; |
| 375 | unsigned char cpriority; | 350 | unsigned char cpriority; |
| @@ -378,8 +353,7 @@ struct tc_cbq_wrropt | |||
| 378 | __u32 weight; | 353 | __u32 weight; |
| 379 | }; | 354 | }; |
| 380 | 355 | ||
| 381 | struct tc_cbq_ovl | 356 | struct tc_cbq_ovl { |
| 382 | { | ||
| 383 | unsigned char strategy; | 357 | unsigned char strategy; |
| 384 | #define TC_CBQ_OVL_CLASSIC 0 | 358 | #define TC_CBQ_OVL_CLASSIC 0 |
| 385 | #define TC_CBQ_OVL_DELAY 1 | 359 | #define TC_CBQ_OVL_DELAY 1 |
| @@ -391,30 +365,26 @@ struct tc_cbq_ovl | |||
| 391 | __u32 penalty; | 365 | __u32 penalty; |
| 392 | }; | 366 | }; |
| 393 | 367 | ||
| 394 | struct tc_cbq_police | 368 | struct tc_cbq_police { |
| 395 | { | ||
| 396 | unsigned char police; | 369 | unsigned char police; |
| 397 | unsigned char __res1; | 370 | unsigned char __res1; |
| 398 | unsigned short __res2; | 371 | unsigned short __res2; |
| 399 | }; | 372 | }; |
| 400 | 373 | ||
| 401 | struct tc_cbq_fopt | 374 | struct tc_cbq_fopt { |
| 402 | { | ||
| 403 | __u32 split; | 375 | __u32 split; |
| 404 | __u32 defmap; | 376 | __u32 defmap; |
| 405 | __u32 defchange; | 377 | __u32 defchange; |
| 406 | }; | 378 | }; |
| 407 | 379 | ||
| 408 | struct tc_cbq_xstats | 380 | struct tc_cbq_xstats { |
| 409 | { | ||
| 410 | __u32 borrows; | 381 | __u32 borrows; |
| 411 | __u32 overactions; | 382 | __u32 overactions; |
| 412 | __s32 avgidle; | 383 | __s32 avgidle; |
| 413 | __s32 undertime; | 384 | __s32 undertime; |
| 414 | }; | 385 | }; |
| 415 | 386 | ||
| 416 | enum | 387 | enum { |
| 417 | { | ||
| 418 | TCA_CBQ_UNSPEC, | 388 | TCA_CBQ_UNSPEC, |
| 419 | TCA_CBQ_LSSOPT, | 389 | TCA_CBQ_LSSOPT, |
| 420 | TCA_CBQ_WRROPT, | 390 | TCA_CBQ_WRROPT, |
| @@ -459,8 +429,7 @@ enum { | |||
| 459 | 429 | ||
| 460 | /* Network emulator */ | 430 | /* Network emulator */ |
| 461 | 431 | ||
| 462 | enum | 432 | enum { |
| 463 | { | ||
| 464 | TCA_NETEM_UNSPEC, | 433 | TCA_NETEM_UNSPEC, |
| 465 | TCA_NETEM_CORR, | 434 | TCA_NETEM_CORR, |
| 466 | TCA_NETEM_DELAY_DIST, | 435 | TCA_NETEM_DELAY_DIST, |
| @@ -471,8 +440,7 @@ enum | |||
| 471 | 440 | ||
| 472 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) | 441 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) |
| 473 | 442 | ||
| 474 | struct tc_netem_qopt | 443 | struct tc_netem_qopt { |
| 475 | { | ||
| 476 | __u32 latency; /* added delay (us) */ | 444 | __u32 latency; /* added delay (us) */ |
| 477 | __u32 limit; /* fifo limit (packets) */ | 445 | __u32 limit; /* fifo limit (packets) */ |
| 478 | __u32 loss; /* random packet loss (0=none ~0=100%) */ | 446 | __u32 loss; /* random packet loss (0=none ~0=100%) */ |
| @@ -481,21 +449,18 @@ struct tc_netem_qopt | |||
| 481 | __u32 jitter; /* random jitter in latency (us) */ | 449 | __u32 jitter; /* random jitter in latency (us) */ |
| 482 | }; | 450 | }; |
| 483 | 451 | ||
| 484 | struct tc_netem_corr | 452 | struct tc_netem_corr { |
| 485 | { | ||
| 486 | __u32 delay_corr; /* delay correlation */ | 453 | __u32 delay_corr; /* delay correlation */ |
| 487 | __u32 loss_corr; /* packet loss correlation */ | 454 | __u32 loss_corr; /* packet loss correlation */ |
| 488 | __u32 dup_corr; /* duplicate correlation */ | 455 | __u32 dup_corr; /* duplicate correlation */ |
| 489 | }; | 456 | }; |
| 490 | 457 | ||
| 491 | struct tc_netem_reorder | 458 | struct tc_netem_reorder { |
| 492 | { | ||
| 493 | __u32 probability; | 459 | __u32 probability; |
| 494 | __u32 correlation; | 460 | __u32 correlation; |
| 495 | }; | 461 | }; |
| 496 | 462 | ||
| 497 | struct tc_netem_corrupt | 463 | struct tc_netem_corrupt { |
| 498 | { | ||
| 499 | __u32 probability; | 464 | __u32 probability; |
| 500 | __u32 correlation; | 465 | __u32 correlation; |
| 501 | }; | 466 | }; |
| @@ -504,8 +469,7 @@ struct tc_netem_corrupt | |||
| 504 | 469 | ||
| 505 | /* DRR */ | 470 | /* DRR */ |
| 506 | 471 | ||
| 507 | enum | 472 | enum { |
| 508 | { | ||
| 509 | TCA_DRR_UNSPEC, | 473 | TCA_DRR_UNSPEC, |
| 510 | TCA_DRR_QUANTUM, | 474 | TCA_DRR_QUANTUM, |
| 511 | __TCA_DRR_MAX | 475 | __TCA_DRR_MAX |
| @@ -513,8 +477,7 @@ enum | |||
| 513 | 477 | ||
| 514 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) | 478 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) |
| 515 | 479 | ||
| 516 | struct tc_drr_stats | 480 | struct tc_drr_stats { |
| 517 | { | ||
| 518 | __u32 deficit; | 481 | __u32 deficit; |
| 519 | }; | 482 | }; |
| 520 | 483 | ||
