From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next v2] net: sched: red: don't reset the backlog on every stat dump Date: Wed, 17 Jan 2018 14:29:53 -0500 (EST) Message-ID: <20180117.142953.453437428037852638.davem@davemloft.net> References: <20180115040126.14190-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: jiri@resnulli.us, nogahf@mellanox.com, netdev@vger.kernel.org, oss-drivers@netronome.com, xiyou.wangcong@gmail.com, edumazet@google.com, yuvalm@mellanox.com To: jakub.kicinski@netronome.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:34254 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932253AbeAQT3z (ORCPT ); Wed, 17 Jan 2018 14:29:55 -0500 In-Reply-To: <20180115040126.14190-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jakub Kicinski Date: Sun, 14 Jan 2018 20:01:26 -0800 > Commit 0dfb33a0d7e2 ("sch_red: report backlog information") copied > child's backlog into RED's backlog. Back then RED did not maintain > its own backlog counts. This has changed after commit 2ccccf5fb43f > ("net_sched: update hierarchical backlog too") and commit d7f4f332f082 > ("sch_red: update backlog as well"). Copying is no longer necessary. > > Tested: > > $ tc -s qdisc show dev veth0 > qdisc red 1: root refcnt 2 limit 400000b min 30000b max 30000b ecn > Sent 20942 bytes 221 pkt (dropped 0, overlimits 0 requeues 0) > backlog 1260b 14p requeues 14 > marked 0 early 0 pdrop 0 other 0 > qdisc tbf 2: parent 1: rate 1Kbit burst 15000b lat 3585.0s > Sent 20942 bytes 221 pkt (dropped 0, overlimits 138 requeues 0) > backlog 1260b 14p requeues 14 > > Recently RED offload was added. We need to make sure drivers don't > depend on resetting the stats. This means backlog should be treated > like any other statistic: > > total_stat = new_hw_stat - prev_hw_stat; > > Adjust mlxsw. > > Signed-off-by: Jakub Kicinski > --- > v2: > - reuse the mlxsw infra added for prio; > - align the way qstats are passed with prio. Applied, thanks Jakub.