qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes()
@ 2012-07-06 10:37 Amit Shah
  2012-07-06 10:37 ` [Qemu-devel] [PATCH 1/3] virtio: use unsigned int for counting bytes in vq Amit Shah
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Amit Shah @ 2012-07-06 10:37 UTC (permalink / raw)
  To: qemu list; +Cc: Amit Shah, Anthony Liguori

The current virtqueue_avail_bytes() is a weird API: it's oddly-named:
doesn't tell us what the API is going to do, and also suits just one
use-case (that in virtio-net.c).

Introduce virtqueue_get_avail_bytes(), which returns the number of
bytes in the vq available for input as well as output.
virtqueue_avail_bytes() is made a wrapper around this new function for
now.  It should be deprecated soon, though.

Doing this will also help with the virtio-rng patch where a
VirtQueueElement is popped only to find out what its size is.  With
this series applied, the popping (and the subsequent save/load of
state for migration) isn't necessary.

The virtio-serial-bus code becomes better too, that's patch 3 here.

Please apply,

Amit Shah (3):
  virtio: use unsigned int for counting bytes in vq
  virtio: Introduce virtqueue_get_avail_bytes()
  virtio-serial-bus: let chardev know the exact number of bytes
    requested

 hw/virtio-serial-bus.c |   11 +++--------
 hw/virtio.c            |   30 ++++++++++++++++++++++--------
 hw/virtio.h            |    5 ++++-
 3 files changed, 29 insertions(+), 17 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-26 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 10:37 [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes() Amit Shah
2012-07-06 10:37 ` [Qemu-devel] [PATCH 1/3] virtio: use unsigned int for counting bytes in vq Amit Shah
2012-07-06 10:37 ` [Qemu-devel] [PATCH 2/3] virtio: Introduce virtqueue_get_avail_bytes() Amit Shah
2012-07-06 10:37 ` [Qemu-devel] [PATCH 3/3] virtio-serial-bus: let chardev know the exact number of bytes requested Amit Shah
2012-07-16 12:58 ` [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes() Amit Shah
2012-07-26 14:27 ` Amit Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).