[Codel] [PATCH net-next] fq_codel: report congestion notification at enqueue time
Eric Dumazet
eric.dumazet at gmail.com
Fri Jun 29 01:24:08 EDT 2012
On Thu, 2012-06-28 at 22:12 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet at gmail.com>
> Date: Fri, 29 Jun 2012 06:53:12 +0200
>
> > Please dont apply this patch, I'll submit an updated version later.
>
> Ok.
By the way, I am not sure NET_XMIT_CN is correctly used in RED.
Or maybe my understanding of NET_XMIT_CN is wrong.
If a the packet is dropped in enqueue(), why use NET_XMIT_CN instead of
NET_XMIT_DROP ?
This seems to mean : I dropped _this_ packet, but dont worry too much, I
might accept other packets, so please go on...
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 633e32d..0fc5b6c 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -77,7 +77,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch)
sch->qstats.overlimits++;
if (!red_use_ecn(q) || !INET_ECN_set_ce(skb)) {
q->stats.prob_drop++;
- goto congestion_drop;
+ goto drop;
}
q->stats.prob_mark++;
@@ -88,7 +88,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (red_use_harddrop(q) || !red_use_ecn(q) ||
!INET_ECN_set_ce(skb)) {
q->stats.forced_drop++;
- goto congestion_drop;
+ goto drop;
}
q->stats.forced_mark++;
@@ -104,9 +104,8 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch)
}
return ret;
-congestion_drop:
- qdisc_drop(skb, sch);
- return NET_XMIT_CN;
+drop:
+ return qdisc_drop(skb, sch);
}
static struct sk_buff *red_dequeue(struct Qdisc *sch)
More information about the Codel
mailing list