Commit e1738bd9 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

sch_sfq: fix sfq_enqueue()

commit 8efa8854 (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=631945Reported-by: default avatarLucas Bocchi <lucas.bocchi@gmail.com>
Reported-and-bisected-by: default avatarMichal Pokrywka <wolfmoon@o2.pl>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
CC: Michal Soltys <soltys@ziu.info>
Acked-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 956837f7
...@@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) ...@@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
/* Return Congestion Notification only if we dropped a packet /* Return Congestion Notification only if we dropped a packet
* from this flow. * 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 * static struct sk_buff *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment