From: Haochen Tong <i@hexchain.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Haochen Tong <i@hexchain.org>
Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter
Date: Sat, 28 May 2022 03:06:58 +0800 [thread overview]
Message-ID: <20220527190658.169439-1-i@hexchain.org> (raw)
bpf_program__set_<TYPE> functions have been deprecated since libbpf 0.8.
Replace with the equivalent bpf_program__set_type call to avoid a
deprecation warning.
Signed-off-by: Haochen Tong <i@hexchain.org>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c
index 118c68da83..cee658c158 100644
--- a/ebpf/ebpf_rss.c
+++ b/ebpf/ebpf_rss.c
@@ -49,7 +49,7 @@ bool ebpf_rss_load(struct EBPFRSSContext *ctx)
goto error;
}
- bpf_program__set_socket_filter(rss_bpf_ctx->progs.tun_rss_steering_prog);
+ bpf_program__set_type(rss_bpf_ctx->progs.tun_rss_steering_prog, BPF_PROG_TYPE_SOCKET_FILTER);
if (rss_bpf__load(rss_bpf_ctx)) {
trace_ebpf_error("eBPF RSS", "can not load RSS program");
--
2.36.1
next reply other threads:[~2022-05-27 20:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 19:06 Haochen Tong [this message]
2022-05-31 5:40 ` [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter Zhang, Chen
2022-06-08 8:12 ` Jason Wang
2022-07-01 14:04 ` Peter Maydell
2022-07-04 6:42 ` Jason Wang
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=20220527190658.169439-1-i@hexchain.org \
--to=i@hexchain.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).