[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZRmiEds_8R8g4vaAeWvJzPb4xYLnpF0X2VNY8oTzkphQ@mail.gmail.com>
Date: Wed, 6 May 2020 14:33:37 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Ian Rogers <irogers@...gle.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] lib/bpf hashmap: increase portability
On Wed, May 6, 2020 at 1:54 PM Ian Rogers <irogers@...gle.com> 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 <irogers@...gle.com>
> ---
> 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 <bits/wordsize.h>
> #else
> -#include <bits/reg.h>
> +#include <linux/bitops.h>
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
>
Powered by blists - more mailing lists