Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	linux-rdma@vger.kernel.org,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	clang-built-linux@googlegroups.com
Subject: Re: [PATCH bpf-next v2 05/10] bpftool: Use consistent include paths for libbpf
Date: Wed, 15 Jan 2020 09:44:22 -0800
Message-ID: <CAEf4BzZO4yV61zwjiU5fhARCSBqDDtVx+GmLfRueXFS43BPAhw@mail.gmail.com> (raw)
In-Reply-To: <157909757421.1192265.7677168164515639742.stgit@toke.dk>

On Wed, Jan 15, 2020 at 6:14 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> From: Toke Høiland-Jørgensen <toke@redhat.com>
>
> Fix bpftool to include libbpf header files with the bpf/ prefix, to be
> consistent with external users of the library. Also ensure that all
> includes of exported libbpf header files (those that are exported on 'make
> install' of the library) use bracketed includes instead of quoted.
>
> To make sure no new files are introduced that doesn't include the bpf/
> prefix in its include, remove tools/lib/bpf from the include path entirely,
> and use tools/lib instead.
>
> Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir")
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> ---
>  tools/bpf/bpftool/Documentation/bpftool-gen.rst |    2 +-
>  tools/bpf/bpftool/Makefile                      |    2 +-
>  tools/bpf/bpftool/btf.c                         |    8 ++++----
>  tools/bpf/bpftool/btf_dumper.c                  |    2 +-
>  tools/bpf/bpftool/cgroup.c                      |    2 +-
>  tools/bpf/bpftool/common.c                      |    4 ++--
>  tools/bpf/bpftool/feature.c                     |    4 ++--
>  tools/bpf/bpftool/gen.c                         |   10 +++++-----
>  tools/bpf/bpftool/jit_disasm.c                  |    2 +-
>  tools/bpf/bpftool/main.c                        |    4 ++--
>  tools/bpf/bpftool/map.c                         |    4 ++--
>  tools/bpf/bpftool/map_perf_ring.c               |    4 ++--
>  tools/bpf/bpftool/net.c                         |    8 ++++----
>  tools/bpf/bpftool/netlink_dumper.c              |    4 ++--
>  tools/bpf/bpftool/perf.c                        |    2 +-
>  tools/bpf/bpftool/prog.c                        |    6 +++---
>  tools/bpf/bpftool/xlated_dumper.c               |    2 +-
>  17 files changed, 35 insertions(+), 35 deletions(-)
>

[...]

> diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> index 7ce09a9a6999..b0695aa543d2 100644
> --- a/tools/bpf/bpftool/gen.c
> +++ b/tools/bpf/bpftool/gen.c
> @@ -12,15 +12,15 @@
>  #include <stdio.h>
>  #include <string.h>
>  #include <unistd.h>
> -#include <bpf.h>
> -#include <libbpf.h>
> +#include <bpf/bpf.h>
> +#include <bpf/libbpf.h>
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <sys/mman.h>
>  #include <unistd.h>
> +#include <bpf/btf.h>
>
> -#include "btf.h"
> -#include "libbpf_internal.h"
> +#include "bpf/libbpf_internal.h"
>  #include "json_writer.h"
>  #include "main.h"
>
> @@ -333,7 +333,7 @@ static int do_skeleton(int argc, char **argv)
>                 #define %2$s                                                \n\
>                                                                             \n\
>                 #include <stdlib.h>                                         \n\
> -               #include <libbpf.h>                                         \n\
> +               #include <bpf/libbpf.h>                             \n\

please fix \n\ alignment

>                                                                             \n\
>                 struct %1$s {                                               \n\
>                         struct bpf_object_skeleton *skeleton;               \n\

[...]

  reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 14:12 [PATCH bpf-next v2 00/10] tools: Use consistent libbpf include paths everywhere Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 01/10] samples/bpf: Don't try to remove user's homedir on clean Toke Høiland-Jørgensen
2020-01-15 15:21   ` Jesper Dangaard Brouer
2020-01-15 14:12 ` [PATCH bpf-next v2 02/10] tools/bpf/runqslower: Fix override option for VMLINUX_BTF Toke Høiland-Jørgensen
2020-01-15 16:59   ` Andrii Nakryiko
2020-01-15 22:06     ` Toke Høiland-Jørgensen
2020-01-15 22:31       ` Andrii Nakryiko
2020-01-16  9:05         ` Toke Høiland-Jørgensen
2020-01-16 17:14           ` Andrii Nakryiko
2020-01-15 14:12 ` [PATCH bpf-next v2 03/10] tools/runqslower: Use consistent include paths for libbpf Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 04/10] selftests: " Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 05/10] bpftool: " Toke Høiland-Jørgensen
2020-01-15 17:44   ` Andrii Nakryiko [this message]
2020-01-15 14:12 ` [PATCH bpf-next v2 06/10] perf: " Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 07/10] samples/bpf: " Toke Høiland-Jørgensen
2020-01-15 15:18   ` Jesper Dangaard Brouer
2020-01-15 15:41     ` Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 08/10] libbpf: Fix include of bpf_helpers.h when libbpf is installed on system Toke Høiland-Jørgensen
2020-01-15 14:12 ` [PATCH bpf-next v2 09/10] selftests: Remove tools/lib/bpf from include path Toke Høiland-Jørgensen
2020-01-15 17:22   ` Andrii Nakryiko
2020-01-15 14:12 ` [PATCH bpf-next v2 10/10] tools/runqslower: " Toke Høiland-Jørgensen
2020-01-15 18:06 ` [PATCH bpf-next v2 00/10] tools: Use consistent libbpf include paths everywhere Andrii Nakryiko
2020-01-15 22:10   ` Toke Høiland-Jørgensen
2020-01-15 21:19 ` Alexei Starovoitov
2020-01-15 22:09   ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publically 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=CAEf4BzZO4yV61zwjiU5fhARCSBqDDtVx+GmLfRueXFS43BPAhw@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jgg@ziepe.ca \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /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

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git