qemu/ebpf-replace-deprecated-bpf_program__set_socket_filt.patch
Jiabo Feng ae37a72f4c QEMU update to version 6.2.0-98:
- pci-host: designware: Limit value range of iATU viewport register
- hmat acpi: Fix out of bounds access due to missing use of indirection
- migration: Skip only empty block devices
- aspeed/hace: Initialize g_autofree pointer
- hw/net/vmxnet3: Fix guest-triggerable assert()
- qxl: don't assert() if device isn't yet initialized
- Avoid unaligned fetch in ladr_match()
- linux-user: Fix waitid return of siginfo_t and rusage
- hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition
- stdvga: fix screen blanking
- virtio-net: drop too short packets early
- ebpf: replace deprecated bpf_program__set_socket_filter
- vhsot-user: only read reply of SET_LOG_BASE from vq 0
- cpu: add Tengyun S5000C cpu support
- hw/virtio: Fix obtain the buffer id from the last descriptor
- hw/core: ensure kernel_end never gets used undefined

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
(cherry picked from commit 1f9e476e96edb07e34e0133a312f478ddab4b6ff)
2024-08-22 14:53:59 +08:00

33 lines
1.1 KiB
Diff

From 6824dd870cde75d4ef1e8c74d3d596ff94ce5a26 Mon Sep 17 00:00:00 2001
From: Haochen Tong <i@hexchain.org>
Date: Sat, 28 May 2022 03:06:58 +0800
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.
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 --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.41.0.windows.1