Skip to content

Commit

Permalink
added SFB net scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
DooMLoRD committed Nov 17, 2011
1 parent fb5b221 commit 40aa122
Show file tree
Hide file tree
Showing 4 changed files with 720 additions and 0 deletions.
53 changes: 53 additions & 0 deletions include/net/sfb.h
@@ -0,0 +1,53 @@
/*
* sfb.h Stochastic Fair Blue
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Authors: Juliusz Chroboczek <jch@pps.jussieu.fr>
*/

#include <linux/types.h>

#define MAXHASHES 12
#define MAXBUCKETS 32

enum
{
TCA_SFB_UNSPEC,
TCA_SFB_PARMS,
__TCA_SFB_MAX,
};

#define TCA_SFB_MAX (__TCA_SFB_MAX - 1)

enum {
SFB_HASH_FLOW,
SFB_HASH_SOURCE,
SFB_HASH_DEST,
SFB_HASH_SOURCE_DEST,
__SFB_HASH_MAX,
};

struct tc_sfb_qopt
{
__u8 hash_type, pad;
__u16 numhashes, numbuckets;
__u16 rehash_interval, db_interval;
__u16 max, target;
__u16 increment, decrement;
__u16 pad2;
__u32 limit;
__u32 penalty_rate, penalty_burst;
};

struct tc_sfb_xstats
{
__u32 earlydrop, penaltydrop, bucketdrop, queuedrop, marked;
__u16 maxqlen, maxprob;
};

#define SFB_MAX_PROB 0xFFFF

8 changes: 8 additions & 0 deletions net/sched/Kconfig
Expand Up @@ -126,6 +126,14 @@ config NET_SCH_RED
To compile this code as a module, choose M here: the
module will be called sch_red.

config NET_SCH_SFB
tristate "Stochastic Fair Blue (SFB)"
---help---
Say Y here if you want to use the Stochastic Fair Blue (SFB)
packet scheduling algorithm.

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

config NET_SCH_SFQ
tristate "Stochastic Fairness Queueing (SFQ)"
---help---
Expand Down
1 change: 1 addition & 0 deletions net/sched/Makefile
Expand Up @@ -23,6 +23,7 @@ obj-$(CONFIG_NET_SCH_RED) += sch_red.o
obj-$(CONFIG_NET_SCH_GRED) += sch_gred.o
obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o
obj-$(CONFIG_NET_SCH_DSMARK) += sch_dsmark.o
obj-$(CONFIG_NET_SCH_SFB) += sch_sfb.o
obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o
Expand Down

0 comments on commit 40aa122

Please sign in to comment.