Received: by 10.192.165.148 with SMTP id m20csp3392017imm; Mon, 7 May 2018 11:27:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphN1ArsBAwcGLZtw6LQ7+B8QYgyQSoPOCRs3hOwGr0s/P0jxeJdVoXJ/WxwKDSLMPzKSXl X-Received: by 2002:a24:f9cc:: with SMTP id l195-v6mr2512900ith.132.1525717629554; Mon, 07 May 2018 11:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525717629; cv=none; d=google.com; s=arc-20160816; b=nNkq2HwsZMXcFf83aFLt5ioPU+iDangDopPaFgni6PB3Qno35807scs+uhFAel2dw1 8Bdt3LHwtJaBM6UsfmXa40z1Mgz6u3qn3GLFx89slCjoGf/1D9YLcpC/lxUlmBq4mXei vNYJdGyR+tXpTaR0MQIOyHfPzEpNApRUjC2NaFRs8N/7r3ZqkQeAfB0LVnkxlbADF3oy xEfmxeBqKDZ/ZU8ts74JXDCtnowwDHd9eQDGFL5PuKpNS5+aMmtFt4yDeIAPqZ5iu9rU VJTSllCkwY+fBILXoxs3cLjXIz7ugI6ObqhOEV6vwCvRyQB+07jnofkX/yfxpQ5tx5Yz 1sVA== 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 :arc-authentication-results; bh=HmuVmazfh92/ba8D+xcf5R6qswGIrUVfgmcsUKwPK2A=; b=ucATD8a9rEgqI/cTnnZ82CUF2wDCpM+zaj1Hxykkb4BXUZ/e9pOh3ko/8sX071UIeG Uh0kZ8UdW18JafrQrafgB12LjLf9iekSZi/y2+7mY51sv2fIUsCeV9fNECcZxw/TtbDW t1bHub1tcY5gSijlZ8fBvShcdoFmKhxZ1qK/dOezcmsD3N6fZg4tCDvHTlFVKDElbfZb ZhwX1qjqD74PAmGoj3ja2bFQJfP9QT7+Huvgu9X2PHcnHdB5N16gYB0iRsI0NRkP6xl2 +owXR5yiXzEIG4wym984kuw6+QCPiEKbp6b3/n/zR0l0dsOwWEqVf7Q/NLBZL1zThc0P lcMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=pkKqEhDF; 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 w7-v6si21946224iow.38.2018.05.07.11.26.55; Mon, 07 May 2018 11:27:09 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=pkKqEhDF; 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 S1752564AbeEGSZj (ORCPT + 99 others); Mon, 7 May 2018 14:25:39 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53018 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbeEGSZg (ORCPT ); Mon, 7 May 2018 14:25:36 -0400 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=HmuVmazfh92/ba8D+xcf5R6qswGIrUVfgmcsUKwPK2A=; b=pkKqEhDFcK/XnCeCArt5SeyrLr 25rolNFs3qFZ4ij3ms3SP8AYlfH9m3Ojtr+gcukLv51XNTpGpL3rIts8+yjwtutNismNfTWZ3TVSa mAfdYLn0sEW46PISn+Z9LekGWHUSXZcyfEWmTG17fgIMelRribTQaaUrSILDrUNK498ks/Ga6M1Uf lArs35WD/Tif6SNpwbbxyIHH4a2eze7q2dQtLkAKyilnmIFuhILSYTiJywkbX833cceldo/qpNEO1 vBGA25M0Vv2SmbxpMLqcvRFIpihk+lALi6tJLGP4UxhZkTL9aX5Z+caNUBjAnLTuZCOccWLwu/spv 2MltzvrQ==; 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 1fFkpE-0006zP-7x; Mon, 07 May 2018 18:25:28 +0000 Subject: Re: [PATCH bpf-next] xsk: fix 64-bit division To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org Cc: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Stephen Rothwell , magnus.karlsson@intel.com, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180507174350.3534-1-bjorn.topel@gmail.com> From: Randy Dunlap Message-ID: Date: Mon, 7 May 2018 11:25:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180507174350.3534-1-bjorn.topel@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/07/2018 10:43 AM, Björn Töpel wrote: > From: Björn Töpel > > i386 builds report: > net/xdp/xdp_umem.o: In function `xdp_umem_reg': > xdp_umem.c:(.text+0x47e): undefined reference to `__udivdi3' > > This fix uses div_u64 instead of the GCC built-in. > > Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") > Signed-off-by: Björn Töpel I don't know why the subject says xsk (instead of xdp), but anyway: Reported-by: Randy Dunlap Tested-by: Randy Dunlap Thanks. > --- > net/xdp/xdp_umem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c > index 881dfdefe235..2b47a1dd7c6c 100644 > --- a/net/xdp/xdp_umem.c > +++ b/net/xdp/xdp_umem.c > @@ -209,7 +209,7 @@ int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) > if ((addr + size) < addr) > return -EINVAL; > > - nframes = size / frame_size; > + nframes = (unsigned int)div_u64(size, frame_size); > if (nframes == 0 || nframes > UINT_MAX) > return -EINVAL; > > -- ~Randy