qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter
@ 2022-05-27 19:06 Haochen Tong
  2022-05-31  5:40 ` Zhang, Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Haochen Tong @ 2022-05-27 19:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Haochen Tong

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>
---
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-04  6:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27 19:06 [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter Haochen Tong
2022-05-31  5:40 ` Zhang, Chen
2022-06-08  8:12   ` Jason Wang
2022-07-01 14:04     ` Peter Maydell
2022-07-04  6:42       ` Jason Wang

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