[kernel] fix gpiommc build failure with 3.2
[openwrt.git] / target / linux / generic / patches-2.6.39 / 622-sched_sfq_fix_enqueue.patch
1 From: Eric Dumazet <eric.dumazet@gmail.com>
2 Date: Fri, 29 Jul 2011 19:22:42 +0000 (+0000)
3 Subject: sch_sfq: fix sfq_enqueue()
4 X-Git-Tag: v3.1-rc1~24^2~29
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e1738bd9cecc5c867b0e2996470c1ff20f66ba79
6
7 sch_sfq: fix sfq_enqueue()
8
9 commit 8efa88540635 (sch_sfq: avoid giving spurious NET_XMIT_CN signals)
10 forgot to call qdisc_tree_decrease_qlen() to signal upper levels that a
11 packet (from another flow) was dropped, leading to various problems.
12
13 With help from Michal Soltys and Michal Pokrywka, who did a bisection.
14
15 Bugzilla ref: https://bugzilla.kernel.org/show_bug.cgi?id=39372
16 Debian ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631945
17
18 Reported-by: Lucas Bocchi <lucas.bocchi@gmail.com>
19 Reported-and-bisected-by: Michal Pokrywka <wolfmoon@o2.pl>
20 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
21 CC: Michal Soltys <soltys@ziu.info>
22 Acked-by: Patrick McHardy <kaber@trash.net>
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 ---
25
26 --- a/net/sched/sch_sfq.c
27 +++ b/net/sched/sch_sfq.c
28 @@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct
29 /* Return Congestion Notification only if we dropped a packet
30 * from this flow.
31 */
32 - return (qlen != slot->qlen) ? NET_XMIT_CN : NET_XMIT_SUCCESS;
33 + if (qlen != slot->qlen)
34 + return NET_XMIT_CN;
35 +
36 + /* As we dropped a packet, better let upper stack know this */
37 + qdisc_tree_decrease_qlen(sch, 1);
38 + return NET_XMIT_SUCCESS;
39 }
40
41 static struct sk_buff *
This page took 0.041151 seconds and 5 git commands to generate.