diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-07-29 19:22:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-15 18:31:38 -0700 |
commit | 956c35400bfa51940de15ff7c31b7bba298f1dfe (patch) | |
tree | 4777d846111b08e11b40ad8f3f53fcfabfefd618 | |
parent | b1d3755791db359c3827c59248d9aa5f5f430931 (diff) | |
download | kernel_samsung_crespo-956c35400bfa51940de15ff7c31b7bba298f1dfe.zip kernel_samsung_crespo-956c35400bfa51940de15ff7c31b7bba298f1dfe.tar.gz kernel_samsung_crespo-956c35400bfa51940de15ff7c31b7bba298f1dfe.tar.bz2 |
sch_sfq: fix sfq_enqueue()
[ Upstream commit e1738bd9cecc5c867b0e2996470c1ff20f66ba79 ]
commit 8efa88540635 (sch_sfq: avoid giving spurious NET_XMIT_CN signals)
forgot to call qdisc_tree_decrease_qlen() to signal upper levels that a
packet (from another flow) was dropped, leading to various problems.
With help from Michal Soltys and Michal Pokrywka, who did a bisection.
Bugzilla ref: https://bugzilla.kernel.org/show_bug.cgi?id=39372
Debian ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631945
Reported-by: Lucas Bocchi <lucas.bocchi@gmail.com>
Reported-and-bisected-by: Michal Pokrywka <wolfmoon@o2.pl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Michal Soltys <soltys@ziu.info>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | net/sched/sch_sfq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index b6ea6af..69400e3 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) /* Return Congestion Notification only if we dropped a packet * from this flow. */ - return (qlen != slot->qlen) ? NET_XMIT_CN : NET_XMIT_SUCCESS; + if (qlen != slot->qlen) + return NET_XMIT_CN; + + /* As we dropped a packet, better let upper stack know this */ + qdisc_tree_decrease_qlen(sch, 1); + return NET_XMIT_SUCCESS; } static struct sk_buff * |