From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:35512 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbeBWRnc (ORCPT ); Fri, 23 Feb 2018 12:43:32 -0500 Date: Fri, 23 Feb 2018 12:43:30 -0500 (EST) Message-Id: <20180223.124330.1637118557891234954.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: netdev@vger.kernel.org, john.fastabend@gmail.com, xiyou.wangcong@gmail.com, jhs@mojatatu.com, jiri@resnulli.us Subject: Re: [PATCH v2 net] net_sched: gen_estimator: fix broken estimators based on percpu stats From: David Miller In-Reply-To: <1519357527.55655.66.camel@gmail.com> References: <1519356974.55655.63.camel@gmail.com> <1519357527.55655.66.camel@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Thu, 22 Feb 2018 19:45:27 -0800 > From: Eric Dumazet > > pfifo_fast got percpu stats lately, uncovering a bug I introduced last > year in linux-4.10. > > I missed the fact that we have to clear our temporary storage > before calling __gnet_stats_copy_basic() in the case of percpu stats. > > Without this fix, rate estimators (tc qd replace dev xxx root est 1sec > 4sec pfifo_fast) are utterly broken. > > Fixes: 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators") > Signed-off-by: Eric Dumazet > --- > v2: Perform the zeroing in est_fetch_counters() instead of caller(s) Applied and queued up for -stable.