patch-2.4.1 linux/net/sched/sch_gred.c
Next file: linux/net/sunrpc/auth.c
Previous file: linux/net/sched/sch_dsmark.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Mon Jan 22 13:30:21 2001
- Orig file:
v2.4.0/linux/net/sched/sch_gred.c
- Orig date:
Sat Aug 12 12:09:55 2000
diff -u --recursive --new-file v2.4.0/linux/net/sched/sch_gred.c linux/net/sched/sch_gred.c
@@ -110,12 +110,9 @@
unsigned long qave=0;
int i=0;
- if (!t->initd) {
- DPRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
- if (q->backlog <= q->limit) {
- __skb_queue_tail(&sch->q, skb);
- return NET_XMIT_DROP; /* @@@@ */
- }
+ if (!t->initd && skb_queue_len(&sch->q) <= sch->dev->tx_queue_len) {
+ D2PRINTK("NO GRED Queues setup yet! Enqueued anyway\n");
+ goto do_enqueue;
}
@@ -179,11 +176,12 @@
q->qcount = -1;
enqueue:
if (q->backlog <= q->limit) {
+ q->backlog += skb->len;
+do_enqueue:
__skb_queue_tail(&sch->q, skb);
sch->stats.backlog += skb->len;
sch->stats.bytes += skb->len;
sch->stats.packets++;
- q->backlog += skb->len;
return 0;
} else {
q->pdrop++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)