1 diff -urN linux-libc-headers-2.6.8.0.org/include/linux/pkt_sched.h linux-libc-headers-2.6.8.0/include/linux/pkt_sched.h
2 --- linux-libc-headers-2.6.8.0.org/include/linux/pkt_sched.h 2004-08-19 21:26:04.663364128 +0200
3 +++ linux-libc-headers-2.6.8.0/include/linux/pkt_sched.h 2004-08-19 21:28:02.623431472 +0200
5 #define __LINUX_PKT_SCHED_H
10 +#include <linux/if_ether.h>
12 /* Logical priority bands not depending on specific packet scheduler.
13 Every scheduler will map them to real traffic classes, if it has
15 __u32 duplicate; /* random packet dup (0=none ~0=100%) */
16 __u32 jitter; /* random jitter in latency (us) */
21 +// A sub weight and of a class
22 +// All numbers are represented as parts of (2^64-1).
23 +struct tc_wrr_class_weight {
24 + __u64 val; // Current value (0 is not valid)
25 + __u64 decr; // Value pr bytes (2^64-1 is not valid)
26 + __u64 incr; // Value pr seconds (2^64-1 is not valid)
27 + __u64 min; // Minimal value (0 is not valid)
28 + __u64 max; // Minimal value (0 is not valid)
30 + // The time where the above information was correct:
34 +// Pakcet send when modifying a class:
35 +struct tc_wrr_class_modf {
36 + // Not-valid values are ignored.
37 + struct tc_wrr_class_weight weight1;
38 + struct tc_wrr_class_weight weight2;
41 +// Packet returned when quering a class:
42 +struct tc_wrr_class_stats {
43 + char used; // If this is false the information below is invalid
45 + struct tc_wrr_class_modf class_modf;
47 + unsigned char addr[ETH_ALEN];
48 + char usemac; // True if addr is a MAC address, else it is an IP address
49 + // (this value is only for convience, it is always the same
50 + // value as in the qdisc)
51 + int heappos; // Current heap position or 0 if not in heap
52 + __u64 penal_ls; // Penalty value in heap (ls)
53 + __u64 penal_ms; // Penalty value in heap (ms)
56 +// Qdisc-wide penalty information (boolean values - 2 not valid)
57 +struct tc_wrr_qdisc_weight {
58 + char weight_mode; // 0=No automatic change to weight
59 + // 1=Decrease normally
60 + // 2=Also multiply with number of machines
61 + // 3=Instead multiply with priority divided
62 + // with priority of the other.
66 +// Packet send when modifing a qdisc:
67 +struct tc_wrr_qdisc_modf {
68 + // Not-valid values are ignored:
69 + struct tc_wrr_qdisc_weight weight1;
70 + struct tc_wrr_qdisc_weight weight2;
73 +// Packet send when creating a qdisc:
74 +struct tc_wrr_qdisc_crt {
75 + struct tc_wrr_qdisc_modf qdisc_modf;
77 + char srcaddr; // 1=lookup source, 0=lookup destination
78 + char usemac; // 1=Classify on MAC addresses, 0=classify on IP
79 + char usemasq; // 1=Classify based on masqgrading - only valid
80 + // if usemac is zero
81 + int bands_max; // Maximal number of bands (i.e.: classes)
82 + int proxy_maxconn; // If differnt from 0 then we support proxy remapping
83 + // of packets. And this is the number of maximal
84 + // concurrent proxy connections.
87 +// Packet returned when quering a qdisc:
88 +struct tc_wrr_qdisc_stats {
89 + struct tc_wrr_qdisc_crt qdisc_crt;
91 + int nodes_in_heap; // Current number of bands wanting to send something
92 + int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen)
93 + int bands_reused; // Number of times this band has been reused.
94 + int packets_requed; // Number of times packets have been requeued.
95 + __u64 priosum; // Sum of priorities in heap where 1 is 2^32
98 +struct tc_wrr_qdisc_modf_std {
99 + // This indicates which of the tc_wrr_qdisc_modf structers this is:
100 + char proxy; // 0=This struct
102 + // Should we also change a class?
105 + // Only valid if change_class is false
106 + struct tc_wrr_qdisc_modf qdisc_modf;
108 + // Only valid if change_class is true:
109 + unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
110 + struct tc_wrr_class_modf class_modf; // The change
113 +// Used for proxyrempping:
114 +struct tc_wrr_qdisc_modf_proxy {
115 + // This indicates which of the tc_wrr_qdisc_modf structers this is:
116 + char proxy; // 1=This struct
118 + // This is 1 if the proxyremap information should be reset
121 + // changec is the number of elements in changes.
124 + // This is an array of type ProxyRemapBlock:
129 diff -urN linux-libc-headers-2.6.8.0.org/include/linux/pkt_sched.h.orig linux-libc-headers-2.6.8.0/include/linux/pkt_sched.h.orig
130 --- linux-libc-headers-2.6.8.0.org/include/linux/pkt_sched.h.orig 2004-08-19 21:25:38.160393192 +0200
131 +++ linux-libc-headers-2.6.8.0/include/linux/pkt_sched.h.orig 1970-01-01 01:00:00.000000000 +0100
133 -#ifndef __LINUX_PKT_SCHED_H
134 -#define __LINUX_PKT_SCHED_H
136 -#include <asm/types.h>
139 -/* Logical priority bands not depending on specific packet scheduler.
140 - Every scheduler will map them to real traffic classes, if it has
141 - no more precise mechanism to classify packets.
143 - These numbers have no special meaning, though their coincidence
144 - with obsolete IPv6 values is not occasional :-). New IPv6 drafts
145 - preferred full anarchy inspired by diffserv group.
147 - Note: TC_PRIO_BESTEFFORT does not mean that it is the most unhappy
148 - class, actually, as rule it will be handled with more care than
149 - filler or even bulk.
152 -#define TC_PRIO_BESTEFFORT 0
153 -#define TC_PRIO_FILLER 1
154 -#define TC_PRIO_BULK 2
155 -#define TC_PRIO_INTERACTIVE_BULK 4
156 -#define TC_PRIO_INTERACTIVE 6
157 -#define TC_PRIO_CONTROL 7
159 -#define TC_PRIO_MAX 15
161 -/* Generic queue statistics, available for all the elements.
162 - Particular schedulers may have also their private records.
167 - __u64 bytes; /* NUmber of enqueues bytes */
168 - __u32 packets; /* Number of enqueued packets */
169 - __u32 drops; /* Packets dropped because of lack of resources */
170 - __u32 overlimits; /* Number of throttle events when this
171 - * flow goes out of allocated bandwidth */
172 - __u32 bps; /* Current flow byte rate */
173 - __u32 pps; /* Current flow packet rate */
180 - signed char interval;
181 - unsigned char ewma_log;
187 - All the traffic control objects have 32bit identifiers, or "handles".
189 - They can be considered as opaque numbers from user API viewpoint,
190 - but actually they always consist of two fields: major and
191 - minor numbers, which are interpreted by kernel specially,
192 - that may be used by applications, though not recommended.
194 - F.e. qdisc handles always have minor number equal to zero,
195 - classes (or flows) have major equal to parent qdisc major, and
196 - minor uniquely identifying class inside qdisc.
198 - Macros to manipulate handles:
201 -#define TC_H_MAJ_MASK (0xFFFF0000U)
202 -#define TC_H_MIN_MASK (0x0000FFFFU)
203 -#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
204 -#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
205 -#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
207 -#define TC_H_UNSPEC (0U)
208 -#define TC_H_ROOT (0xFFFFFFFFU)
209 -#define TC_H_INGRESS (0xFFFFFFF1U)
213 - unsigned char cell_log;
214 - unsigned char __reserved;
215 - unsigned short feature;
217 - unsigned short mpu;
225 - __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */
230 -#define TCQ_PRIO_BANDS 16
234 - int bands; /* Number of bands */
235 - __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
242 - struct tc_ratespec rate;
243 - struct tc_ratespec peakrate;
260 -/* TEQL does not require any parameters */
266 - unsigned quantum; /* Bytes per round allocated to flow */
267 - int perturb_period; /* Period of hash perturbation */
268 - __u32 limit; /* Maximal packets in queue */
269 - unsigned divisor; /* Hash divisor */
270 - unsigned flows; /* Maximal number of flows */
274 - * NOTE: limit, divisor and flows are hardwired to code at the moment.
276 - * limit=flows=128, divisor=1024;
278 - * The only reason for this is efficiency, it is possible
279 - * to change these parameters in compile time.
293 - __u32 limit; /* HARD maximal queue length (bytes) */
294 - __u32 qth_min; /* Min average length threshold (bytes) */
295 - __u32 qth_max; /* Max average length threshold (bytes) */
296 - unsigned char Wlog; /* log(W) */
297 - unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
298 - unsigned char Scell_log; /* cell size for idle damping */
299 - unsigned char flags;
300 -#define TC_RED_ECN 1
303 -struct tc_red_xstats
305 - __u32 early; /* Early drops */
306 - __u32 pdrop; /* Drops due to queue limits */
307 - __u32 other; /* Drops due to drop() calls */
308 - __u32 marked; /* Marked packets */
323 -#define TCA_SET_OFF TCA_GRED_PARMS
326 - __u32 limit; /* HARD maximal queue length (bytes)
328 - __u32 qth_min; /* Min average length threshold (bytes)
330 - __u32 qth_max; /* Max average length threshold (bytes)
332 - __u32 DP; /* upto 2^32 DPs */
340 - unsigned char Wlog; /* log(W) */
341 - unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
342 - unsigned char Scell_log; /* cell size for idle damping */
343 - __u8 prio; /* prio of this VQ */
356 -#define TC_HTB_NUMPRIO 8
357 -#define TC_HTB_MAXDEPTH 8
358 -#define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */
362 - struct tc_ratespec rate;
363 - struct tc_ratespec ceil;
367 - __u32 level; /* out only */
372 - __u32 version; /* to match HTB/TC */
373 - __u32 rate2quantum; /* bps->quantum divisor */
374 - __u32 defcls; /* default class number */
375 - __u32 debug; /* debug flags */
378 - __u32 direct_pkts; /* count of non shapped packets */
388 -struct tc_htb_xstats
392 - __u32 giants; /* too big packets (rate will not be accurate) */
401 - __u16 defcls; /* default class */
404 -struct tc_service_curve
406 - __u32 m1; /* slope of the first segment in bps */
407 - __u32 d; /* x-projection of the first segment in us */
408 - __u32 m2; /* slope of the second segment in bps */
411 -struct tc_hfsc_stats
413 - __u64 work; /* total work done */
414 - __u64 rtwork; /* work done by real-time criteria */
415 - __u32 period; /* current period */
416 - __u32 level; /* class level in hierarchy */
425 - TCA_HFSC_MAX = TCA_HFSC_USC
430 -#define TC_CBQ_MAXPRIO 8
431 -#define TC_CBQ_MAXLEVEL 8
432 -#define TC_CBQ_DEF_EWMA 5
434 -struct tc_cbq_lssopt
436 - unsigned char change;
437 - unsigned char flags;
438 -#define TCF_CBQ_LSS_BOUNDED 1
439 -#define TCF_CBQ_LSS_ISOLATED 2
440 - unsigned char ewma_log;
441 - unsigned char level;
442 -#define TCF_CBQ_LSS_FLAGS 1
443 -#define TCF_CBQ_LSS_EWMA 2
444 -#define TCF_CBQ_LSS_MAXIDLE 4
445 -#define TCF_CBQ_LSS_MINIDLE 8
446 -#define TCF_CBQ_LSS_OFFTIME 0x10
447 -#define TCF_CBQ_LSS_AVPKT 0x20
454 -struct tc_cbq_wrropt
456 - unsigned char flags;
457 - unsigned char priority;
458 - unsigned char cpriority;
459 - unsigned char __reserved;
466 - unsigned char strategy;
467 -#define TC_CBQ_OVL_CLASSIC 0
468 -#define TC_CBQ_OVL_DELAY 1
469 -#define TC_CBQ_OVL_LOWPRIO 2
470 -#define TC_CBQ_OVL_DROP 3
471 -#define TC_CBQ_OVL_RCLASSIC 4
472 - unsigned char priority2;
476 -struct tc_cbq_police
478 - unsigned char police;
479 - unsigned char __res1;
480 - unsigned short __res2;
490 -struct tc_cbq_xstats
504 - TCA_CBQ_OVL_STRATEGY,
510 -#define TCA_CBQ_MAX TCA_CBQ_POLICE
512 -/* dsmark section */
516 - TCA_DSMARK_INDICES,
517 - TCA_DSMARK_DEFAULT_INDEX,
518 - TCA_DSMARK_SET_TC_INDEX,
523 -#define TCA_DSMARK_MAX TCA_DSMARK_VALUE
529 - TCA_ATM_FD, /* file/socket descriptor */
530 - TCA_ATM_PTR, /* pointer to descriptor - later */
531 - TCA_ATM_HDR, /* LL header */
532 - TCA_ATM_EXCESS, /* excess traffic class (0 for CLP) */
533 - TCA_ATM_ADDR, /* PVC address (for output only) */
534 - TCA_ATM_STATE /* VC state (ATM_VS_*; for output only) */
537 -#define TCA_ATM_MAX TCA_ATM_STATE
539 -/* Network emulator */
540 -struct tc_netem_qopt
542 - __u32 latency; /* added delay (us) */
543 - __u32 limit; /* fifo limit (packets) */
544 - __u32 loss; /* random packet loss (0=none ~0=100%) */
545 - __u32 gap; /* re-ordering gap (0 for delay all) */
546 - __u32 duplicate; /* random packet dup (0=none ~0=100%) */
547 - __u32 jitter; /* random jitter in latency (us) */