diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-01-21 16:26:09 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-21 16:26:09 -0800 |
commit | 23624935e0c4b04730ed8d7d21f0cd25b2c2cda1 (patch) | |
tree | 3fedc885d6bcd72c94fc239ae2ef98937f77c722 /net/sched/sch_generic.c | |
parent | bb134d2298b49f50cf6d9388410fba96272905dc (diff) | |
download | kernel_samsung_crespo-23624935e0c4b04730ed8d7d21f0cd25b2c2cda1.zip kernel_samsung_crespo-23624935e0c4b04730ed8d7d21f0cd25b2c2cda1.tar.gz kernel_samsung_crespo-23624935e0c4b04730ed8d7d21f0cd25b2c2cda1.tar.bz2 |
net_sched: TCQ_F_CAN_BYPASS generalization
Now qdisc stab is handled before TCQ_F_CAN_BYPASS test in
__dev_xmit_skb(), we can generalize TCQ_F_CAN_BYPASS to other qdiscs
than pfifo_fast : pfifo, bfifo, pfifo_head_drop and sfq
SFQ is special because it can have external classifiers, and in these
cases, we cannot bypass queue discipline (packet could be dropped by
classifier) without admin asking it, or further changes.
Its worth doing this, especially for SFQ, avoiding dirtying memory in
case no packets are already waiting in queue.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index cc17e79..0da09d5 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -527,6 +527,8 @@ static int pfifo_fast_init(struct Qdisc *qdisc, struct nlattr *opt) for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) skb_queue_head_init(band2list(priv, prio)); + /* Can by-pass the queue discipline */ + qdisc->flags |= TCQ_F_CAN_BYPASS; return 0; } @@ -691,9 +693,6 @@ static void attach_one_default_qdisc(struct net_device *dev, netdev_info(dev, "activation failed\n"); return; } - - /* Can by-pass the queue discipline for default qdisc */ - qdisc->flags |= TCQ_F_CAN_BYPASS; } dev_queue->qdisc_sleeping = qdisc; } |