Re: [PATCH RFC 1/3] virtio_ring: add capacity check API

2011-06-02 Thread Michael S. Tsirkin
On Thu, Jun 02, 2011 at 11:41:50AM +0930, Rusty Russell wrote: > On Wed, 1 Jun 2011 12:49:46 +0300, "Michael S. Tsirkin" > wrote: > > Add API to check ring capacity. Because of the option > > to use indirect buffers, this returns the worst > > case, not the normal case capacity. > > Can we drop

Re: [PATCH RFC 1/3] virtio_ring: add capacity check API

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 12:49:46 +0300, "Michael S. Tsirkin" wrote: > Add API to check ring capacity. Because of the option > to use indirect buffers, this returns the worst > case, not the normal case capacity. Can we drop the silly "add_buf() returns capacity" hack then? Thanks, Rusty.

[PATCH RFC 1/3] virtio_ring: add capacity check API

2011-06-01 Thread Michael S. Tsirkin
Add API to check ring capacity. Because of the option to use indirect buffers, this returns the worst case, not the normal case capacity. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c |8 include/linux/virtio.h |5 + 2 files changed, 13 insertions(