aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_red.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-24 17:09:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-24 17:09:35 -0500
commit5bdc22a56549e7983c6b443298672641952ea035 (patch)
treefbfd4e7453e4fd23dfef826d4610ed2aae47b36c /net/sched/sch_red.c
parentb6f4098897f30b7ea90a1c1edf35e9b20a9d828a (diff)
parente92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/sched/sch_hfsc.c net/sched/sch_htb.c net/sched/sch_tbf.c
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r--net/sched/sch_red.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 689157555fa4..6649463da1b6 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -93,7 +93,6 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch)
93 93
94 ret = qdisc_enqueue(skb, child); 94 ret = qdisc_enqueue(skb, child);
95 if (likely(ret == NET_XMIT_SUCCESS)) { 95 if (likely(ret == NET_XMIT_SUCCESS)) {
96 qdisc_bstats_update(sch, skb);
97 sch->q.qlen++; 96 sch->q.qlen++;
98 } else if (net_xmit_drop_count(ret)) { 97 } else if (net_xmit_drop_count(ret)) {
99 q->stats.pdrop++; 98 q->stats.pdrop++;
@@ -113,11 +112,13 @@ static struct sk_buff *red_dequeue(struct Qdisc *sch)
113 struct Qdisc *child = q->qdisc; 112 struct Qdisc *child = q->qdisc;
114 113
115 skb = child->dequeue(child); 114 skb = child->dequeue(child);
116 if (skb) 115 if (skb) {
116 qdisc_bstats_update(sch, skb);
117 sch->q.qlen--; 117 sch->q.qlen--;
118 else if (!red_is_idling(&q->parms)) 118 } else {
119 red_start_of_idle_period(&q->parms); 119 if (!red_is_idling(&q->parms))
120 120 red_start_of_idle_period(&q->parms);
121 }
121 return skb; 122 return skb;
122} 123}
123 124