Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2019 11:53:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 242023] bhyve pci_vtnet_rx broken after r354552
Message-ID:  <bug-242023-27103-VftarYVWjh@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-242023-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-242023-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242023

--- Comment #10 from Aleksandr Fedorov <aleksandr.fedorov@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@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=3D10.78.67.11:5900,w=3D1920,h=3D1080 -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_merg=
e =3D=3D
1
Assertion failed: (iov[0].iov_len >=3D 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 =3D 1;

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242023-27103-VftarYVWjh>