All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org,
	"Björn Töpel" <bjorn.topel@gmail.com>,
	"Y Song" <ys114321@gmail.com>,
	"Jesper Dangaard Brouer" <brouer@redhat.com>,
	"Jakub Kicinski" <jakub.kicinski@netronome.com>
Subject: [PATCH bpf-next v2 0/5] samples: bpf: fix build after move to full libbpf
Date: Mon, 14 May 2018 22:35:01 -0700	[thread overview]
Message-ID: <20180515053506.4345-1-jakub.kicinski@netronome.com> (raw)

Hi!

Following patches address build issues after recent move to libbpf.
For out-of-tree builds we would see the following error:

gcc: error: samples/bpf/../../tools/lib/bpf/libbpf.a: No such file or directory

libbpf build system is now always invoked explicitly rather than
relying on building single objects most of the time.  We need to
resolve the friction between Kbuild and tools/ build system.

Mini-library called libbpf.h in samples is renamed to bpf_insn.h,
using linux/filter.h seems not completely trivial since some samples
get upset when order on include search path in changed.  We do have
to rename libbpf.h, however, because otherwise it's hard to reliably
get to libbpf's header in out-of-tree builds.

v2:
 - fix the build error harder (patch 3);
 - add patch 5 (make clang less noisy).

Jakub Kicinski (5):
  samples: bpf: include bpf/bpf.h instead of local libbpf.h
  samples: bpf: rename libbpf.h to bpf_insn.h
  samples: bpf: fix build after move to compiling full libbpf.a
  samples: bpf: move libbpf from object dependencies to libs
  samples: bpf: make the build less noisy

 samples/bpf/Makefile                          | 165 +++++++-----------
 samples/bpf/{libbpf.h => bpf_insn.h}          |   8 +-
 samples/bpf/bpf_load.c                        |   2 +-
 samples/bpf/bpf_load.h                        |   2 +-
 samples/bpf/cookie_uid_helper_example.c       |   2 +-
 samples/bpf/cpustat_user.c                    |   2 +-
 samples/bpf/fds_example.c                     |   4 +-
 samples/bpf/lathist_user.c                    |   2 +-
 samples/bpf/load_sock_ops.c                   |   2 +-
 samples/bpf/lwt_len_hist_user.c               |   2 +-
 samples/bpf/map_perf_test_user.c              |   2 +-
 samples/bpf/sock_example.c                    |   3 +-
 samples/bpf/sock_example.h                    |   1 -
 samples/bpf/sockex1_user.c                    |   2 +-
 samples/bpf/sockex2_user.c                    |   2 +-
 samples/bpf/sockex3_user.c                    |   2 +-
 samples/bpf/syscall_tp_user.c                 |   2 +-
 samples/bpf/tc_l2_redirect_user.c             |   2 +-
 samples/bpf/test_cgrp2_array_pin.c            |   2 +-
 samples/bpf/test_cgrp2_attach.c               |   3 +-
 samples/bpf/test_cgrp2_attach2.c              |   3 +-
 samples/bpf/test_cgrp2_sock.c                 |   3 +-
 samples/bpf/test_cgrp2_sock2.c                |   3 +-
 .../bpf/test_current_task_under_cgroup_user.c |   2 +-
 samples/bpf/test_lru_dist.c                   |   2 +-
 samples/bpf/test_map_in_map_user.c            |   2 +-
 samples/bpf/test_overhead_user.c              |   2 +-
 samples/bpf/test_probe_write_user_user.c      |   2 +-
 samples/bpf/trace_output_user.c               |   2 +-
 samples/bpf/tracex1_user.c                    |   2 +-
 samples/bpf/tracex2_user.c                    |   2 +-
 samples/bpf/tracex3_user.c                    |   2 +-
 samples/bpf/tracex4_user.c                    |   2 +-
 samples/bpf/tracex5_user.c                    |   2 +-
 samples/bpf/tracex6_user.c                    |   2 +-
 samples/bpf/tracex7_user.c                    |   2 +-
 samples/bpf/xdp_fwd_user.c                    |   2 +-
 samples/bpf/xdp_monitor_user.c                |   2 +-
 samples/bpf/xdp_redirect_cpu_user.c           |   2 +-
 samples/bpf/xdp_redirect_map_user.c           |   2 +-
 samples/bpf/xdp_redirect_user.c               |   2 +-
 samples/bpf/xdp_router_ipv4_user.c            |   2 +-
 samples/bpf/xdp_tx_iptunnel_user.c            |   2 +-
 samples/bpf/xdpsock_user.c                    |   2 +-
 44 files changed, 116 insertions(+), 147 deletions(-)
 rename samples/bpf/{libbpf.h => bpf_insn.h} (98%)

-- 
2.17.0

             reply	other threads:[~2018-05-15  5:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15  5:35 Jakub Kicinski [this message]
2018-05-15  5:35 ` [PATCH bpf-next v2 1/5] samples: bpf: include bpf/bpf.h instead of local libbpf.h Jakub Kicinski
2018-05-15  5:35 ` [PATCH bpf-next v2 2/5] samples: bpf: rename libbpf.h to bpf_insn.h Jakub Kicinski
2018-05-15  5:35 ` [PATCH bpf-next v2 3/5] samples: bpf: fix build after move to compiling full libbpf.a Jakub Kicinski
2018-05-15  6:05   ` Björn Töpel
2018-05-15  5:35 ` [PATCH bpf-next v2 4/5] samples: bpf: move libbpf from object dependencies to libs Jakub Kicinski
2018-05-15  5:35 ` [PATCH bpf-next v2 5/5] samples: bpf: make the build less noisy Jakub Kicinski
2018-05-15  5:57 ` [PATCH bpf-next v2 0/5] samples: bpf: fix build after move to full libbpf Alexei Starovoitov
2018-05-15  6:10   ` Jesper Dangaard Brouer
2018-05-15  9:16     ` Jesper Dangaard Brouer
2018-05-15 17:46       ` Jakub Kicinski

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=20180515053506.4345-1-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bjorn.topel@gmail.com \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=ys114321@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.