-
Notifications
You must be signed in to change notification settings - Fork 80
Description
The virtqueue management done by add_notify_wait_pop function currently spins until the other side uses at least one descriptor buffer and marks it as used. This means there can only be one set of in-flight descriptor buffers at the same time which (1) defeats the point of a queue and (2) limits this crate to use-cases where blocking is acceptable.
Given that there are few options for no_std virtio libraries in the rust ecosystem it would be nice to add support for non-blocking versions of these operations and make use of this in device-specific code as well. @thedataking and I have been maintaining a soft-fork of this crate that adds support for implementing virtio devices and will very likely need to add this feature in the near future (see immunant#14). I'd prefer to add this to virtio-drivers because that may allow us to eventually deprecate our soft-fork and move to a virtio-device crate that instead uses virtio-drivers as a dependency to avoid duplicating code.
I realize this would be an involved change so I want to understand whether the maintainers have considered this/have preferences on how to implement it. I may have time to implement this and make use of it in the vsock driver at some point in the next few months, but I'd like to know if it would be accepted given the complexity it introduces. @qwandor any thoughts?