Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp50008imu; Thu, 8 Nov 2018 14:34:52 -0800 (PST) X-Google-Smtp-Source: AJdET5cyKS9pak9ZY015YKr0CaKjWVpYuFlYLrAxNUpbSss64CQv341srTg4eyYg+UATLxq264wh X-Received: by 2002:a65:560e:: with SMTP id l14mr5324264pgs.168.1541716492492; Thu, 08 Nov 2018 14:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716492; cv=none; d=google.com; s=arc-20160816; b=Q2ZFlEja+VJwpv2GjwXqZmxPQ7C6RxluGxZ0gTwZvjdUE8mbTWblcLULaVH3kea5mf yxphYzpdfD+NuG2DBJuLIoozzTwmz4Uw4AKgeAOzpfkW1mKZXe5i4Hcje2xsY1BsMSRG 74lt/hdjkoZdQJzouEiH7tdTEp18N/L7j8PLSzv3jiYwQhTInOzPDzb6G55nkMxzQmHU YXuOEvw6a2Qmno4OvWKOoUoYxl9SktsTQOf4yjuvipmjlfQdZkRRGVtcS4GxfjBJo7Zz 9Rg5nCV+SfXGfujzWg/lJx27ozokASTEhlPgCtOskoPl6TLINa/P2d5IkVUER2wCvGFv yE4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7jCR4A7HAcrD5hIeklpG4fXKsOu+DAtfjdlfv9tKADo=; b=T2CJKHd3K9R3tx4ZXePq07OHgOl5exi3wrM983x4OUu2fqTZPswH8K0pafkrgCTHYh jdvcojbMzCKTQbaGV2LuLhfOnrZuWY+06Sj0IU7/9hkx07RJ6gSOGCl0vhDaBldqLi8s JjfP4acN79vku8oRLKRjvNdesvwOq/zSewIcSmFJFu+ciIf0CVK0PsBC3afknfyHrRvp tBUPRUG6Z2PQrDa/adFzDf5LdadxzrhlwADxh41wlxGqI8QR+ths7UV79yTJss/FK8rO t5ICyre/lFvCGqlizpRQLkM0SPGWqPWf1VlFkGZPVX2Jj1L85C1IDbnQkSnc1m+REcT3 2Gpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yXmakMs+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9-v6si4438543pgi.580.2018.11.08.14.34.37; Thu, 08 Nov 2018 14:34:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yXmakMs+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730163AbeKIHhR (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:55182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729502AbeKIHhQ (ORCPT ); Fri, 9 Nov 2018 02:37:16 -0500 Received: from localhost (unknown [208.72.13.198]) (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 7C9EB2146D; Thu, 8 Nov 2018 21:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714387; bh=fi3W9tAmpwQK2NTdmJgR5IUdKzn3Hw3RD4WPVxbNFQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yXmakMs+W9p7t/5MMNyrZDqgQUw3CylHXQBPOquYGBdtBz7qDID5OZ1VmCME9wtks LzWyl7XE3IT6//LFwLtsTi+BnuyNvCiIdzPfINsYiMTK5i4D2fdemTmglb/ydb0JuA ZYIzCIynwIBatrkRYK2drHgEbM4lY5UK4RVmK78s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jamal Hadi Salim , Cong Wang , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 049/114] sch_red: update backlog as well Date: Thu, 8 Nov 2018 13:51:04 -0800 Message-Id: <20181108215105.588416436@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit d7f4f332f082c4d4ba53582f902ed6b44fd6f45e ] Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/sched/sch_red.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 0505b8408c8b..4bf2b599ef98 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -97,6 +97,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch) ret = qdisc_enqueue(skb, child); if (likely(ret == NET_XMIT_SUCCESS)) { + qdisc_qstats_backlog_inc(sch, skb); sch->q.qlen++; } else if (net_xmit_drop_count(ret)) { q->stats.pdrop++; @@ -118,6 +119,7 @@ static struct sk_buff *red_dequeue(struct Qdisc *sch) skb = child->dequeue(child); if (skb) { qdisc_bstats_update(sch, skb); + qdisc_qstats_backlog_dec(sch, skb); sch->q.qlen--; } else { if (!red_is_idling(&q->vars)) @@ -143,6 +145,7 @@ static unsigned int red_drop(struct Qdisc *sch) if (child->ops->drop && (len = child->ops->drop(child)) > 0) { q->stats.other++; qdisc_qstats_drop(sch); + sch->qstats.backlog -= len; sch->q.qlen--; return len; } @@ -158,6 +161,7 @@ static void red_reset(struct Qdisc *sch) struct red_sched_data *q = qdisc_priv(sch); qdisc_reset(q->qdisc); + sch->qstats.backlog = 0; sch->q.qlen = 0; red_restart(&q->vars); } -- 2.17.1