]> err.no Git - linux-2.6/commitdiff
[PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CN
authorThomas Graf <tgraf@suug.ch>
Sat, 5 Nov 2005 20:14:18 +0000 (21:14 +0100)
committerThomas Graf <tgr@axs.localdomain>
Sat, 5 Nov 2005 21:02:27 +0000 (22:02 +0100)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/sched/sch_gred.c

index 50f184cd7f1fd947fec7102ca7bae4025ab88365..f7c6c0359ce52f0d6c90d314ffa0d423e6a97b6c 100644 (file)
@@ -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