Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.1 /net/sched/sch_gred.c

Filename:/net/sched/sch_gred.c
Lines Added:5
Lines Deleted:7
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.0-ac12  2.4.0-test7 
(Following) 2.4.5-ac19  2.4.5-ac20  2.4.5-ac21  2.4.5-ac22  2.4.5-ac23  2.4.5-ac24 

Location
[  2.4.1
  [  net
    [  sched
       o  sch_gred.c

Patch

diff -u --recursive --new-file v2.4.0/linux/net/sched/sch_gred.c linux/net/sched/sch_gred.c
--- v2.4.0/linux/net/sched/sch_gred.c   Sat Aug 12 12:09:55 2000
+++ linux/net/sched/sch_gred.c   Mon Jan 22 13:30:21 2001
@@ -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++;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.