aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-01-21 19:26:09 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-21 19:26:09 -0500
commit23624935e0c4b04730ed8d7d21f0cd25b2c2cda1 (patch)
tree3fedc885d6bcd72c94fc239ae2ef98937f77c722 /net/sched/sch_generic.c
parentbb134d2298b49f50cf6d9388410fba96272905dc (diff)
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index cc17e794c41e..0da09d508737 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)
527 for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) 527 for (prio = 0; prio < PFIFO_FAST_BANDS; prio++)
528 skb_queue_head_init(band2list(priv, prio)); 528 skb_queue_head_init(band2list(priv, prio));
529 529
530 /* Can by-pass the queue discipline */
531 qdisc->flags |= TCQ_F_CAN_BYPASS;
530 return 0; 532 return 0;
531} 533}
532 534
@@ -691,9 +693,6 @@ static void attach_one_default_qdisc(struct net_device *dev,
691 netdev_info(dev, "activation failed\n"); 693 netdev_info(dev, "activation failed\n");
692 return; 694 return;
693 } 695 }
694
695 /* Can by-pass the queue discipline for default qdisc */
696 qdisc->flags |= TCQ_F_CAN_BYPASS;
697 } 696 }
698 dev_queue->qdisc_sleeping = qdisc; 697 dev_queue->qdisc_sleeping = qdisc;
699} 698}