linux-stable/tools/lib/bpf
Daniel Borkmann 05c31b4ab2 libbpf: Add link-based API for netkit
This adds bpf_program__attach_netkit() API to libbpf. Overall it is very
similar to tcx. The API looks as following:

  LIBBPF_API struct bpf_link *
  bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex,
                             const struct bpf_netkit_opts *opts);

The struct bpf_netkit_opts is done in similar way as struct bpf_tcx_opts
for supporting bpf_mprog control parameters. The attach location for the
primary and peer device is derived from the program section "netkit/primary"
and "netkit/peer", respectively.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20231024214904.29825-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-10-24 16:06:58 -07:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
Build libbpf: Move elf_find_func_offset* functions to elf object 2023-08-21 15:51:25 -07:00
Makefile libbpf: fix typos in Makefile 2023-08-02 13:58:51 -07:00
bpf.c libbpf: Add link-based API for netkit 2023-10-24 16:06:58 -07:00
bpf.h libbpf: Add link-based API for netkit 2023-10-24 16:06:58 -07:00
bpf_core_read.h libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x 2023-01-28 12:45:14 -08:00
bpf_endian.h libbpf: Make bpf_endian co-exist with vmlinux.h 2020-07-01 09:06:12 +02:00
bpf_gen_internal.h libbpf: Support kfunc detection in light skeleton. 2023-03-22 09:31:05 -07:00
bpf_helpers.h libbpf: Add __percpu_kptr macro definition 2023-09-08 08:42:18 -07:00
bpf_prog_linfo.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
bpf_tracing.h libbpf: Fix syscall access arguments on riscv 2023-10-04 13:19:13 -07:00
btf.c libbpf: Add basic BTF sanity validation 2023-09-08 08:42:17 -07:00
btf.h libbpf: Don't require full struct enum64 in UAPI headers 2022-09-27 20:45:17 +02:00
btf_dump.c libbpf: btf_dump_type_data_check_overflow needs to consider BTF_MEMBER_BITFIELD_SIZE 2023-05-01 15:37:38 +02:00
elf.c libbpf: Don't assume SHT_GNU_verdef presence for SHT_GNU_versym section 2023-10-17 11:43:20 +02:00
gen_loader.c libbpf: Store zero fd to fd_array for loader kfunc relocation 2023-05-16 22:09:23 -07:00
hashmap.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
hashmap.h libbpf: Remove HASHMAP_INIT static initialization helper 2023-07-11 09:40:05 -07:00
libbpf.c libbpf: Add link-based API for netkit 2023-10-24 16:06:58 -07:00
libbpf.h libbpf: Add link-based API for netkit 2023-10-24 16:06:58 -07:00
libbpf.map libbpf: Add link-based API for netkit 2023-10-24 16:06:58 -07:00
libbpf.pc.template
libbpf_common.h libbpf: Add helper macro to clear opts structs 2023-07-19 10:07:28 -07:00
libbpf_errno.c libbpf: Optimized return value in libbpf_strerror when errno is libbpf errno 2022-12-14 18:39:33 +01:00
libbpf_internal.h libbpf: Add uprobe multi link detection 2023-08-21 15:51:26 -07:00
libbpf_legacy.h libbpf: Clean up deprecated and legacy aliases 2022-08-17 22:42:56 +02:00
libbpf_probes.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-08 11:35:14 -07:00
libbpf_version.h libbpf: Start v1.3 development cycle 2023-05-23 21:39:12 +02:00
linker.c libbpf: Fix double-free when linker processes empty sections 2023-03-27 20:02:15 -07:00
netlink.c xsk: add new netlink attribute dedicated for ZC max frags 2023-07-19 09:56:49 -07:00
nlattr.c libbpf: Fix alen calculation in libbpf_nla_dump_errormsg() 2023-02-10 15:27:22 -08:00
nlattr.h libbpf: add API to get XDP/XSK supported features 2023-02-02 20:48:24 -08:00
relo_core.c libbpf: fix signedness determination in CO-RE relo handling logic 2023-08-23 21:13:48 -07:00
relo_core.h bpf, libbpf: Add type match support 2022-07-05 21:14:25 -07:00
ringbuf.c libbpf: Add ring__consume 2023-09-25 16:22:43 -07:00
skel_internal.h libbpf: add map_get_fd_by_id and map_delete_elem in light skeleton 2022-08-25 18:52:29 -07:00
str_error.c
str_error.h
strset.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
usdt.bpf.h libbpf: Use local includes inside the library 2023-08-04 15:06:46 -07:00
usdt.c libbpf: Add uprobe multi link support to bpf_program__attach_usdt 2023-08-21 15:51:26 -07:00
zip.c libbpf: Ignore warnings about "inefficient alignment" 2023-03-16 18:20:08 +01:00
zip.h libbpf: Implement basic zip archive parsing support 2023-03-01 16:05:34 -08:00