Re: bhyve VMs using netmap passthrough

From: Vincenzo Maffione <vmaffione_at_freebsd.org>
Date: Tue, 09 May 2023 07:37:45 UTC
Hi Jonas,
  Back in 2016 we developed a prototype by patching QEMU-KVM (Linux only)
and developed guest OS drivers for both Linux and FreeBSD.
(Patches for QEMU-KVM and Linux were not proposed/merged upstream, but
that's fine).

We then developed a prototype for FreeBSD bhyve+libvmm+vmm (
https://wiki.freebsd.org/SummerOfCode2016/PtnetDriverAndDeviceModel).
However, the modifications we did to libvmm+vmm (to map host netmap memory
to the guests) were rejected by the maintainers, and the project stopped
there.

So there are no plans, unless that libvmm+vmm roadblock can be removed.

Cheers,
  Vincenzo


Il giorno lun 8 mag 2023 alle ore 19:28 Jonas Lopes <jonasbsd@gmail.com> ha
scritto:

> Hello everybody,
>
> Any predictions for ptnet support on bhyve? I tried to use it, but I
> realized that we don't have support yet..
>
> https://wiki.freebsd.org/SummerOfCode2016/PtnetDriverAndDeviceModel
>
> I tested this command below:
>
> # bhyve -c 2 -m 1G -A -H -P \        -s 31,lpc -l com1,stdio \        -s 0:0,hostbridge \        -s 1:0,virtio-net,tap1 \          # virtio-net NIC + TAP backend        -s 2:0,virtio-net,vale0:2 \       # virtio-net NIC + netmap userspace backend        -s 3:0,ahci-hd,freebsdimg.raw \        -s 4:0,ptnet,vale1:1 \            # ptnet NIC + ptnetmap kernelspace backend        -s 5:0,ptnetmap-memdev \          # ptnetmap memory device, needed by the ptnet NIC        vm1
>
>
> But it returns this error:
>
> *pci slot 0:4:1: unknown device "ptnet"*
>
> *Motivation*: "A ptnet NIC which does the passthough of an host VALE port
> inside the guest. The ptnetmap backend runs in a kernel thread, and it is
> implemented as part of the netmap subsystem.
>
> [image: image.png]
>
>
> *References*:
>
>    -
>    https://conferences.sigcomm.org/sigcomm/2017/files/tutorial-netmap/02-virtualization.pdf
>    - https://wiki.freebsd.org/SummerOfCode2016/PtnetDriverAndDeviceModel
>
>
> Best,
>
> --
> Jonas Lopes
>