From patchwork Sat Jul 30 05:22:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 107475 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 84200B6F57 for ; Sat, 30 Jul 2011 15:22:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752424Ab1G3FWs (ORCPT ); Sat, 30 Jul 2011 01:22:48 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:62233 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937Ab1G3FWr (ORCPT ); Sat, 30 Jul 2011 01:22:47 -0400 Received: by wwe5 with SMTP id 5so4131995wwe.1 for ; Fri, 29 Jul 2011 22:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=wLtGipq3V2bARyTzQL94CnKItY4V+tV/sy+XS/Drp30=; b=wnR4ALaGuvVNhbAPxhnauJLSZist9OwxoBRjka8t7bSqe3amrlONoRkQKymbnZkH/Y Ej6N0X/HLwg6j3hShcQpepQlQTDogfdxNPheKlKjbpfts31PY1aa0/oZh4XEiYab+UjN +abc5THFWbQYRE7q3uUTNdBxK+nt0ouQupcBw= Received: by 10.227.202.19 with SMTP id fc19mr2918742wbb.61.1312003366534; Fri, 29 Jul 2011 22:22:46 -0700 (PDT) Received: from [10.150.51.210] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id gb1sm2301586wbb.37.2011.07.29.22.22.44 (version=SSLv3 cipher=OTHER); Fri, 29 Jul 2011 22:22:45 -0700 (PDT) Subject: Re: [Bugme-new] [Bug 39372] New: Problems with HFSC Scheduler From: Eric Dumazet To: Patrick McHardy , David Miller Cc: Michal Soltys , Andrew Morton , netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org, Jamal Hadi Salim , lucas.bocchi@gmail.com, 631945@bugs.debian.org, 00bormoj@gmail.com, fdelawarde@wirelessmundi.com In-Reply-To: <4E32BF87.6010909@trash.net> References: <20110714151425.844b7738.akpm@linux-foundation.org> <4E32A796.8060104@ziu.info> <1311946060.2843.15.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <1311948052.2843.19.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <4E32BF87.6010909@trash.net> Date: Sat, 30 Jul 2011 07:22:42 +0200 Message-ID: <1312003362.2873.54.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le vendredi 29 juillet 2011 à 16:11 +0200, Patrick McHardy a écrit : > Yeah, that seems to be the correct fix, thanks for looking into this. Thanks Patrick, here is the official patch submission then ;) [PATCH] 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 --- net/sched/sch_sfq.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 4536ee6..2a2d287 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 *