[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220423152300.16201-2-dsahern@kernel.org>
Date: Sat, 23 Apr 2022 09:22:58 -0600
From: David Ahern <dsahern@...nel.org>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org, toke@...hat.com, haliu@...hat.com,
David Ahern <dsahern@...nel.org>
Subject: [PATCH iproute2-next 1/3] 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@...nel.org>
---
lib/bpf_libbpf.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/bpf_libbpf.c b/lib/bpf_libbpf.c
index f4f98caa1e58..f723f6310c28 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;
--
2.24.3 (Apple Git-128)
Powered by blists - more mailing lists