Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp717788ybz; Fri, 24 Apr 2020 08:08:25 -0700 (PDT) X-Google-Smtp-Source: APiQypIpfi1pfBD+cZTdpVfYzMwBdkhvN/J/0RRV22r4MzN36CIbOrLz24nOEpTJpdTluEP3QRsP X-Received: by 2002:a50:f005:: with SMTP id r5mr7190990edl.376.1587740905301; Fri, 24 Apr 2020 08:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587740905; cv=none; d=google.com; s=arc-20160816; b=o6wCg8yuHtuCI9wmQ5O4s6XnE8ZyDPVo6p6iGmOri66Yl/V9ssH6glQkAmjxlWvc/U T4s+PzZ4y3r0i8FcxUTeuq2Px+IycRxcd4Fmvpb2JStiF8oZX+K20GIkqq6wtYZc8y0n YBOgWJSbzi/U7KQ4zJx4Sh5suZU+JYdYI1cA/oBsibo8RVqwZzD27zd7sfAzmq2xs+lc UySBxNWL1irdmGO6lgkPh9HdV69fXidHxJhM+8Uqliw+SVBKwTWOlayunbN4Iv/+cVLN vkzcRmvkO4w4fwu3STt0pSIQHmRZ8zejuYMeRbEOJgMeipBffu6/bDXh2wdUaPBAXb3A yPmg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=d4gGd17nKXAZGsG4iVsACxdSRpoMmpH7XJzq4FM92WM=; b=VO82I8uIJcAQlMC27TbFENquBNipSokP7rZ2l74Sy4EmGM19M6oV/AHB+LymFV/KSI 2Z77mYGXG7mc+5WOJPiGK89ePfBxU4DSDP/gTGTMHUTA8sxt29SjjIHHfzpQztsiHuVk v4zE0aoD182WDOEfqQwbHInquWfphP+hnVEvw5lbXXK0AZtnCxsDXHgNuo9h0KzpiGdu LxOlrmg/ztYAteDqGhPNjv6fKFijdwytlFsazb+slacjhdUKjPmtbubpzVX7dzBF9dIW pa5cVQEd6sT8zdGaJdrEYjxMOJK7CuVV5a8nfifzg80SUbkY6Pm7eDsc0Uu+xssNHT/a 5bCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n4peOn/s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si3200357ejz.458.2020.04.24.08.07.57; Fri, 24 Apr 2020 08:08:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n4peOn/s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbgDXPFk (ORCPT + 99 others); Fri, 24 Apr 2020 11:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726717AbgDXPFj (ORCPT ); Fri, 24 Apr 2020 11:05:39 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2523C09B045; Fri, 24 Apr 2020 08:05:37 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id r14so4928483pfg.2; Fri, 24 Apr 2020 08:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=d4gGd17nKXAZGsG4iVsACxdSRpoMmpH7XJzq4FM92WM=; b=n4peOn/s/AQG8koZqpSrfBKGJB1DH60y3deG8H5m2P1g+SuMSiEtld5J5vGAWrpX0P /BUSssIG+0rGdcPoF7u9ME1/E966Jawd9DhaaeB9DFgQJPdWlXJW0VRD0ptv4yQUNbs6 1gv82m6FH6lxsMio7sDaVO6b7Oa02eHBW5Ey5HPBxq8EygtY2sCPUhExZPSFmfT1QtJf IfY/9dlNW2HJUowUcrbDkjBpwrseWQBFA0pksskUfQKy+N7yllXmZWGJnGRWAgPOrg2O XFl6L3WIocCB/mPND6GqF2jdJmXMj/KWzUv/XNsfQOGuPq+nCp0H5BSJPjdIpp+Aidy5 0mhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=d4gGd17nKXAZGsG4iVsACxdSRpoMmpH7XJzq4FM92WM=; b=ZsWWIO9vSMWYborJp5iyZflbYN2iCY7LJIhIPOKP45nCQJlGWZsp09TBUfzCOP3/Qb KSRRzylMq4SopQ0ZLzOLiJ0L8CdSw7GuzSAZrLOZrN3XWN7cDaKV0YlIvlYw3VenLBlD 8bRPfshiIe2sykjv41yjZezomSB/G4sIhdH0iHEFBDyXXqWAGM/of5vt3tlEou7+zbR8 qrqJWJjCUrdXASA6HjTcJI7nEbN90Q4jztz5S17p2MA4W1UHZgO/0GMduOu/EKE2dDrq evOOhaiObqVkf1xQbL6dhfgqUZYZSGWlOuakDjhA3pvBinYaRAuC/4WS08Ube3faQLXf nPGQ== X-Gm-Message-State: AGi0PuYNr37SqLE5XX6poIbgChOP3vtP2ZVXkx3lce7wVsYME/v82bJg QG11P/BqEz05rVxio8RrQIq+aPen X-Received: by 2002:a63:2143:: with SMTP id s3mr9510994pgm.20.1587740736829; Fri, 24 Apr 2020 08:05:36 -0700 (PDT) Received: from [192.168.86.235] (c-73-241-150-58.hsd1.ca.comcast.net. [73.241.150.58]) by smtp.gmail.com with ESMTPSA id y24sm6058461pfn.211.2020.04.24.08.05.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 08:05:35 -0700 (PDT) Subject: Re: [PATCH] net: openvswitch: use do_div() for 64-by-32 divisions: To: Geert Uytterhoeven , Pravin B Shelar , "David S . Miller" , Jakub Kicinski , Tonghao Zhang Cc: netdev@vger.kernel.org, dev@openvswitch.org, linux-kernel@vger.kernel.org References: <20200424121051.5056-1-geert@linux-m68k.org> From: Eric Dumazet Message-ID: Date: Fri, 24 Apr 2020 08:05:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200424121051.5056-1-geert@linux-m68k.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/20 5:10 AM, Geert Uytterhoeven wrote: > On 32-bit architectures (e.g. m68k): > > ERROR: modpost: "__udivdi3" [net/openvswitch/openvswitch.ko] undefined! > ERROR: modpost: "__divdi3" [net/openvswitch/openvswitch.ko] undefined! > > Fixes: e57358873bb5d6ca ("net: openvswitch: use u64 for meter bucket") > Reported-by: noreply@ellerman.id.au > Signed-off-by: Geert Uytterhoeven > --- > net/openvswitch/meter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c > index 915f31123f235c03..3498a5ab092ab2b8 100644 > --- a/net/openvswitch/meter.c > +++ b/net/openvswitch/meter.c > @@ -393,7 +393,7 @@ static struct dp_meter *dp_meter_create(struct nlattr **a) > * Start with a full bucket. > */ > band->bucket = (band->burst_size + band->rate) * 1000ULL; > - band_max_delta_t = band->bucket / band->rate; > + band_max_delta_t = do_div(band->bucket, band->rate); > if (band_max_delta_t > meter->max_delta_t) > meter->max_delta_t = band_max_delta_t; > band++; > This is fascinating... Have you tested this patch ? Please double check what do_div() return value is supposed to be ! Thanks.