1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
id = 2934
title = "RSS eBPF failed to load"
state = "opened"
created_at = "2025-04-26T09:58:46.917Z"
closed_at = "n/a"
labels = []
url = "https://gitlab.com/qemu-project/qemu/-/issues/2934"
host-os = "Gentoo Linux"
host-arch = "x86_64"
qemu-version = "9.2.3"
guest-os = "Alpine Linux"
guest-arch = "x86_64"
description = """I am seeing a failure to load the eBPF program for rss steering."""
reproduce = """1. Using libvirt, enable rss='on' for the vhost driver.
2.
3."""
additional = """Libvirt log:
```
libbpf: prog 'tun_rss_steering_prog': BPF program load failed: Invalid argument
libbpf: prog 'tun_rss_steering_prog': -- BEGIN PROG LOAD LOG --
back-edge from insn 587 to 501
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
-- END PROG LOAD LOG --
libbpf: prog 'tun_rss_steering_prog': failed to load: -22
libbpf: failed to load object 'rss_bpf'
libbpf: failed to load BPF skeleton 'rss_bpf': -22
2025-04-26T09:22:19.054471Z qemu-system-x86_64: -device {"driver":"virtio-net-pci","packed":true,"tx":"bh","ioeventfd":true,"event_idx":true,"host_ecn":true,"mrg_rxbuf":true,"guest_ecn":true,"mq":true,"vectors":14,"rx_queue_size":1024,"tx_queue_size":256,"rss":true,"netdev":"hostnet0","id":"net0","mac":"52:54:00:c3:6f:c2","bus":"pci.1","addr":"0x0"}: warning: Unable to load eBPF program
```
[qemu-log.txt](/uploads/2d5e49a38a54297586a4b1f16423fc27/qemu-log.txt)
XML:
```xml
<interface type='bridge'>
<mac address='52:54:00:be:49:ff'/>
<source bridge='inet'/>
<model type='virtio'/>
<driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='on' queues='6' rx_queue_size='1024' tx_queue_size='256' rss='on' packed='on'>
<host ecn='on' mrg_rxbuf='on'/>
<guest ecn='on'/>
</driver>
<link state='up'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</interface>
```
Host kernel .config:
```
❯ zcat /proc/config.gz |grep -i bpf
CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
# BPF subsystem
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# CONFIG_BPF_LSM is not set
# end of BPF subsystem
CONFIG_CGROUP_BPF=y
CONFIG_NETFILTER_BPF_LINK=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
# HID-BPF support
CONFIG_HID_BPF=y
# end of HID-BPF support
CONFIG_BPF_EVENTS=y
```"""
|