Skip to content

bpf: remove bpf_load loader completely

Daniel T. Lee bpf netdev xdp-newbies 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyIn review
  2. v27 patches 3 repliesSuperseded
  3. v19 patches 22 repliesSuperseded

Changes in v3 from the cover letter

- cleanup bpf_link, bpf_object and cgroup fd both on success and error

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7samples: bpf: refactor hbm program with libbpfsamples/bpf/.gitignore samples/bpf/Makefile samples/bpf/do_hbm_test.sh +2 more+78 -721 reply
2/7samples: bpf: refactor test_cgrp2_sock2 program with libbpfsamples/bpf/Makefile samples/bpf/test_cgrp2_sock2.c samples/bpf/test_cgrp2_sock2.sh+62 -220 replies
3/7samples: bpf: refactor task_fd_query program with libbpfsamples/bpf/Makefile samples/bpf/task_fd_query_user.c+75 -280 replies
4/7samples: bpf: refactor ibumad program with libbpfsamples/bpf/Makefile samples/bpf/ibumad_kern.c samples/bpf/ibumad_user.c+68 -310 replies
5/7samples: bpf: refactor test_overhead program with libbpfsamples/bpf/Makefile samples/bpf/test_overhead_user.c+60 -240 replies
6/7samples: bpf: fix lwt_len_hist reusing previous BPF mapsamples/bpf/lwt_len_hist.sh samples/bpf/test_lwt_bpf.sh+2 -00 replies
7/7samples: bpf: remove bpf_load loader completelysamples/bpf/Makefile samples/bpf/bpf_load.c samples/bpf/bpf_load.h +1 more+5 -7310 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchAndrii NakryikoJesper Dangaard Brouer
1/7
2/7
3/7
4/7
5/7A-b
6/7
7/7A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/7] bpf: remove bpf_load loader completely

Numerous refactoring that rewrites BPF programs written with bpf_load to use the libbpf loader was finally completed, resulting in BPF programs using bpf_load within the kernel being completely no longer present.

This patchset refactors remaining bpf programs with libbpf and completely removes bpf_load, an outdated bpf loader that is difficult to keep up with the latest kernel BPF and causes confusion.

Changes in v2:
- drop 'move tracing helpers to trace_helper' patch
- add link pinning to prevent cleaning up on process exit
- add static at global variable and remove unused variable
- change to destroy link even after link__pin()
- fix return error code on exit
- merge commit with changing Makefile

Changes in v3:
- cleanup bpf_link, bpf_object and cgroup fd both on success and error

Daniel T. Lee (7):
samples: bpf: refactor hbm program with libbpf
samples: bpf: refactor test_cgrp2_sock2 program with libbpf
samples: bpf: refactor task_fd_query program with libbpf
samples: bpf: refactor ibumad program with libbpf
samples: bpf: refactor test_overhead program with libbpf
samples: bpf: fix lwt_len_hist reusing previous BPF map
samples: bpf: remove bpf_load loader completely

 samples/bpf/.gitignore           |   3 +
 samples/bpf/Makefile             |  20 +-
 samples/bpf/bpf_load.c           | 667 -------------------------------
 samples/bpf/bpf_load.h           |  57 ---
 samples/bpf/do_hbm_test.sh       |  32 +-
 samples/bpf/hbm.c                | 111 ++---
 samples/bpf/hbm_kern.h           |   2 +-
 samples/bpf/ibumad_kern.c        |  26 +-
 samples/bpf/ibumad_user.c        |  71 +++-
 samples/bpf/lwt_len_hist.sh      |   2 +
 samples/bpf/task_fd_query_user.c | 101 +++--
 samples/bpf/test_cgrp2_sock2.c   |  61 ++-
 samples/bpf/test_cgrp2_sock2.sh  |  21 +-
 samples/bpf/test_lwt_bpf.sh      |   0
 samples/bpf/test_overhead_user.c |  82 ++--
 samples/bpf/xdp2skb_meta_kern.c  |   2 +-
 16 files changed, 350 insertions(+), 908 deletions(-)
 delete mode 100644 samples/bpf/bpf_load.c
 delete mode 100644 samples/bpf/bpf_load.h
 mode change 100644 => 100755 samples/bpf/lwt_len_hist.sh
 mode change 100644 => 100755 samples/bpf/test_lwt_bpf.sh
Signature · 1 line
2.25.1