Skip to content

Commit

Permalink
[PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CN
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Thomas Graf authored and Thomas Graf committed Nov 5, 2005
1 parent 301d063 commit c3b553c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net/sched/sch_gred.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -242,6 +242,11 @@ gred_enqueue(struct sk_buff *skb, struct Qdisc* sch)
kfree_skb(skb);
sch->qstats.drops++;
return NET_XMIT_DROP;

congestion_drop:
kfree_skb(skb);
sch->qstats.drops++;
return NET_XMIT_CN;
}

static int
Expand Down

0 comments on commit c3b553c

Please sign in to comment.