netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Daniel Borkmann <daniel@iogearbox.net>, Hechao Li <hechaol@fb.com>
Cc: Hechao Li <hechaol@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"ast@kernel.org" <ast@kernel.org>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH v4 bpf-next 0/2] bpf: Add a new API
Date: Fri, 7 Jun 2019 23:25:58 +0000	[thread overview]
Message-ID: <20190607232550.GA5472@tower.DHCP.thefacebook.com> (raw)

On 06/07/2019 06:37 PM, Hechao Li wrote:
> Getting number of possible CPUs is commonly used for per-CPU BPF maps
> and perf_event_maps. Add a new API libbpf_num_possible_cpus() that
> helps user with per-CPU related operations and remove duplicate
> implementations in bpftool and selftests.
> 
> v4: Fixed error code when reading 0 bytes from possible CPU file
> 
> Hechao Li (2):
>   bpf: add a new API libbpf_num_possible_cpus()
>   bpf: use libbpf_num_possible_cpus in bpftool and selftests
> 
>  tools/bpf/bpftool/common.c             | 53 +++---------------------
>  tools/lib/bpf/libbpf.c                 | 57 ++++++++++++++++++++++++++
>  tools/lib/bpf/libbpf.h                 | 16 ++++++++
>  tools/lib/bpf/libbpf.map               |  1 +
>  tools/testing/selftests/bpf/bpf_util.h | 37 +++--------------
>  5 files changed, 84 insertions(+), 80 deletions(-)

> Series applied, thanks!

> P.s.: Please retain full history (v1->v2->v3->v4) in cover letter next time as
> that is typical convention and helps readers of git log to follow what has been
> changed over time.


Hello!

I'm getting the following errors on an attempt to build bpf tests.
Reverting the last patch fixes it.

Please, take a look.

Thank you!


clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /opt/fb/devtoolset/bin/../lib/clang/4.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \
	 -O2 -target bpf -emit-llvm -c progs/sockmap_parse_prog.c -o - |      \
llc -march=bpf -mcpu=generic  -filetype=obj -o /data/users/guro/linux/tools/testing/selftests/bpf/sockmap_parse_prog.o
In file included from progs/sockmap_parse_prog.c:3:
./bpf_util.h:9:10: fatal error: 'libbpf.h' file not found
#include <libbpf.h>
         ^~~~~~~~~~
1 error generated.

...

clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /opt/fb/devtoolset/bin/../lib/clang/4.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \
	 -O2 -target bpf -emit-llvm -c progs/test_sysctl_prog.c -o - |      \
llc -march=bpf -mcpu=generic  -filetype=obj -o /data/users/guro/linux/tools/testing/selftests/bpf/test_sysctl_prog.o
In file included from progs/test_sysctl_prog.c:11:
./bpf_util.h:9:10: fatal error: 'libbpf.h' file not found
#include <libbpf.h>
         ^~~~~~~~~~
1 error generated.
clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /opt/fb/devtoolset/bin/../lib/clang/4.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \
	 -O2 -target bpf -emit-llvm -c progs/sockmap_verdict_prog.c -o - |      \
llc -march=bpf -mcpu=generic  -filetype=obj -o /data/users/guro/linux/tools/testing/selftests/bpf/sockmap_verdict_prog.o
In file included from progs/sockmap_verdict_prog.c:3:
./bpf_util.h:9:10: fatal error: 'libbpf.h' file not found
#include <libbpf.h>
         ^~~~~~~~~~
1 error generated.

...

clang -I. -I./include/uapi -I../../../include/uapi -idirafter /usr/local/include -idirafter /opt/fb/devtoolset/bin/../lib/clang/4.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types \
	 -O2 -target bpf -emit-llvm -c progs/sockmap_tcp_msg_prog.c -o - |      \
llc -march=bpf -mcpu=generic  -filetype=obj -o /data/users/guro/linux/tools/testing/selftests/bpf/sockmap_tcp_msg_prog.o
In file included from progs/sockmap_tcp_msg_prog.c:3:
./bpf_util.h:9:10: fatal error: 'libbpf.h' file not found
#include <libbpf.h>
         ^~~~~~~~~~
1 error generated.



             reply	other threads:[~2019-06-07 23:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 23:25 Roman Gushchin [this message]
2019-06-07 23:47 ` [PATCH v4 bpf-next 0/2] bpf: Add a new API Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190607232550.GA5472@tower.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hechaol@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).