From: EGAL Vincent Date: Tue, 20 Aug 2002 16:17:23 +0000 Subject: [LARTC] bug in sfq fairness MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------17452DEC6F0C72576E7E5126" Message-Id: List-Id: To: lartc@vger.kernel.org --------------17452DEC6F0C72576E7E5126 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi, I found a strange behavior with SFQ qdisc when several TCP flows start at the same time: despite having different hash values , they have a good chances to fall in the same slot which implies no more fairness than a simple FIFO. This is due to the fact that the hash table for a flow is not cleared after dequeuing a slot whith a single packet in queue and so the same slot might be shared without hash colisions. proposed patch : --- kernel/linux-2.4.18/net/sched/sch_sfq.c Tue May 7 16:22:23 2002 +++ sch_sfq.c Tue Aug 20 18:07:03 2002 @@ -343,6 +343,7 @@ if (q->qs[a].qlen == 0) { a = q->next[a]; if (a == old_a) { + q->ht[q->hash[a]] = SFQ_DEPTH; q->tail = SFQ_DEPTH; return skb; } any comments ? -- Vincent EGAL Email : egal@ipanematech.com --------------17452DEC6F0C72576E7E5126 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit hi,
I found a strange behavior with SFQ qdisc when several TCP flows start at the same time:  despite having different hash values , they have a good chances to fall in the same slot which implies no more fairness than a simple FIFO.
This is due to the fact that the hash table for a flow is not cleared after dequeuing a slot whith a single packet in queue and so the same slot might be shared without hash colisions.
proposed patch :

--- kernel/linux-2.4.18/net/sched/sch_sfq.c     Tue May  7 16:22:23 2002
+++ sch_sfq.c   Tue Aug 20 18:07:03 2002
@@ -343,6 +343,7 @@
        if (q->qs[a].qlen == 0) {
                a = q->next[a];
                if (a == old_a) {
+                       q->ht[q->hash[a]] = SFQ_DEPTH;
                        q->tail = SFQ_DEPTH;
                        return skb;
                }

any comments ?

-- 
Vincent EGAL
Email : egal@ipanematech.com
  --------------17452DEC6F0C72576E7E5126-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/