bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] libbpf: Move CO-RE logic into separate file.
@ 2021-07-21  0:08 Alexei Starovoitov
  2021-07-21  0:08 ` [PATCH bpf-next 1/4] libbpf: Cleanup the layering between CORE and bpf_program Alexei Starovoitov
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Alexei Starovoitov @ 2021-07-21  0:08 UTC (permalink / raw)
  To: davem; +Cc: daniel, andrii, netdev, bpf, kernel-team

From: Alexei Starovoitov <ast@kernel.org>

Split CO-RE processing logic from libbpf into separate file
with an interface that doesn't dependend on libbpf internal details.
As the next step relo_core.c will be compiled with libbpf and with the kernel.
The _internal_ interface between libbpf/CO-RE and kernel/CO-RE will be:
int bpf_core_apply_relo_insn(const char *prog_name, struct bpf_insn *insn,
			     int insn_idx,
			     const struct bpf_core_relo *relo,
			     int relo_idx,
			     const struct btf *local_btf,
			     struct bpf_core_cand_list *cands);
where bpf_core_relo and bpf_core_cand_list are simple types
prepared by kernel and libbpf.

Though diff stat shows a lot of lines inserted/deleted they are moved lines.
Pls review with diff.colorMoved.

Alexei Starovoitov (4):
  libbpf: Cleanup the layering between CORE and bpf_program.
  libbpf: Split bpf_core_apply_relo() into bpf_program indepdent helper.
  libbpf: Move CO-RE types into relo_core.h.
  libbpf: Split CO-RE logic into relo_core.c.

 tools/lib/bpf/Build             |    2 +-
 tools/lib/bpf/libbpf.c          | 1344 +------------------------------
 tools/lib/bpf/libbpf_internal.h |   81 +-
 tools/lib/bpf/relo_core.c       | 1326 ++++++++++++++++++++++++++++++
 tools/lib/bpf/relo_core.h       |  102 +++
 5 files changed, 1473 insertions(+), 1382 deletions(-)
 create mode 100644 tools/lib/bpf/relo_core.c
 create mode 100644 tools/lib/bpf/relo_core.h

-- 
2.30.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-29 18:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  0:08 [PATCH bpf-next 0/4] libbpf: Move CO-RE logic into separate file Alexei Starovoitov
2021-07-21  0:08 ` [PATCH bpf-next 1/4] libbpf: Cleanup the layering between CORE and bpf_program Alexei Starovoitov
2021-07-21  0:08 ` [PATCH bpf-next 2/4] libbpf: Split bpf_core_apply_relo() into bpf_program indepdent helper Alexei Starovoitov
2021-07-21  0:08 ` [PATCH bpf-next 3/4] libbpf: Move CO-RE types into relo_core.h Alexei Starovoitov
2021-07-21  0:08 ` [PATCH bpf-next 4/4] libbpf: Split CO-RE logic into relo_core.c Alexei Starovoitov
2021-07-22 16:02 ` [PATCH bpf-next 0/4] libbpf: Move CO-RE logic into separate file Toke Høiland-Jørgensen
2021-07-24  0:23   ` Alexei Starovoitov
2021-07-26 19:37 ` Andrii Nakryiko
2021-07-28  4:49   ` Alexei Starovoitov
2021-07-29 18:43     ` Andrii Nakryiko

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).