aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2005-11-05 15:14:18 -0500
committerThomas Graf <tgr@axs.localdomain>2005-11-05 16:02:27 -0500
commitc3b553cdaf50ce915bcd995fa8ec2905f227de64 (patch)
treeb85ff8cb0b93499259c59f9d5c57f31ab53b937b /net/sched
parent301d063c2915e8307e3d128245d8a393ad776539 (diff)
[PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CN
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_gred.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 50f184cd7f1f..f7c6c0359ce5 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -219,12 +219,12 @@ gred_enqueue(struct sk_buff *skb, struct Qdisc* sch)
219 case RED_PROB_MARK: 219 case RED_PROB_MARK:
220 sch->qstats.overlimits++; 220 sch->qstats.overlimits++;
221 q->stats.prob_drop++; 221 q->stats.prob_drop++;
222 goto drop; 222 goto congestion_drop;
223 223
224 case RED_HARD_MARK: 224 case RED_HARD_MARK:
225 sch->qstats.overlimits++; 225 sch->qstats.overlimits++;
226 q->stats.forced_drop++; 226 q->stats.forced_drop++;
227 goto drop; 227 goto congestion_drop;
228 } 228 }
229 229
230 if (q->backlog + skb->len <= q->limit) { 230 if (q->backlog + skb->len <= q->limit) {
@@ -242,6 +242,11 @@ drop:
242 kfree_skb(skb); 242 kfree_skb(skb);
243 sch->qstats.drops++; 243 sch->qstats.drops++;
244 return NET_XMIT_DROP; 244 return NET_XMIT_DROP;
245
246congestion_drop:
247 kfree_skb(skb);
248 sch->qstats.drops++;
249 return NET_XMIT_CN;
245} 250}
246 251
247static int 252static int