sch_sfq: revert dont put new flow at the end of flows
[pandora-kernel.git] / net / sched / sch_sfq.c
index 60d4718..02a21ab 100644 (file)
@@ -469,11 +469,15 @@ enqueue:
        if (slot->qlen == 1) {          /* The flow is new */
                if (q->tail == NULL) {  /* It is the first flow */
                        slot->next = x;
-                       q->tail = slot;
                } else {
                        slot->next = q->tail->next;
                        q->tail->next = x;
                }
+               /* We put this flow at the end of our flow list.
+                * This might sound unfair for a new flow to wait after old ones,
+                * but we could endup servicing new flows only, and freeze old ones.
+                */
+               q->tail = slot;
                /* We could use a bigger initial quantum for new flows */
                slot->allot = q->scaled_quantum;
        }