summaryrefslogtreecommitdiffstats
path: root/src/shared/bpf-dlopen.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-08-31 11:59:52 +0200
committerDominique Martinet <asmadeus@codewreck.org>2022-10-06 00:31:23 +0200
commit6b8085db68aef9ce7ea3f628a059ce80eaa3d9f3 (patch)
tree994d9dd473c14691ae5c7264b489ff6cb60bc5ee /src/shared/bpf-dlopen.c
parentBump libbpf version to 0.7 (diff)
downloadsystemd-6b8085db68aef9ce7ea3f628a059ce80eaa3d9f3.tar.xz
systemd-6b8085db68aef9ce7ea3f628a059ce80eaa3d9f3.zip
libbpf: Remove use of deprecated APIs
Diffstat (limited to 'src/shared/bpf-dlopen.c')
-rw-r--r--src/shared/bpf-dlopen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/bpf-dlopen.c b/src/shared/bpf-dlopen.c
index d8e778794c..07c237cc2f 100644
--- a/src/shared/bpf-dlopen.c
+++ b/src/shared/bpf-dlopen.c
@@ -13,8 +13,8 @@ int (*sym_bpf_link__fd)(const struct bpf_link *);
int (*sym_bpf_link__destroy)(struct bpf_link *);
int (*sym_bpf_map__fd)(const struct bpf_map *);
const char* (*sym_bpf_map__name)(const struct bpf_map *);
-int (*sym_bpf_create_map)(enum bpf_map_type, int key_size, int value_size, int max_entries, __u32 map_flags);
-int (*sym_bpf_map__resize)(struct bpf_map *, __u32);
+int (*sym_bpf_map_create)(enum bpf_map_type, const char *, __u32, __u32, __u32, const struct bpf_map_create_opts *);
+int (*sym_bpf_map__set_max_entries)(struct bpf_map *, __u32);
int (*sym_bpf_map_update_elem)(int, const void *, const void *, __u64);
int (*sym_bpf_map_delete_elem)(int, const void *);
int (*sym_bpf_map__set_inner_map_fd)(struct bpf_map *, int);
@@ -23,7 +23,7 @@ int (*sym_bpf_object__load_skeleton)(struct bpf_object_skeleton *);
int (*sym_bpf_object__attach_skeleton)(struct bpf_object_skeleton *);
void (*sym_bpf_object__detach_skeleton)(struct bpf_object_skeleton *);
void (*sym_bpf_object__destroy_skeleton)(struct bpf_object_skeleton *);
-bool (*sym_bpf_probe_prog_type)(enum bpf_prog_type, __u32);
+bool (*sym_libbpf_probe_bpf_prog_type)(enum bpf_prog_type, const void *);
const char* (*sym_bpf_program__name)(const struct bpf_program *);
libbpf_print_fn_t (*sym_libbpf_set_print)(libbpf_print_fn_t);
long (*sym_libbpf_get_error)(const void *);
@@ -51,8 +51,8 @@ int dlopen_bpf(void) {
DLSYM_ARG(bpf_link__fd),
DLSYM_ARG(bpf_map__fd),
DLSYM_ARG(bpf_map__name),
- DLSYM_ARG(bpf_create_map),
- DLSYM_ARG(bpf_map__resize),
+ DLSYM_ARG(bpf_map_create),
+ DLSYM_ARG(bpf_map__set_max_entries),
DLSYM_ARG(bpf_map_update_elem),
DLSYM_ARG(bpf_map_delete_elem),
DLSYM_ARG(bpf_map__set_inner_map_fd),
@@ -61,10 +61,10 @@ int dlopen_bpf(void) {
DLSYM_ARG(bpf_object__attach_skeleton),
DLSYM_ARG(bpf_object__detach_skeleton),
DLSYM_ARG(bpf_object__destroy_skeleton),
- DLSYM_ARG(bpf_probe_prog_type),
DLSYM_ARG(bpf_program__attach_cgroup),
DLSYM_ARG(bpf_program__attach_lsm),
DLSYM_ARG(bpf_program__name),
+ DLSYM_ARG(libbpf_probe_bpf_prog_type),
DLSYM_ARG(libbpf_set_print),
DLSYM_ARG(libbpf_get_error));
if (r < 0)