Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp187346ybj; Wed, 6 May 2020 14:49:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJEbxWrdOmD2qJzBwqcBTZkyOdYkeE3uaDFv5h60vAqM3/ATtAnYVDqHkN1FTkjMxizZNfa X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr9525792edv.353.1588801792489; Wed, 06 May 2020 14:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588801792; cv=none; d=google.com; s=arc-20160816; b=AGtzP+8LWBqrSniyqNxqlS2JoTUSE4VEhdfTiFHY/9dWq4BPI58RQLqxOAn4aVUMLL se8/O+PdsV4K8lhVxZdtCFtLCAvD5IWc4YA2NQi0pS31ZFYG4Fje1xvAPun7H1HIDiJx 7yKyU2aJzEwSXMxisvcuyGRv3LrfgXAZqXiitkAQAkZySy+vpquq+LOxPXT1jbHgtVB9 AQvWicRMtIQnUn/9vvWwo5VnZnxOz+l1bxO+pIyUkAdYOkvDjDx/wti4pT3Mt5E5RYFx is7jlU6WJvYAlIt4WgEG7zzVfZUHX5EKnrrvzZFEfEAxDGgUaVO08+WTaERfvc6xEwLJ Gq+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XDCm9CTFpoK5/Dz09DifiPd0oVvuVU4Sq+Ix5lhMoGE=; b=DQ9o5SMNiHR8rvnqj3L6DnZgHmrFjcVhc0wp+slvfk2owbCHP5fg9oh+9MnkzPg45j 2yn3KBcDtuNjzhGs8U7hlAPCieI4J3M89ZR6b65FPN7LQpJ5VTRJVk7Pfa5B9448RPCw L+rT7mzcNQogqSjCYL2SBId1nWthe3O2n6sKubekXPsKXVlHIYAZofd6z4Tn2wjD5fJ+ 1z+PE1Y2L2RnqZOyYS6WODR5I/DpcOqsZo2Vt4aA5Zo6eV0tk46BSSfzF3tm3dc1KfE5 8rOCElyYtE1a7gqzj1O4++LjEtc+ASQtjTywNJ6W0zSW8vn4/D8MKpU3N05OO8vVpXMB TF8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=q0NTsDSt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si2078534ejx.28.2020.05.06.14.49.29; Wed, 06 May 2020 14:49:52 -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=@google.com header.s=20161025 header.b=q0NTsDSt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729936AbgEFVr6 (ORCPT + 99 others); Wed, 6 May 2020 17:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729114AbgEFVr5 (ORCPT ); Wed, 6 May 2020 17:47:57 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E5E5C061A0F for ; Wed, 6 May 2020 14:47:57 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id f5so1805305ybo.4 for ; Wed, 06 May 2020 14:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XDCm9CTFpoK5/Dz09DifiPd0oVvuVU4Sq+Ix5lhMoGE=; b=q0NTsDStrOr+UQIXdfTWe7lCFEPZiokqO93iTV1gRM883GSUZ9ii/vpxrQIQN0A1PK kmCVpFj4K1Wr+lTRujOHHRTB4kiJZi8t3XloESG1fmKMuogXgT0nI9GowWm5nbl4P+u6 YrT/O2jhg2DCT2+tNFqIjMSWwtAJiR4iCKGdC8F2VYCH0k2/y1+0WpCrqwTe4pAWaXJR DsY0q6AmpcDoIQchhkdMYSGImFRrLr9irByz7Ivdtscp3LcbCT8qlddV6wfTeYMK3YEB N9/bzhPxi5xmXNlMsQCoV7wW4bKDp8K4J6KH/gS8CDHHYYBrwOP42prp/zge31Yv3f+r sOnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XDCm9CTFpoK5/Dz09DifiPd0oVvuVU4Sq+Ix5lhMoGE=; b=kwCjgi/5CprXXXmLctM/GDYpTPhN4Oxw04/lQGwvOSrPpif/WUvTbMZyxkiXt7zRHA TNpPKVkfPvAUgkB9jrlzpbG4yO3+DthoywalFVF1GXLdBM3Y0UKqv7HxVIeNylTzLFHH lJoBW/FB1Mlu7yRooBYkkDAZJQQ5mCEUwXC/obftZ7/UQPCWd9AH5mFS7F2k6WENLh3x 2G6CYisN11DVvWYo73GvuXp1yRi73pwMcVcmSTye4fx5gMPEeEaodmdT8vcvcI6x+Iu2 03hqOa1HJSYMajEj2W5kXPqRxfD4X2/N6JT9Mf6JE51c+kbl0eFgrPoP5u+jXoM2hjsK SLzA== X-Gm-Message-State: AGi0PuaPckkpzWcnetN/TBA7sSsauI9CKnmYKkYOqmQzR/6IYFuCFuLB kRpOc7s1BFsci1Yh+1jDmWkgIMq9+BUPglCsQ16SEw== X-Received: by 2002:a25:be81:: with SMTP id i1mr16844255ybk.184.1588801676046; Wed, 06 May 2020 14:47:56 -0700 (PDT) MIME-Version: 1.0 References: <20200506205257.8964-1-irogers@google.com> <20200506205257.8964-2-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Wed, 6 May 2020 14:47:44 -0700 Message-ID: Subject: Re: [PATCH 1/2] lib/bpf hashmap: increase portability To: Andrii Nakryiko Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 6, 2020 at 2:33 PM Andrii Nakryiko wrote: > > On Wed, May 6, 2020 at 1:54 PM Ian Rogers wrote: > > > > Don't include libbpf_internal.h as it is unused and has conflicting > > definitions, for example, with tools/perf/util/debug.h. > > Fix a non-glibc include path. > > > > Signed-off-by: Ian Rogers > > --- > > tools/lib/bpf/hashmap.h | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h > > index bae8879cdf58..d5ef212a55ba 100644 > > --- a/tools/lib/bpf/hashmap.h > > +++ b/tools/lib/bpf/hashmap.h > > @@ -13,9 +13,8 @@ > > #ifdef __GLIBC__ > > #include > > #else > > -#include > > +#include > > why this change? It might be ok for libbpf built from kernel source, > but it will break Github libbpf. Without this change my debian based machine wasn't able to build within the kernel tree. I see bits/wordsize.h on the machine. Perhaps the __WORDSIZE computation could just be based on __LP64__ to remove any #include? Thanks, Ian > > #endif > > -#include "libbpf_internal.h" > > Dropping this seems ok, don't remember why I had it here in the first place. > > > > > static inline size_t hash_bits(size_t h, int bits) > > { > > -- > > 2.26.2.526.g744177e7f7-goog > >