[Bug 242023] bhyve pci_vtnet_rx broken after r354552

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Nov 18 11:53:50 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242023

--- Comment #10 from Aleksandr Fedorov <aleksandr.fedorov at itglobal.com> ---
I created a guest system with windows 10. It seems my theory is correct.

I started ping -f on tap interface before starting the VM.

root at q1u001:/afedorov/vm #
/usr/obj/afedorov/freebsd-head-clean/amd64.amd64/usr.sbin/bhyve/bhyve -c 2 -m
4G -s 0,hostbridge -s 3,ahci-hd,./Windows-2k19-vstack.raw -s
4,ahci-cd,./seed.iso -s 10,virtio-net,tap1001 -s 31,lpc -l bootrom,/usr
/local/share/uefi-firmware/BHYVE_UEFI.fd -H -w -s
16,fbuf,tcp=10.78.67.11:5900,w=1920,h=1080 -s 17,xhci,tablet win10
fbuf frame buffer base: 0x941e00000 [sz 16777216]
pci_vtnet_reset
pci_vtnet_reset
pci_vtnet_neg_features
pci_vtnet_rx
pci_vtnet_rx
pci_vtnet_rx
Unhandled ps2 keyboard command 0x02
pci_vtnet_rx
pci_vtnet_rx
pci_vtnet_rx
pci_vtnet_rx
Unhandled ps2 keyboard command 0x02
pci_vtnet_rx
pci_vtnet_rx
pci_vtnet_rx
pci_vtnet_reset << Set sc->rx_merge to 1.
pci_vtnet_rx <<<-- RX called before features was negotiated, so sc->rx_merge ==
1
Assertion failed: (iov[0].iov_len >= sizeof(*hdr)), function pci_vtnet_rx, file
/afedorov/freebsd-head-clean/usr.sbin/bhyve/pci_virtio_net.c, line 278.
Abort


As far as I understand, RX should be disabled until features are negotiated.

Guest starts successfully if you apply the next patch:

Index: usr.sbin/bhyve/pci_virtio_net.c
===================================================================
--- usr.sbin/bhyve/pci_virtio_net.c     (revision 354802)
+++ usr.sbin/bhyve/pci_virtio_net.c     (working copy)
@@ -149,6 +149,8 @@
        /* Acquire the RX lock to block RX processing. */
        pthread_mutex_lock(&sc->rx_mtx);

+       netbe_rx_disable(sc->vsc_be);
+
        /* Set sc->resetting and give a chance to the TX thread to stop. */
        pthread_mutex_lock(&sc->tx_mtx);
        sc->resetting = 1;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-virtualization mailing list