-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtio-Net driver is not respecting VIRTIO_NET_F_MRG_RXBUF #1090
Comments
I think this is an unfortunate remnant of the support for the pre-1.0 virtio spec. |
Probably was broken long time ago. Probably the driver should fail to start if this feature is not present until this is fixed. Thank you for pointing this out. |
@ddaney-fungible Out of curiosity - do you experience issues with the non-compliant driver on HW or other than QEMU\KVM hypervisor? |
Yes. The failure was seen in a virtio-net function that is not part of Qemu. On the system in question EDK2 and Linux drivers seem to work well, but it was observed that this Windows driver was supplying buffers in two chunks, one of size 12 for the header and the second for the packet payload. |
@ddaney-fungible Can you please share with us the device features as suggested during feature negotiation? (better in hex) |
device_feature[0] = 0x00010029 Driver is responding with: driver_feature[0] = 0x00010029 |
@ddaney-fungible |
I think there is a misunderstanding of how to interpret those values. device_feature[0] = VIRTIO_NET_F_CSUM | device_feature[1] = VIRTIO_F_VERSION_1 | |
@ddaney-fungible Sorry, by mistake I swapped them when read |
@ddaney-fungible In the terminology of the spec the "descriptor" is one or more "descriptor elements", combined together using VIRTQ_DESC_F_NEXT, see "2.8.6 Next Flag: Descriptor Chaining" (in the indirect area, if supported, or several consecutive elements in the descriptor queue) The point of VIRTIO_NET_F_MRG_RXBUF is that this virtio-net specific feature allows to place a network packet over several consecutive descriptors (not chained together with VIRTQ_DESC_F_NEXT). Probably this is a good idea to reduce number of descriptor elements and we'll evaluate the possibility to do so, but I think there is no violation of the spec. We can request the comment from virtio-comment or virtio-dev mail lists if needed. |
OK, it seems like I was conflating the meanings of Buffer and Segment. At this point it is somewhat academic, as I have adjusted the device behavior to work with the driver. |
@ddaney-fungible I am wondering if you support RSS in your HW and if you aware of the virtio spec parts related to RSS. |
If a Virtio-Net PCI function (Device) does not advertise the VIRTIO_NET_F_MRG_RXBUF then the driver must supply a single descriptor RX buffer large enough to contain the virtio_net_hdr and the RX packet contents.
The Windows driver does not do this, it supplies a two descriptor buffer, one for the virtio_net_hdr and another for the packet contents, this behavior is explicitly prohibited by the specification.
The text was updated successfully, but these errors were encountered: