On Wed, Jun 06, 2018 at 11:41:18AM +0800, Jason Wang wrote: > > > On 2018年06月06日 11:38, Wei Xu wrote: > >>>+ > >>>+ head = vq->last_avail_idx; > >>>+ i = head; > >>>+ > >>>+ caches = vring_get_region_caches(vq); > >>>+ cache = &caches->desc; > >>>+ vring_packed_desc_read(vdev, &desc, cache, i); > >>I think we'd better find a way to avoid reading descriptor twice. > >Do you mean here and the read for empty check? > > > >Wei > > > > Yes.
OK, will figure it out. > > Thanks > >