From patchwork Fri Jul 29 14:00:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 107395 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 36528B6EE8 for ; Sat, 30 Jul 2011 00:02:14 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755465Ab1G2OCH (ORCPT ); Fri, 29 Jul 2011 10:02:07 -0400 Received: from mail-ww0-f42.google.com ([74.125.82.42]:35743 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774Ab1G2OCG (ORCPT ); Fri, 29 Jul 2011 10:02:06 -0400 Received: by wwg11 with SMTP id 11so4965679wwg.1 for ; Fri, 29 Jul 2011 07:02:04 -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=lNqI3HNitzyXRJDp3qojzYemwUcYZApjpDWsKhBpVx4=; b=IQWq7NwFdDG0AK7FVjkyD1QD/rxbV5NYhZ8+uBK/NHtI4tzWWsENmjbpzWkylIeKYg C0uLe228oM+fOp6ZB+5GZ9Lm2gCp3wYDj47qlzov+YkV/lEiXJEIDEzakyyEAvcvQylA jrvzbifipt3vSUQ2KPZzQDCUBCiuHH9CEmfDM= Received: by 10.227.173.202 with SMTP id q10mr683522wbz.91.1311948054981; Fri, 29 Jul 2011 07:00:54 -0700 (PDT) Received: from [10.150.51.211] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id l68sm1456810weq.10.2011.07.29.07.00.53 (version=SSLv3 cipher=OTHER); Fri, 29 Jul 2011 07:00:54 -0700 (PDT) Subject: Re: [Bugme-new] [Bug 39372] New: Problems with HFSC Scheduler From: Eric Dumazet To: Michal Soltys Cc: Andrew Morton , netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org, Jamal Hadi Salim , lucas.bocchi@gmail.com, Patrick McHardy , 631945@bugs.debian.org, 00bormoj@gmail.com, fdelawarde@wirelessmundi.com In-Reply-To: <1311946060.2843.15.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> References: <20110714151425.844b7738.akpm@linux-foundation.org> <4E32A796.8060104@ziu.info> <1311946060.2843.15.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Date: Fri, 29 Jul 2011 16:00:52 +0200 Message-ID: <1311948052.2843.19.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> 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 à 15:27 +0200, Eric Dumazet a écrit : > Le vendredi 29 juillet 2011 à 14:29 +0200, Michal Soltys a écrit : > > On 11-07-15 00:14, Andrew Morton wrote: > > > > > > (switched to email. Please respond via emailed reply-to-all, not via > > > the bugzilla web interface). > > > > > > > > > Here: WARN_ON(next_time == 0); > > > > > > > From the other thread on netfilter-devel: > > > > > On 11-07-22 11:58, Michal Pokrywka wrote: After bisecting 2.6.39.1 it > > > turned out that the bug is caused independently by two patches: > > > > > > commit b262a5da755cc6ed0cb4fba230cd9bf4037e1096 sch_sfq: fix peek() > > > implementation > > > > > > and > > > > > > commit 9df49f2bfe862573911a080c75a6d81113c5c81d sch_sfq: avoid giving > > > spurious NET_XMIT_CN signals > > > > > > Reverting these patches makes HFSC work again. > > > > > > > This one (upstream 8efa885406359af300d46910642b50ca82c0fe47) seems to be > > the culprit (does reverting only that one cures the problem ?) > > > > It allows SFQ to return success on enqueuing, when the packet really > > replaced some other packet in some other flow. This confuses outer qdisc > > (in this particular case HFSC) which thinks new packet was actually > > added each time such situation happes. > > > > Technically speaking, _this_ packet was successfuly enqueued. > > Returning NET_XMIT_CN or NET_XMIT_SUCCESS should not trigger a bug in > caller. > > > This in turn causes additional dequeues and ends with attempt > > to schedule non-existent packets, and triggers the warning. > > > > Then its probably a bug in HFSC : It doesnt understand SFQ lost a > packet. > > I'll take a look, thanks for the report. > > Oh well, it seems one qdisc_tree_decrease_qlen(sch, 1) is missing Maybe following patch would help... --- 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 *