[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in sch_gred.c



Rui Prior wrote:
> I think I found a bug in sch_gred.c. At the beginning of gred_enqueue() we 
> can read:

Highly suspicious indeed. Jamal, could the following untested patch
(2.4.0-test11) do what you meant ? Also, why NET_XMIT_DROP ?

- Werner

------------------------------------ patch ------------------------------------

--- linux.orig/net/sched/sch_gred.c	Sat Aug 12 21:09:55 2000
+++ linux/net/sched/sch_gred.c	Mon Nov 20 13:42:41 2000
@@ -112,7 +112,7 @@
 
 	if (!t->initd) {
 		DPRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
-		if (q->backlog <= q->limit) {
+		if (skb_queue_len(&sch->q) <= sch->dev->tx_queue_len) {
 			__skb_queue_tail(&sch->q, skb);
 			return NET_XMIT_DROP; /* @@@@ */
 		}

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH           Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/