Re: [PATCH RFC 08/15] hw/virtio/vhost-shadow-virtqueue: used handler

Hanna Czenczek <[email protected]>
Newsgroups gmane.comp.emulators.qemu.block,gmane.comp.emulators.qemu
Message-ID <[email protected]>
On 24.07.26 00:30, Connor Kite wrote:
> Adds a handler callback to shadow virtqueues in order to enable
> non-default processing of used vring elements from the device.
>
> Signed-off-by: Connor Kite <[email protected]>
> ---
>   hw/virtio/vhost-shadow-virtqueue.c |  4 ++++
>   hw/virtio/vhost-shadow-virtqueue.h | 14 ++++++++++++++
>   2 files changed, 18 insertions(+)

The avail handler replaces `vhost_svq_add_element()`. I find it a bit 
unintuitive that this handler does not replace `virtqueue_fill()`, i.e. 
that it is not a “mirror” of the avail handler; that the avail handler 
actually handles avail elements, whereas the used handler is “just” a 
callback on each used element. Was that intentional? (If so, I think the 
comment should be explicit about this choice.)

Hanna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.