diff options
author | Krishna Kumar <krkumar2@in.ibm.com> | 2009-08-31 01:20:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-31 01:20:28 -0400 |
commit | a453e0689a3ccf85c08cb89753d7685046248c5c (patch) | |
tree | a85542ee234e7b9fe4f6a4a1837d4a99139c7e73 /net/sched/sch_generic.c | |
parent | 03a9a447d2dab755b22df79b5e205fdbb9b2c851 (diff) |
pkt_sched: Fix resource limiting in pfifo_fast
pfifo_fast_enqueue has this check:
if (skb_queue_len(list) < qdisc_dev(qdisc)->tx_queue_len) {
which allows each band to enqueue upto tx_queue_len skbs for a
total of 3*tx_queue_len skbs. I am not sure if this was the
intention of limiting in qdisc.
Patch compiled and 32 simultaneous netperf testing ran fine. Also:
# tc -s qdisc show dev eth2
qdisc pfifo_fast 0: root bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 16835026752 bytes 373116 pkt (dropped 0, overlimits 0 requeues 25)
rate 0bit 0pps backlog 0b 0p requeues 25
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 6f7aebd14072..6128e6f24589 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -432,11 +432,11 @@ static inline struct sk_buff_head *band2list(struct pfifo_fast_priv *priv, | |||
432 | 432 | ||
433 | static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) | 433 | static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) |
434 | { | 434 | { |
435 | int band = prio2band[skb->priority & TC_PRIO_MAX]; | 435 | if (skb_queue_len(&qdisc->q) < qdisc_dev(qdisc)->tx_queue_len) { |
436 | struct pfifo_fast_priv *priv = qdisc_priv(qdisc); | 436 | int band = prio2band[skb->priority & TC_PRIO_MAX]; |
437 | struct sk_buff_head *list = band2list(priv, band); | 437 | struct pfifo_fast_priv *priv = qdisc_priv(qdisc); |
438 | struct sk_buff_head *list = band2list(priv, band); | ||
438 | 439 | ||
439 | if (skb_queue_len(list) < qdisc_dev(qdisc)->tx_queue_len) { | ||
440 | priv->bitmap |= (1 << band); | 440 | priv->bitmap |= (1 << band); |
441 | qdisc->q.qlen++; | 441 | qdisc->q.qlen++; |
442 | return __qdisc_enqueue_tail(skb, qdisc, list); | 442 | return __qdisc_enqueue_tail(skb, qdisc, list); |