]>
Commit | Line | Data |
---|---|---|
6c56eb00 PS |
1 | --- linux-libc-headers-2.6.4.0/include/linux/pkt_sched.h.orig 2004-02-29 17:36:03.000000000 +0100 |
2 | +++ linux-libc-headers-2.6.4.0/include/linux/pkt_sched.h 2004-04-04 16:40:51.229766592 +0200 | |
3 | @@ -27,6 +27,8 @@ | |
4 | Particular schedulers may have also their private records. | |
5 | */ | |
6 | ||
7 | +#include <linux/types.h> | |
8 | + | |
9 | struct tc_stats | |
10 | { | |
11 | __u64 bytes; /* NUmber of enqueues bytes */ | |
12 | @@ -154,6 +156,13 @@ | |
13 | ||
14 | /* SFQ section */ | |
15 | ||
16 | +enum | |
17 | +{ | |
18 | + TCA_SFQ_HASH_CLASSIC, | |
19 | + TCA_SFQ_HASH_DST, | |
20 | + TCA_SFQ_HASH_SRC, | |
21 | +}; | |
22 | + | |
23 | struct tc_sfq_qopt | |
24 | { | |
25 | unsigned quantum; /* Bytes per round allocated to flow */ | |
26 | @@ -161,6 +170,7 @@ | |
27 | __u32 limit; /* Maximal packets in queue */ | |
28 | unsigned divisor; /* Hash divisor */ | |
29 | unsigned flows; /* Maximal number of flows */ | |
30 | + unsigned hash_kind; /* Hash function to use for flow identification */ | |
31 | }; | |
32 | ||
33 | /* | |
34 | @@ -170,6 +180,8 @@ | |
35 | * | |
36 | * The only reason for this is efficiency, it is possible | |
37 | * to change these parameters in compile time. | |
38 | + * | |
39 | + * If you need to play with this values use esfq. | |
40 | */ | |
41 | ||
42 | /* RED section */ | |
43 | @@ -429,4 +441,116 @@ | |
44 | ||
45 | #define TCA_ATM_MAX TCA_ATM_STATE | |
46 | ||
47 | +/* WRR section */ | |
48 | + | |
49 | +/* Other includes */ | |
50 | +#include <linux/if_ether.h> | |
51 | + | |
52 | +// A sub weight and of a class | |
53 | +// All numbers are represented as parts of (2^64-1). | |
54 | +struct tc_wrr_class_weight { | |
55 | + __u64 val; // Current value (0 is not valid) | |
56 | + __u64 decr; // Value pr bytes (2^64-1 is not valid) | |
57 | + __u64 incr; // Value pr seconds (2^64-1 is not valid) | |
58 | + __u64 min; // Minimal value (0 is not valid) | |
59 | + __u64 max; // Minimal value (0 is not valid) | |
60 | + | |
61 | + // The time where the above information was correct: | |
62 | + time_t tim; | |
63 | +}; | |
64 | + | |
65 | +// Pakcet send when modifying a class: | |
66 | +struct tc_wrr_class_modf { | |
67 | + // Not-valid values are ignored. | |
68 | + struct tc_wrr_class_weight weight1; | |
69 | + struct tc_wrr_class_weight weight2; | |
70 | +}; | |
71 | + | |
72 | +// Packet returned when quering a class: | |
73 | +struct tc_wrr_class_stats { | |
74 | + char used; // If this is false the information below is invalid | |
75 | + | |
76 | + struct tc_wrr_class_modf class_modf; | |
77 | + | |
78 | + unsigned char addr[ETH_ALEN]; | |
79 | + char usemac; // True if addr is a MAC address, else it is an IP address | |
80 | + // (this value is only for convience, it is always the same | |
81 | + // value as in the qdisc) | |
82 | + int heappos; // Current heap position or 0 if not in heap | |
83 | + __u64 penal_ls; // Penalty value in heap (ls) | |
84 | + __u64 penal_ms; // Penalty value in heap (ms) | |
85 | +}; | |
86 | + | |
87 | +// Qdisc-wide penalty information (boolean values - 2 not valid) | |
88 | +struct tc_wrr_qdisc_weight { | |
89 | + char weight_mode; // 0=No automatic change to weight | |
90 | + // 1=Decrease normally | |
91 | + // 2=Also multiply with number of machines | |
92 | + // 3=Instead multiply with priority divided | |
93 | + // with priority of the other. | |
94 | + // -1=no change | |
95 | +}; | |
96 | + | |
97 | +// Packet send when modifing a qdisc: | |
98 | +struct tc_wrr_qdisc_modf { | |
99 | + // Not-valid values are ignored: | |
100 | + struct tc_wrr_qdisc_weight weight1; | |
101 | + struct tc_wrr_qdisc_weight weight2; | |
102 | +}; | |
103 | + | |
104 | +// Packet send when creating a qdisc: | |
105 | +struct tc_wrr_qdisc_crt { | |
106 | + struct tc_wrr_qdisc_modf qdisc_modf; | |
107 | + | |
108 | + char srcaddr; // 1=lookup source, 0=lookup destination | |
109 | + char usemac; // 1=Classify on MAC addresses, 0=classify on IP | |
110 | + char usemasq; // 1=Classify based on masqgrading - only valid | |
111 | + // if usemac is zero | |
112 | + int bands_max; // Maximal number of bands (i.e.: classes) | |
113 | + int proxy_maxconn; // If differnt from 0 then we support proxy remapping | |
114 | + // of packets. And this is the number of maximal | |
115 | + // concurrent proxy connections. | |
116 | +}; | |
117 | + | |
118 | +// Packet returned when quering a qdisc: | |
119 | +struct tc_wrr_qdisc_stats { | |
120 | + struct tc_wrr_qdisc_crt qdisc_crt; | |
121 | + int proxy_curconn; | |
122 | + int nodes_in_heap; // Current number of bands wanting to send something | |
123 | + int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen) | |
124 | + int bands_reused; // Number of times this band has been reused. | |
125 | + int packets_requed; // Number of times packets have been requeued. | |
126 | + __u64 priosum; // Sum of priorities in heap where 1 is 2^32 | |
127 | +}; | |
128 | + | |
129 | +struct tc_wrr_qdisc_modf_std { | |
130 | + // This indicates which of the tc_wrr_qdisc_modf structers this is: | |
131 | + char proxy; // 0=This struct | |
132 | + | |
133 | + // Should we also change a class? | |
134 | + char change_class; | |
135 | + | |
136 | + // Only valid if change_class is false | |
137 | + struct tc_wrr_qdisc_modf qdisc_modf; | |
138 | + | |
139 | + // Only valid if change_class is true: | |
140 | + unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0) | |
141 | + struct tc_wrr_class_modf class_modf; // The change | |
142 | +}; | |
143 | + | |
144 | +// Used for proxyrempping: | |
145 | +struct tc_wrr_qdisc_modf_proxy { | |
146 | + // This indicates which of the tc_wrr_qdisc_modf structers this is: | |
147 | + char proxy; // 1=This struct | |
148 | + | |
149 | + // This is 1 if the proxyremap information should be reset | |
150 | + char reset; | |
151 | + | |
152 | + // changec is the number of elements in changes. | |
153 | + int changec; | |
154 | + | |
155 | + // This is an array of type ProxyRemapBlock: | |
156 | + long changes[0]; | |
157 | +}; | |
158 | + | |
159 | #endif |