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=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham 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 5FE2DC43381 for ; Wed, 27 Feb 2019 01:53:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 255F5218D3 for ; Wed, 27 Feb 2019 01:53:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Rvg13rqh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729558AbfB0BxW (ORCPT ); Tue, 26 Feb 2019 20:53:22 -0500 Received: from merlin.infradead.org ([205.233.59.134]:59130 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729364AbfB0BxV (ORCPT ); Tue, 26 Feb 2019 20:53:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1gdipD+4mHTdGzVnucOnkKaoAxIigBvwOp4eSAcMRBE=; b=Rvg13rqhHf3t5RO2RTWlevrRJP Wg6YnDHTVcYQ43VUpQrSv/b6p7ByWwohIGHQyIAWpQMnJIVFM0Po83Sv2B3dSUWm+Dfnd5LnFJfFh z6MGFjPOfT83BarnDZ3lBSMIwvksn83TYGms1Qg6US8Rya2N5fV0W49LFP/72Nm2RkHD/hjArgCrG Gp9mqfi+Y3VcwLJK7jy4vJgiL5c9q3Wy6iKFYLVL1uT+jD8OUuFHyeEFETkU6zZ+Jn6GLuUG+FRx0 rJTB72XTcYDabG4aIrdIRQAHMYeLQB6R+fhoH4ISBGZ+23SULIKcao4LbSj9gTw/wYX0xxt5+yEQ+ 9FzKVKwQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gyoPO-0001wE-H9; Wed, 27 Feb 2019 01:53:18 +0000 Subject: Re: [PATCH net-next] net: sched: pie: fix 64-bit division To: Leslie Monis , davem@davemloft.net Cc: netdev@vger.kernel.org References: <20190227010006.22219-1-lesliemonis@gmail.com> From: Randy Dunlap Message-ID: <9f439285-50cc-f732-13ba-741ded0ca768@infradead.org> Date: Tue, 26 Feb 2019 17:53:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190227010006.22219-1-lesliemonis@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2/26/19 5:00 PM, Leslie Monis wrote: > Use div_u64() to resolve build failures on 32-bit platforms. > > Fixes: 3f7ae5f3dc52 ("net: sched: pie: add more cases to auto-tune alpha and beta") > Signed-off-by: Leslie Monis Reported-by: Randy Dunlap Tested-by: Randy Dunlap Thanks. [https://lore.kernel.org/lkml/6ecd1bde-c15b-0568-2b72-6e0796a87864@infradead.org/] > --- > net/sched/sch_pie.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c > index 4c0670b6aec1..f93cfe034c72 100644 > --- a/net/sched/sch_pie.c > +++ b/net/sched/sch_pie.c > @@ -429,7 +429,7 @@ static void calculate_probability(struct Qdisc *sch) > */ > > if (qdelay == 0 && qdelay_old == 0 && update_prob) > - q->vars.prob = (q->vars.prob * 98) / 100; > + q->vars.prob = 98 * div_u64(q->vars.prob, 100); > > q->vars.qdelay = qdelay; > q->vars.qlen_old = qlen; > -- ~Randy