public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel•org>
To: netdev@vger•kernel.org
Cc: stephen@networkplumber•org, toke@redhat•com, haliu@redhat•com,
	David Ahern <dsahern@kernel•org>
Subject: [PATCH iproute2-next 1/3] libbpf: Use bpf_object__load instead of bpf_object__load_xattr
Date: Sat, 23 Apr 2022 09:22:58 -0600	[thread overview]
Message-ID: <20220423152300.16201-2-dsahern@kernel.org> (raw)
In-Reply-To: <20220423152300.16201-1-dsahern@kernel.org>

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>
---
 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)


  reply	other threads:[~2022-04-23 15:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23 15:22 [PATCH iproute2-next 0/3] Address more libbpf deprecations David Ahern
2022-04-23 15:22 ` David Ahern [this message]
2022-04-24  1:56   ` [PATCH iproute2-next 1/3] libbpf: Use bpf_object__load instead of bpf_object__load_xattr Hangbin Liu
2022-04-24 16:10     ` David Ahern
2022-04-26  2:29       ` Hangbin Liu
2022-04-23 15:22 ` [PATCH iproute2-next 2/3] libbpf: Remove use of bpf_program__set_priv and bpf_program__priv David Ahern
2022-04-23 15:23 ` [PATCH iproute2-next 3/3] libbpf: Remove use of bpf_map_is_offload_neutral David Ahern
2022-04-23 21:35 ` [PATCH iproute2-next 0/3] Address more libbpf deprecations Toke Høiland-Jørgensen
2022-05-02 21:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220423152300.16201-2-dsahern@kernel.org \
    --to=dsahern@kernel$(echo .)org \
    --cc=haliu@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    --cc=toke@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox