Skip to contentSkip to conversation

ebpf: replace deprecated bpf_program__set_socket_filter

PATCH Applied Haochen Tong 4 participants 5 messages May 27, 2022 – Jul 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ebpf: replace deprecated bpf_program__set_socket_filter

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.

---
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/ebpf_rss.c +1 -1
index 118c68da83..cee658c158 100644
@@ -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");
Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Qemu-devel <qemu-devel- [email protected]> On Behalf Of Haochen Tong
Sent: Saturday, May 28, 2022 3:07 AM
To: [email protected]
Cc: [email protected]; Haochen Tong <[email protected]>
Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

Quoted 5 lines

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.

It looks good to me.
By the way, add eBPF maintainers.

Thanks
Chen

Quoted 22 lines
---
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/ebpf_rss.c index 118c68da83..cee658c158 renamed from ebpf/ebpf_rss.c +0 -0

100644

ebpf/ebpf_rss.c +2 -2
@@ -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

Applied
#2 lore raw
Quoted 15 lines · Chen
Quoted 15 lines

-----Original Message-----
From: Qemu-devel <qemu-devel- [email protected]> On Behalf Of Haochen Tong
Sent: Saturday, May 28, 2022 3:07 AM
To: [email protected]
Cc: [email protected]; Haochen Tong <[email protected]>
Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

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.

Quoted 5 lines
Quoted 1 line

It looks good to me.
By the way, add eBPF maintainers.

Applied.

Thanks

Quoted 27 lines

Thanks
Chen

Quoted 22 lines
---
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ebpf/ebpf_rss.c index 118c68da83..cee658c158 renamed from ebpf/ebpf_rss.c +0 -0

100644

ebpf/ebpf_rss.c +2 -2
@@ -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

#3 lore raw
Quoted 17 lines · Jason Wang
Quoted 15 lines · Chen
Quoted 15 lines

-----Original Message-----
From: Qemu-devel <qemu-devel- [email protected]> On Behalf Of Haochen Tong
Sent: Saturday, May 28, 2022 3:07 AM
To: [email protected]
Cc: [email protected]; Haochen Tong <[email protected]>
Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

It looks good to me.
By the way, add eBPF maintainers.

Applied.

Hi -- did this patch get lost somewhere ? We just had a report about it on irc and it doesn't seem to be in master yet.

thanks
-- PMM

#4 lore raw
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Jason Wang
Quoted 17 lines · Chen
Quoted 16 lines

-----Original Message-----
From: Qemu-devel <qemu-devel- [email protected]> On Behalf Of Haochen Tong
Sent: Saturday, May 28, 2022 3:07 AM
To: [email protected]
Cc: [email protected]; Haochen Tong <[email protected]>
Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It looks good to me.
By the way, add eBPF maintainers.

Applied.

Hi -- did this patch get lost somewhere ?

Kind of, actually the patch is in my queue but the pull request wasn't sent.

Quoted 2 lines

We just had a
report about it on irc and it doesn't seem to be in master yet.

Will send it soon.

Thanks

Quoted 4 lines

thanks
-- PMM