aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/samples/qmi
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2020-05-16 13:06:06 +0900
committerDaniel Borkmann <daniel@iogearbox.net>2020-05-19 17:12:56 +0200
commitbc1a85977b950407d67cd1e5b74f261a4bee3284 (patch)
treee4c5283ae3815b08fe2a09a34576a7ebf7931ecf /samples/qmi
parentsamples, bpf: Refactor kprobe tracing user progs with libbpf (diff)
downloadwireguard-linux-bc1a85977b950407d67cd1e5b74f261a4bee3284.tar.xz
wireguard-linux-bc1a85977b950407d67cd1e5b74f261a4bee3284.zip
samples, bpf: Refactor tail call user progs with libbpf
BPF tail call uses the BPF_MAP_TYPE_PROG_ARRAY type map for calling into other BPF programs and this PROG_ARRAY should be filled prior to use. Currently, samples with the PROG_ARRAY type MAP fill this program array with bpf_load. For bpf_load to fill this map, kernel BPF program must specify the section with specific format of <prog_type>/<array_idx> (e.g. SEC("socket/0")) But by using libbpf instead of bpf_load, user program can specify which programs should be added to PROG_ARRAY. The advantage of this approach is that you can selectively add only the programs you want, rather than adding all of them to PROG_ARRAY, and it's much more intuitive than the traditional approach. This commit refactors user programs with the PROG_ARRAY type MAP with libbpf instead of using bpf_load. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200516040608.1377876-4-danieltimlee@gmail.com
Diffstat (limited to 'samples/qmi')
0 files changed, 0 insertions, 0 deletions