Conversation
Signed-off-by: Enigamict <atsuki.takata@tier4.jp>
|
@Enigamict |
|
@veqcc
The key part is the RX-side preparation. [1]https://github.com/freebsd/freebsd-src/blob/9b0102837e305ca75de2bc14d284f786a33f9a6a/sys/dev/virtio/network/if_vtnet.c#L3489 |
|
@Enigamict |
Description
First, Under QEMU, both transmit and receive paths worked correctly, but under KVM, only transmission was functional reception failed because no notifications were observed in the host’s used ring.
As a cause, vio_populate_rx_mbufs() was not called before setting the DRIVER_OK status bit.
From the host’s perspective, the used ring was initialized but the RX buffer queue remained empty.
When attaching, the host could not place incoming packets into the RX queue, leading to unstable or nonfunctional RX under KVM.
Reordered the initialization sequence in virtio_attach_finish()
This ensures that RX buffers are populated before notifying the host (DRIVER_OK), so that incoming data can be received immediately after device setup.
Related links
How was this PR tested?
Notes for reviewers