Re: [RFC v3 3/5] virtio_ring: add packed ring support

2018-05-10 Thread Tiwei Bie
On Thu, May 10, 2018 at 05:49:20PM +0800, Jason Wang wrote: > On 2018年05月10日 16:56, Tiwei Bie wrote: > > On Thu, May 10, 2018 at 03:34:50PM +0800, Jason Wang wrote: > > > On 2018年05月10日 15:32, Jason Wang wrote: > > > > On 2018年04月25日 13:15, Tiwei Bie wrote: > > > > > +    /* We're using some buffer

Re: [RFC v3 3/5] virtio_ring: add packed ring support

2018-05-10 Thread Jason Wang
On 2018年05月10日 16:56, Tiwei Bie wrote: On Thu, May 10, 2018 at 03:34:50PM +0800, Jason Wang wrote: On 2018年05月10日 15:32, Jason Wang wrote: On 2018年04月25日 13:15, Tiwei Bie wrote: +    /* We're using some buffers from the free list. */ +    vq->vq.num_free -= descs_used; + +    /* Update free

Re: [RFC v3 3/5] virtio_ring: add packed ring support

2018-05-10 Thread Tiwei Bie
On Thu, May 10, 2018 at 03:34:50PM +0800, Jason Wang wrote: > On 2018年05月10日 15:32, Jason Wang wrote: > > On 2018年04月25日 13:15, Tiwei Bie wrote: > > > +    /* We're using some buffers from the free list. */ > > > +    vq->vq.num_free -= descs_used; > > > + > > > +    /* Update free pointer */ > > >

Re: [RFC v3 3/5] virtio_ring: add packed ring support

2018-05-10 Thread Jason Wang
On 2018年05月10日 15:32, Jason Wang wrote: On 2018年04月25日 13:15, Tiwei Bie wrote: +    /* We're using some buffers from the free list. */ +    vq->vq.num_free -= descs_used; + +    /* Update free pointer */ +    if (indirect) { +    n = head + 1; +    if (n >= vq->vring_packed.num) { + 

Re: [RFC v3 3/5] virtio_ring: add packed ring support

2018-05-10 Thread Jason Wang
On 2018年04月25日 13:15, Tiwei Bie wrote: + /* We're using some buffers from the free list. */ + vq->vq.num_free -= descs_used; + + /* Update free pointer */ + if (indirect) { + n = head + 1; + if (n >= vq->vring_packed.num) { +

[RFC v3 3/5] virtio_ring: add packed ring support

2018-04-24 Thread Tiwei Bie
This commit introduces the basic support (without EVENT_IDX) for packed ring. Signed-off-by: Tiwei Bie --- drivers/virtio/virtio_ring.c | 444 ++- 1 file changed, 434 insertions(+), 10 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virti