Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 04:00:21PM +0800, Jason Wang wrote: > > > On 2016年11月15日 11:28, Michael S. Tsirkin wrote: > > On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: > > > > > > On 2016年11月12日 00:20, Michael S. Tsirkin wrote: > > > > On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 04:00:21PM +0800, Jason Wang wrote: > > > On 2016年11月15日 11:28, Michael S. Tsirkin wrote: > > On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: > > > > > > On 2016年11月12日 00:20, Michael S. Tsirkin wrote: > > > > On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-15 Thread Jason Wang
On 2016年11月15日 11:28, Michael S. Tsirkin wrote: On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: On 2016年11月12日 00:20, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-15 Thread Jason Wang
On 2016年11月15日 11:28, Michael S. Tsirkin wrote: On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: On 2016年11月12日 00:20, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-14 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: > > > On 2016年11月12日 00:20, Michael S. Tsirkin wrote: > > On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: > > > > > > On 2016年11月11日 11:41, Michael S. Tsirkin wrote: > > > > On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-14 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 11:16:59AM +0800, Jason Wang wrote: > > > On 2016年11月12日 00:20, Michael S. Tsirkin wrote: > > On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: > > > > > > On 2016年11月11日 11:41, Michael S. Tsirkin wrote: > > > > On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-14 Thread Jason Wang
On 2016年11月12日 00:20, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: On 2016年11月10日 03:57, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-14 Thread Jason Wang
On 2016年11月12日 00:20, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: On 2016年11月10日 03:57, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-11 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: > > > On 2016年11月11日 11:41, Michael S. Tsirkin wrote: > > On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > > > > > > > > > > >On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > > > > > >On Wed, Nov 09, 2016 at 03:38:32PM

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-11 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 12:18:50PM +0800, Jason Wang wrote: > > > On 2016年11月11日 11:41, Michael S. Tsirkin wrote: > > On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > > > > > > > > > > >On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > > > > > >On Wed, Nov 09, 2016 at 03:38:32PM

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > >On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > >On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > >We should use vq->last_avail_idx instead of vq->avail_idx in

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > >On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > >On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > >We should use vq->last_avail_idx instead of vq->avail_idx in

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > > On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > > On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > > We should use vq->last_avail_idx instead of vq->avail_idx in the > > > checking of vhost_vq_avail_empty() since

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > > On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > > On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > > We should use vq->last_avail_idx instead of vq->avail_idx in the > > > checking of vhost_vq_avail_empty() since

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月10日 03:57, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: We should use vq->last_avail_idx instead of vq->avail_idx in the checking of vhost_vq_avail_empty() since latter is the cached avail index from guest but we want to know if there's

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月10日 03:57, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: We should use vq->last_avail_idx instead of vq->avail_idx in the checking of vhost_vq_avail_empty() since latter is the cached avail index from guest but we want to know if there's

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-09 Thread Michael S. Tsirkin
On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > We should use vq->last_avail_idx instead of vq->avail_idx in the > checking of vhost_vq_avail_empty() since latter is the cached avail > index from guest but we want to know if there's pending available > buffers in the virtqueue. > >

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-09 Thread Michael S. Tsirkin
On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > We should use vq->last_avail_idx instead of vq->avail_idx in the > checking of vhost_vq_avail_empty() since latter is the cached avail > index from guest but we want to know if there's pending available > buffers in the virtqueue. > >

[PATCH 2/3] vhost: better detection of available buffers

2016-11-08 Thread Jason Wang
We should use vq->last_avail_idx instead of vq->avail_idx in the checking of vhost_vq_avail_empty() since latter is the cached avail index from guest but we want to know if there's pending available buffers in the virtqueue. Signed-off-by: Jason Wang ---

[PATCH 2/3] vhost: better detection of available buffers

2016-11-08 Thread Jason Wang
We should use vq->last_avail_idx instead of vq->avail_idx in the checking of vhost_vq_avail_empty() since latter is the cached avail index from guest but we want to know if there's pending available buffers in the virtqueue. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 2 +- 1 file