1

Is driver mode available for an interface on a VM? On Virtualbox I could only load my XDP program in generic mode. Is this the case in general for all VMs? Since XDP driver mode support depends on whether the driver supports it, I'm wondering if it's possible for an interface on a VM to support driver mode. If so, are there any VM interfaces that support XDP driver mode?

user2233706
  • 6,148
  • 5
  • 44
  • 86

1 Answers1

1

Yes, XDP support for virt_io(paravirtualized network adapters) has been supported since kernel v4.10. I believe virtual box will default to emulation of actual hardware instead of using virt_io, so you might need to do some tweaking in your VM settings to get everything to work.

Sources/further reading:

Dylan Reimerink
  • 5,874
  • 2
  • 15
  • 21
  • Thanks. From the second link, what does it mean that "Currently BPF_MAP_TYPE_ARRAY and BPF_MAP_TYPE_HASH are supported"? – user2233706 Oct 08 '22 at 13:29
  • Sorry, I confused 2 different updates. It appears that virt_io also support h/w offload, but only with limited maps(second link). This is different from driver support. Driver support was added in 2016, offload in 2019 – Dylan Reimerink Oct 08 '22 at 14:17