From: Thomas Graf Date: Sat, 5 Nov 2005 20:14:18 +0000 (+0100) Subject: [PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CN X-Git-Tag: v2.6.15-rc1~452^2^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3b553cdaf50ce915bcd995fa8ec2905f227de64;p=linux-2.6 [PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CN Signed-off-by: Thomas Graf Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 50f184cd7f..f7c6c0359c 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) case RED_PROB_MARK: sch->qstats.overlimits++; q->stats.prob_drop++; - goto drop; + goto congestion_drop; case RED_HARD_MARK: sch->qstats.overlimits++; q->stats.forced_drop++; - goto drop; + goto congestion_drop; } if (q->backlog + skb->len <= q->limit) { @@ -242,6 +242,11 @@ drop: kfree_skb(skb); sch->qstats.drops++; return NET_XMIT_DROP; + +congestion_drop: + kfree_skb(skb); + sch->qstats.drops++; + return NET_XMIT_CN; } static int