From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A433CC38A2A for ; Fri, 8 May 2020 13:22:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82C13206B9 for ; Fri, 8 May 2020 13:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588944123; bh=IewKq2XCgLpEBcwa79IgRkVpFGE9iKu2hgpyii2DLA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SocVT3fLi7TfEtipMsLSyWavvQhFuF8Ld+wq4aIxTfCoAorLltPAPkYROjh90cAwv OB5ERN+IQc+YPWjQ/p1SPDDMuSTdQc16uXHPyJl7+hPDfWp62sXwz1lEUEnbvm7p0k 3cFpbIsEx7fJx0GyMe6r7WQ8/nw9x4KzuG9yi47E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbgEHMjv (ORCPT ); Fri, 8 May 2020 08:39:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:60224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728617AbgEHMju (ORCPT ); Fri, 8 May 2020 08:39:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12C0C21835; Fri, 8 May 2020 12:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588941588; bh=IewKq2XCgLpEBcwa79IgRkVpFGE9iKu2hgpyii2DLA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dQYndT6W1GifXLtdA1yQZCOlDAmplTxt6AcMXDiSwMcyc7UjMYiXMrAZ+PTAg5nyQ OmRr3atBXXSV/9wr4opAtN9/Ece7QVxT+Jji2SiGfG7iEZq+bhgnN4D4R2iXLEyklP VzmG1ZCILlmaIWvxrO0zXEwBsiixVVrDLRYMUdJM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stas Nichiporovich , Jamal Hadi Salim , Cong Wang , "David S. Miller" Subject: [PATCH 4.4 091/312] sch_qfq: keep backlog updated with qlen Date: Fri, 8 May 2020 14:31:22 +0200 Message-Id: <20200508123130.936340045@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123124.574959822@linuxfoundation.org> References: <20200508123124.574959822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: WANG Cong commit 2ed5c3f09627f72a2e0e407a86b2ac05494190f9 upstream. Reported-by: Stas Nichiporovich Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_qfq.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -1150,6 +1150,7 @@ static struct sk_buff *qfq_dequeue(struc if (!skb) return NULL; + qdisc_qstats_backlog_dec(sch, skb); sch->q.qlen--; qdisc_bstats_update(sch, skb); @@ -1250,6 +1251,7 @@ static int qfq_enqueue(struct sk_buff *s } bstats_update(&cl->bstats, skb); + qdisc_qstats_backlog_inc(sch, skb); ++sch->q.qlen; agg = cl->agg; @@ -1516,6 +1518,7 @@ static void qfq_reset_qdisc(struct Qdisc qdisc_reset(cl->qdisc); } } + sch->qstats.backlog = 0; sch->q.qlen = 0; }