diff options
Diffstat (limited to 'include/linux/pkt_sched.h')
-rw-r--r-- | include/linux/pkt_sched.h | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 7281d5acf2f9..0d5b79365d03 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -162,25 +162,44 @@ struct tc_sfq_qopt { | |||
162 | unsigned flows; /* Maximal number of flows */ | 162 | unsigned flows; /* Maximal number of flows */ |
163 | }; | 163 | }; |
164 | 164 | ||
165 | struct tc_sfqred_stats { | ||
166 | __u32 prob_drop; /* Early drops, below max threshold */ | ||
167 | __u32 forced_drop; /* Early drops, after max threshold */ | ||
168 | __u32 prob_mark; /* Marked packets, below max threshold */ | ||
169 | __u32 forced_mark; /* Marked packets, after max threshold */ | ||
170 | __u32 prob_mark_head; /* Marked packets, below max threshold */ | ||
171 | __u32 forced_mark_head;/* Marked packets, after max threshold */ | ||
172 | }; | ||
173 | |||
174 | struct tc_sfq_qopt_v1 { | ||
175 | struct tc_sfq_qopt v0; | ||
176 | unsigned int depth; /* max number of packets per flow */ | ||
177 | unsigned int headdrop; | ||
178 | /* SFQRED parameters */ | ||
179 | __u32 limit; /* HARD maximal flow queue length (bytes) */ | ||
180 | __u32 qth_min; /* Min average length threshold (bytes) */ | ||
181 | __u32 qth_max; /* Max average length threshold (bytes) */ | ||
182 | unsigned char Wlog; /* log(W) */ | ||
183 | unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ | ||
184 | unsigned char Scell_log; /* cell size for idle damping */ | ||
185 | unsigned char flags; | ||
186 | __u32 max_P; /* probability, high resolution */ | ||
187 | /* SFQRED stats */ | ||
188 | struct tc_sfqred_stats stats; | ||
189 | }; | ||
190 | |||
191 | |||
165 | struct tc_sfq_xstats { | 192 | struct tc_sfq_xstats { |
166 | __s32 allot; | 193 | __s32 allot; |
167 | }; | 194 | }; |
168 | 195 | ||
169 | /* | ||
170 | * NOTE: limit, divisor and flows are hardwired to code at the moment. | ||
171 | * | ||
172 | * limit=flows=128, divisor=1024; | ||
173 | * | ||
174 | * The only reason for this is efficiency, it is possible | ||
175 | * to change these parameters in compile time. | ||
176 | */ | ||
177 | |||
178 | /* RED section */ | 196 | /* RED section */ |
179 | 197 | ||
180 | enum { | 198 | enum { |
181 | TCA_RED_UNSPEC, | 199 | TCA_RED_UNSPEC, |
182 | TCA_RED_PARMS, | 200 | TCA_RED_PARMS, |
183 | TCA_RED_STAB, | 201 | TCA_RED_STAB, |
202 | TCA_RED_MAX_P, | ||
184 | __TCA_RED_MAX, | 203 | __TCA_RED_MAX, |
185 | }; | 204 | }; |
186 | 205 | ||
@@ -194,8 +213,9 @@ struct tc_red_qopt { | |||
194 | unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ | 213 | unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ |
195 | unsigned char Scell_log; /* cell size for idle damping */ | 214 | unsigned char Scell_log; /* cell size for idle damping */ |
196 | unsigned char flags; | 215 | unsigned char flags; |
197 | #define TC_RED_ECN 1 | 216 | #define TC_RED_ECN 1 |
198 | #define TC_RED_HARDDROP 2 | 217 | #define TC_RED_HARDDROP 2 |
218 | #define TC_RED_ADAPTATIVE 4 | ||
199 | }; | 219 | }; |
200 | 220 | ||
201 | struct tc_red_xstats { | 221 | struct tc_red_xstats { |
@@ -214,6 +234,7 @@ enum { | |||
214 | TCA_GRED_PARMS, | 234 | TCA_GRED_PARMS, |
215 | TCA_GRED_STAB, | 235 | TCA_GRED_STAB, |
216 | TCA_GRED_DPS, | 236 | TCA_GRED_DPS, |
237 | TCA_GRED_MAX_P, | ||
217 | __TCA_GRED_MAX, | 238 | __TCA_GRED_MAX, |
218 | }; | 239 | }; |
219 | 240 | ||
@@ -253,6 +274,7 @@ enum { | |||
253 | TCA_CHOKE_UNSPEC, | 274 | TCA_CHOKE_UNSPEC, |
254 | TCA_CHOKE_PARMS, | 275 | TCA_CHOKE_PARMS, |
255 | TCA_CHOKE_STAB, | 276 | TCA_CHOKE_STAB, |
277 | TCA_CHOKE_MAX_P, | ||
256 | __TCA_CHOKE_MAX, | 278 | __TCA_CHOKE_MAX, |
257 | }; | 279 | }; |
258 | 280 | ||
@@ -465,6 +487,7 @@ enum { | |||
465 | TCA_NETEM_REORDER, | 487 | TCA_NETEM_REORDER, |
466 | TCA_NETEM_CORRUPT, | 488 | TCA_NETEM_CORRUPT, |
467 | TCA_NETEM_LOSS, | 489 | TCA_NETEM_LOSS, |
490 | TCA_NETEM_RATE, | ||
468 | __TCA_NETEM_MAX, | 491 | __TCA_NETEM_MAX, |
469 | }; | 492 | }; |
470 | 493 | ||
@@ -495,6 +518,13 @@ struct tc_netem_corrupt { | |||
495 | __u32 correlation; | 518 | __u32 correlation; |
496 | }; | 519 | }; |
497 | 520 | ||
521 | struct tc_netem_rate { | ||
522 | __u32 rate; /* byte/s */ | ||
523 | __s32 packet_overhead; | ||
524 | __u32 cell_size; | ||
525 | __s32 cell_overhead; | ||
526 | }; | ||
527 | |||
498 | enum { | 528 | enum { |
499 | NETEM_LOSS_UNSPEC, | 529 | NETEM_LOSS_UNSPEC, |
500 | NETEM_LOSS_GI, /* General Intuitive - 4 state model */ | 530 | NETEM_LOSS_GI, /* General Intuitive - 4 state model */ |