diff options
author | David Ahern <dsahern@kernel.org> | 2022-04-23 09:22:58 -0600 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2022-05-02 14:46:07 -0700 |
commit | ba6519cbcb28ec8e78c5948fff580cdf5ce2df29 (patch) | |
tree | aa80d521c986611f4bbd03ac00a59b2a5c868a82 | |
parent | a6eb654d1cf6a98ff0671230c1a724c461919383 (diff) | |
download | iproute2-ba6519cbcb28ec8e78c5948fff580cdf5ce2df29.tar.gz |
libbpf: Use bpf_object__load instead of bpf_object__load_xattr
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>
-rw-r--r-- | lib/bpf_libbpf.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/bpf_libbpf.c b/lib/bpf_libbpf.c index f4f98caa1..f723f6310 100644 --- a/lib/bpf_libbpf.c +++ b/lib/bpf_libbpf.c @@ -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; |