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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 DE3BDC47257 for ; Wed, 6 May 2020 21:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6DAD2070B for ; Wed, 6 May 2020 21:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JzpDNdPY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730085AbgEFVdu (ORCPT ); Wed, 6 May 2020 17:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728621AbgEFVdt (ORCPT ); Wed, 6 May 2020 17:33:49 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 510A0C061A0F; Wed, 6 May 2020 14:33:49 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id q13so2923016qtp.7; Wed, 06 May 2020 14:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Oxq/+H+xeQ+mv0tMvO5y3IYe9t01YqrY24EF/jtyldM=; b=JzpDNdPYTPxFaUJBI4wO/veVbXFJgJkPrBP/OfGrsNnX8LGz5nuLs4oG3lltFk3/Fx TEa+XtZ6C0J+Hesq1mQ2zPg28GjbJLBMCRvNxplqEgB6fxuIlW71tmMwP3ug/tsjYI35 BbqKWHvsh59x1F5iv5dzK8HfxhUPWKpJu1KKqZR5+/SYKaZbCopPzJ8XQUjQ2PG4Z5jp V/qHPrTnifNUjqOi+es8cWAkIx4x6zk03HngHsEV/Q+x3gVZdIXnoxFLWlpYhCIMOCaV 4RVshHt6yYWgeEwypEmCLp8j62Fr/jWtYYe+AQi6nK1nYSSu/KGmCN7bVEzpY2sAsn+u PBFw== 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=Oxq/+H+xeQ+mv0tMvO5y3IYe9t01YqrY24EF/jtyldM=; b=bTH5j1wh4Bkn0QNlueRx+l9NFL0UcDEkTaMr9cT5WzlsipG6JNG9yBsAvv8ML6cO/u jafQF3DisB9OP3UvB3b3F9D0g43XTtCGboVpRi1pxM7mzyQ4bYSEzfQ0qIp+THlQRfOK 0KWeWFZqMJcmf1bO4TfREAZwJM3uD06hbUWfyc8iQux8+hYESY08vo18kfc+zK2JDArC XQ+Z1K4DBpJA8zJTo7+eImI8EzATFvDhhXf1BrN9PRf0nGeh1NDwDyvLnhqHPV4llst6 4/bRHjT3VJHUdEY98McDLDI2E3sPMhJF6fn+h2ujfxi7RZRdHPaLV1Va+7Zvc0tLgy+x NsNg== X-Gm-Message-State: AGi0PubLH42G3jDfXvrlANdCaJziN2V1BOzVs6UiciQG0cOO6S9kUBnI JzQd8yNTrhgJbIbcBlyoX5B7GhBKyEFghvR6g0I= X-Google-Smtp-Source: APiQypJpsaSQT2qGJ86FLuFicIlyv3y+HBRJHzXrPJic7JUYJNR9KUObIce/p0SIw7yu2XjUcR0G7ZmOo+OyrDJyboo= X-Received: by 2002:aed:2e24:: with SMTP id j33mr10425153qtd.117.1588800828042; Wed, 06 May 2020 14:33:48 -0700 (PDT) MIME-Version: 1.0 References: <20200506205257.8964-1-irogers@google.com> <20200506205257.8964-2-irogers@google.com> In-Reply-To: <20200506205257.8964-2-irogers@google.com> From: Andrii Nakryiko Date: Wed, 6 May 2020 14:33:37 -0700 Message-ID: Subject: Re: [PATCH 1/2] lib/bpf hashmap: increase portability To: Ian Rogers 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 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. > #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 >