From: Jo-Philipp Wich Date: Tue, 3 Jan 2012 23:08:15 +0000 (+0000) Subject: backport upstream commit e1738bd9cecc5c867b0e2996470c1ff20f66ba79 to affected kernels... X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=237282ae8c9a4ceb8cb613e4262e13d5eaca545e;p=librecmc%2Flibrecmc.git backport upstream commit e1738bd9cecc5c867b0e2996470c1ff20f66ba79 to affected kernels (#9802) 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. SVN-Revision: 29642 --- diff --git a/target/linux/generic/patches-2.6.38/622-sched_sfq_fix_enqueue.patch b/target/linux/generic/patches-2.6.38/622-sched_sfq_fix_enqueue.patch new file mode 100644 index 0000000000..122f62b9e6 --- /dev/null +++ b/target/linux/generic/patches-2.6.38/622-sched_sfq_fix_enqueue.patch @@ -0,0 +1,41 @@ +From: Eric Dumazet +Date: Fri, 29 Jul 2011 19:22:42 +0000 (+0000) +Subject: sch_sfq: fix sfq_enqueue() +X-Git-Tag: v3.1-rc1~24^2~29 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e1738bd9cecc5c867b0e2996470c1ff20f66ba79 + +sch_sfq: fix sfq_enqueue() + +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 +Reported-and-bisected-by: Michal Pokrywka +Signed-off-by: Eric Dumazet +CC: Michal Soltys +Acked-by: Patrick McHardy +Signed-off-by: David S. Miller +--- + +--- a/net/sched/sch_sfq.c ++++ b/net/sched/sch_sfq.c +@@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct + /* 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 * diff --git a/target/linux/generic/patches-2.6.39/622-sched_sfq_fix_enqueue.patch b/target/linux/generic/patches-2.6.39/622-sched_sfq_fix_enqueue.patch new file mode 100644 index 0000000000..122f62b9e6 --- /dev/null +++ b/target/linux/generic/patches-2.6.39/622-sched_sfq_fix_enqueue.patch @@ -0,0 +1,41 @@ +From: Eric Dumazet +Date: Fri, 29 Jul 2011 19:22:42 +0000 (+0000) +Subject: sch_sfq: fix sfq_enqueue() +X-Git-Tag: v3.1-rc1~24^2~29 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e1738bd9cecc5c867b0e2996470c1ff20f66ba79 + +sch_sfq: fix sfq_enqueue() + +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 +Reported-and-bisected-by: Michal Pokrywka +Signed-off-by: Eric Dumazet +CC: Michal Soltys +Acked-by: Patrick McHardy +Signed-off-by: David S. Miller +--- + +--- a/net/sched/sch_sfq.c ++++ b/net/sched/sch_sfq.c +@@ -410,7 +410,12 @@ sfq_enqueue(struct sk_buff *skb, struct + /* 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 *