Page MenuHomeVyOS Platform

VPP fails to load XDP on GCP with virtio_net driver
Open, NormalPublicBUG

Description

set vpp settings interface eth1 driver xdp
commit

journalctl:

Oct 01 06:45:26 VyOS-for-Smoke-Tests kernel: virtio_net virtio2 defunct_eth1: renamed from eth1
Oct 01 06:45:26 VyOS-for-Smoke-Tests netplugd[3023]: eth1: can't get flags: No such device
Oct 01 06:45:26 VyOS-for-Smoke-Tests netplugd[3023]: eth1: state PROBING pid 4667 exited status 256
Oct 01 06:45:26 VyOS-for-Smoke-Tests netplugd[3023]: Could not bring eth1 back up
Oct 01 06:45:26 VyOS-for-Smoke-Tests netplugd[3023]: eth1: can't get flags: No such device
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: elf: skipping unrecognized data section(7) .xdp_run_config
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: elf: skipping unrecognized data section(8) xdp_metadata
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: elf: skipping unrecognized data section(7) xdp_metadata
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: prog 'xdp_dispatcher': BPF program load failed: Invalid argument
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: prog 'xdp_dispatcher': -- BEGIN PROG LOAD LOG --
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: Func#11 is safe for any args that match its prototype
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: btf_vmlinux is malformed
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: reg type unsupported for arg#0 function xdp_dispatcher#29
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 0: R1=ctx(off=0,imm=0) R10=fp0
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: ; int xdp_dispatcher(struct xdp_md *ctx)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 0: (bf) r6 = r1                       ; R1=ctx(off=0,imm=0) R6_w=ctx(off=0,imm=0)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 1: (b7) r0 = 2                        ; R0_w=2
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: ; __u8 num_progs_enabled = conf.num_progs_enabled;
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 2: (18) r8 = 0xffffa2c1c0366000       ; R8_w=map_value(off=0,ks=4,vs=84,imm=0)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 4: (71) r7 = *(u8 *)(r8 +0)           ; R7=1 R8=map_value(off=0,ks=4,vs=84,imm=0)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: ; if (num_progs_enabled < 1)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 5: (15) if r7 == 0x0 goto pc+141      ; R7=1
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: ; ret = prog0(ctx);
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 6: (bf) r1 = r6                       ; R1_w=ctx(off=0,imm=0) R6=ctx(off=0,imm=0)
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: 7: (85) call pc+140
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: btf_vmlinux is malformed
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: R1 type=ctx expected=fp
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: Caller passes invalid args into func#1
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: processed 84 insns (limit 1000000) max_states_per_insn 0 total_states 9 peak_states 9 mark_read 1
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: -- END PROG LOAD LOG --
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: failed to load program 'xdp_dispatcher'
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: failed to load object 'xdp-dispatcher.o'
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libxdp: Failed to load dispatcher: Invalid argument
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libxdp: Falling back to loading single prog without dispatcher
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libbpf: Kernel error message: virtio_net: XDP expects header/data in single page, any_header_sg required
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: libxdp: Error attaching XDP program to ifindex 3: Invalid argument
Oct 01 06:45:26 VyOS-for-Smoke-Tests netplugd[3023]: eth1: can't get flags: No such device
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: vpp[4653]: af_xdp: af_xdp_create_queue: xsk_socket__create() failed (is linux netdev defunct_eth1 up?): Invalid argument
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: af_xdp: af_xdp_create_queue: xsk_socket__create() failed (is linux netdev defunct_eth1 up?): Invalid argument
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: vpp[4653]: received signal SIGTERM, PC 0x7f7138903f26
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: vpp[4653]: received SIGTERM from PID 1 UID 0, exiting...
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: received signal SIGTERM, PC 0x7f7138903f26
Oct 01 06:45:26 VyOS-for-Smoke-Tests systemd[1]: Stopping vector packet processing engine...
Oct 01 06:45:26 VyOS-for-Smoke-Tests vpp[4653]: received SIGTERM from PID 1 UID 0, exiting...
Oct 01 06:45:26 VyOS-for-Smoke-Tests systemd[1]: vpp.service: Deactivated successfully.
Oct 01 06:45:26 VyOS-for-Smoke-Tests systemd[1]: Stopped vector packet processing engine.
Oct 01 06:45:26 VyOS-for-Smoke-Tests systemd[1]: vpp.service: Consumed 3.337s CPU time.
Oct 01 06:45:26 VyOS-for-Smoke-Tests kernel: virtio_net virtio2 eth1: renamed from defunct_eth1
Oct 01 06:45:26 VyOS-for-Smoke-Tests vyos-configd[815]: An error occurred: VPP API call failed: -12. VPP service will be
Oct 01 06:45:26 VyOS-for-Smoke-Tests vyos-configd[815]: restarted with the previous configuration
Oct 01 06:45:26 VyOS-for-Smoke-Tests vyos-configd[815]: Sending reply: ERROR_COMMIT_APPLY with output
Oct 01 06:45:26 VyOS-for-Smoke-Tests vyos-configd[815]: scripts_called: ['vpp']

VM: GCP e2-standard-16

Driver:

driver: virtio_net
version: 1.0.0
firmware-version: 
expansion-rom-version: 
bus-info: 0000:00:04.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

ethtool -l eth1
Channel parameters for eth1:
Pre-set maximums:
RX:             n/a
TX:             n/a
Other:          n/a
Combined:       8
Current hardware settings:
RX:             n/a
TX:             n/a
Other:          n/a
Combined:       8

ethtool -g eth1
Ring parameters for eth1:
Pre-set maximums:
RX:                     4096
RX Mini:                n/a
RX Jumbo:               n/a
TX:                     4096
TX push buff len:       n/a
Current hardware settings:
RX:                     4096
RX Mini:                n/a
RX Jumbo:               n/a
TX:                     4096
RX Buf Len:             n/a
CQE Size:               n/a
TX Push:                off
RX Push:                off
TX push buff len:       n/a
TCP data split:         n/a

Details

Version
vyos-2025.09.29-1217-integration
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

StatusSubtypeAssignedTask
OpenBUGNone
OpenBUGNone

Event Timeline

Unknown Object (User) triaged this task as Normal priority.Oct 3 2025, 1:17 PM

According to @a.melnychenko researches:

I’ve checked possible issues with XDP, g.e, T7891 - according to the kernel’s virtio-net-pci driver code, apparently they used “legacy virtio” with merge rx bufs:
virtio_net.c - drivers/net/virtio_net.c - Linux source code v6.12 - Bootlin Elixir Cross Referencer
virtio_net.c - drivers/net/virtio_net.c - Linux source code v6.12 - Bootlin Elixir Cross Referencer
virtio_net.c - drivers/net/virtio_net.c - Linux source code v6.12 - Bootlin Elixir Cross Referencer
There are questions, why SKB mode XDP is not used as a fallback if it is not possible to set up native XDP.