diff mbox series

[PULL,2/2] ebpf: replace deprecated bpf_program__set_socket_filter

Message ID 20220706034706.36620-3-jasowang@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,1/2] e1000: set RX descriptor status in a separate operation | expand

Commit Message

Jason Wang July 6, 2022, 3:47 a.m. UTC
From: Haochen Tong <i@hexchain.org>

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>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
 ebpf/ebpf_rss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c
index 118c68d..cee658c 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");