]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
libbpf: Use bpf_object__load instead of bpf_object__load_xattr
authorDavid Ahern <dsahern@kernel.org>
Sat, 23 Apr 2022 15:22:58 +0000 (09:22 -0600)
committerDavid Ahern <dsahern@kernel.org>
Mon, 2 May 2022 21:46:07 +0000 (14:46 -0700)
bpf_object__load_xattr is deprecated as of v0.8+; remove it
in favor of bpf_object__load.

Signed-off-by: David Ahern <dsahern@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
lib/bpf_libbpf.c

index f4f98caa1e58631355ceff105de8207c0ffcd9bb..f723f6310c28efe052a68dc55e69925303d3e846 100644 (file)
@@ -248,7 +248,6 @@ static int handle_legacy_maps(struct bpf_object *obj)
 
 static int load_bpf_object(struct bpf_cfg_in *cfg)
 {
-       struct bpf_object_load_attr attr = {};
        struct bpf_program *p, *prog = NULL;
        struct bpf_object *obj;
        char root_path[PATH_MAX];
@@ -305,11 +304,7 @@ static int load_bpf_object(struct bpf_cfg_in *cfg)
        if (ret)
                goto unload_obj;
 
-       attr.obj = obj;
-       if (cfg->verbose)
-               attr.log_level = 2;
-
-       ret = bpf_object__load_xattr(&attr);
+       ret = bpf_object__load(obj);
        if (ret)
                goto unload_obj;