Skip to content

Commit

Permalink
Stochastic Fair Blue (SFB) v3
Browse files Browse the repository at this point in the history
  • Loading branch information
kangtastic committed Oct 18, 2011
1 parent 97dce89 commit 340d456
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 410 deletions.
38 changes: 38 additions & 0 deletions src/kernel/include/linux/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,42 @@ struct tc_drr_stats {
__u32 deficit;
};

/* SFB */

enum {
TCA_SFB_UNSPEC,
TCA_SFB_PARMS,
__TCA_SFB_MAX,
};

#define TCA_SFB_MAX (__TCA_SFB_MAX - 1)

/*
* Note: increment, decrement are Q0.16 fixed-point values.
*/
struct tc_sfb_qopt {
__u32 rehash_interval; /* delay between hash flip, in seconds */
__u32 db_interval; /* double buffering interval in seconds (db_interval < rehash_interval) */
__u32 max; /* max len of qlen_min */
__u32 target; /* bin_size */
__u32 increment; /* delta, (d1 in Blue) */
__u32 decrement; /* delta, (d2 in Blue) */
__u32 limit; /* max SFB queue length */
__u32 penalty_rate;
__u32 penalty_burst;
};

struct tc_sfb_xstats {
__u32 earlydrop;
__u32 penaltydrop;
__u32 bucketdrop;
__u32 queuedrop;
__u32 childdrop; /* drops in child qdisc */
__u32 marked;
__u32 maxqlen;
__u32 maxprob;
};

#define SFB_MAX_PROB 0xFFFF

#endif
1 change: 1 addition & 0 deletions src/kernel/include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ struct tcf_proto {

struct qdisc_skb_cb {
unsigned int pkt_len;
unsigned int sfb_classid;
char data[];
};

Expand Down
3 changes: 3 additions & 0 deletions src/kernel/net/sched/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ config NET_SCH_SFB

See the top of <file:net/sched/sch_sfb.c> for more details.

To compile this code as a module, choose M here: the
module will be called sch_sfb.

config NET_SCH_SFQ
tristate "Stochastic Fairness Queueing (SFQ)"
---help---
Expand Down
Loading

0 comments on commit 340d456

Please sign in to comment.