This is a note to let you know that I've just added the patch titled

    net_sched: pfifo_head_drop problem

to the 2.6.37-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net_sched-pfifo_head_drop-problem.patch
and it can be found in the queue-2.6.37 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From c31d192b403aa8944c24133eea7db6de4541d24f Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Wed, 5 Jan 2011 10:35:02 +0000
Subject: net_sched: pfifo_head_drop problem


From: Eric Dumazet <[email protected]>

[ Upstream commit 44b8288308ac9da27eab7d7bdbf1375a568805c3 ]

commit 57dbb2d83d100ea (sched: add head drop fifo queue)
introduced pfifo_head_drop, and broke the invariant that
sch->bstats.bytes and sch->bstats.packets are COUNTER (increasing
counters only)

This can break estimators because est_timer() handles unsigned deltas
only. A decreasing counter can then give a huge unsigned delta.

My mid term suggestion would be to change things so that
sch->bstats.bytes and sch->bstats.packets are incremented in dequeue()
only, not at enqueue() time. We also could add drop_bytes/drop_packets
and provide estimations of drop rates.

It would be more sensible anyway for very low speeds, and big bursts.
Right now, if we drop packets, they still are accounted in byte/packets
abolute counters and rate estimators.

Before this mid term change, this patch makes pfifo_head_drop behavior
similar to other qdiscs in case of drops :
Dont decrement sch->bstats.bytes and sch->bstats.packets

Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Hagen Paul Pfeifer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/sched/sch_fifo.c |    2 --
 1 file changed, 2 deletions(-)

--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -54,8 +54,6 @@ static int pfifo_tail_enqueue(struct sk_
 
        /* queue full, remove one skb to fulfill the limit */
        skb_head = qdisc_dequeue_head(sch);
-       sch->bstats.bytes -= qdisc_pkt_len(skb_head);
-       sch->bstats.packets--;
        sch->qstats.drops++;
        kfree_skb(skb_head);
 


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.37/net_sched-pfifo_head_drop-problem.patch
queue-2.6.37/net-add-pollpri-to-sock_def_readable.patch
queue-2.6.37/ipv4-ip-defragmentation-must-be-ecn-aware.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to