Enabling XDP on any interface on 1.4 rolling fails

Interface config before applying XDP

 ethernet eth2 {
     address xxx.xxx.xxx.xxx
     address xxxx:xxxx:xxx::x
     description "Transit"
     hw-id xx:xx:xx:xx:xx
     offload {
vyos@edge1# set interfaces ethernet eth2 xdp
vyos@edge1# commit
[ interfaces ethernet eth2 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
- Make sure you are running the latest version of VyOS available at:
- Consult the community forum to see how to handle this issue:
- Join us on Slack where our users exchange help and advice:

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2023-03-08 00:55:37
Image version:    VyOS 1.4-rolling-202303070317
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Tue 07 Mar 2023 03:17 UTC
Build UUID:       d866b1ee-d221-48d7-9c9b-d13507aed257
Build commit ID:  55cb5c1686d24f

Architecture:     x86_64
Boot via:         installed image
System type:       guest

Hardware vendor:  Supermicro
Hardware model:   Super Server
Hardware S/N:     0123456789
Hardware UUID:    00000000-0000-0000-0000-ac1f6b79a20e

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 220, in <module>
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 209, in apply
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 382, in update
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1590, in update
    self.set_xdp('xdp' in config)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1382, in set_xdp
    return self._cmd(cmd)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 52, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
OSError: [Errno 40] failed to run command: xdp_loader -d eth2 --auto-mode -F --progsec xdp_router --filename /usr/share/vyos/xdp/xdp_prog_kern.o && xdp_prog_user -d eth2
exit code: 40

cmd 'nft -c delete element inet vrf_zones ct_iface_map { "eth2" }'
returned (out):

returned (err):
Error: No such file or directory
delete element inet vrf_zones ct_iface_map { eth2 }
cmd 'xdp_loader -d eth2 --auto-mode -F --progsec xdp_router --filename /usr/share/vyos/xdp/xdp_prog_kern.o && xdp_prog_user -d eth2'
returned (out):

returned (err):
libbpf: prog 'xdp_redirect_func': missing BPF prog type, check ELF section name 'xdp_redirect'
libbpf: prog 'xdp_redirect_func': failed to load: -22
libbpf: failed to load object '/usr/share/vyos/xdp/xdp_prog_kern.o'
ERR: loading BPF-OBJ file(/usr/share/vyos/xdp/xdp_prog_kern.o) (-22): Invalid argument
ERR: loading file: /usr/share/vyos/xdp/xdp_prog_kern.o

[[interfaces ethernet eth2]] failed
Commit failed

Which NICs?
How many Rx/Tx queues?

1 Like

XDP will only work without VOANs and is in bare alpha state. Maybe VPP as dataplane frontend will be a better choice in 2023

1 Like

In this case, I am using the Broadcom P425G (bnxt_en driver)

vyos@edge1~$ sudo ethtool -l eth2
Channel parameters for eth2:
Pre-set maximums:
RX:		37
TX:		37
Other:		n/a
Combined:	74
Current hardware settings:
RX:		0
TX:		0
Other:		n/a
Combined:	4