From: David Ahern Date: Sat, 23 Apr 2022 15:22:58 +0000 (-0600) Subject: libbpf: Use bpf_object__load instead of bpf_object__load_xattr X-Git-Tag: v5.19.0~24^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba6519cbcb28ec8e78c5948fff580cdf5ce2df29;p=thirdparty%2Fiproute2.git 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 Acked-by: Toke Høiland-Jørgensen --- 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;