qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH]virtio: virtqueue_get_avail_bytes: fix desc_pa w


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH]virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table
Date: Thu, 22 Aug 2013 13:59:21 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 22, 2013 at 02:47:16PM +0800, yinyin wrote:
> virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it.
>            /* loop over the indirect descriptor table */
>            indirect = 1;
>            max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc);
>            num_bufs = i = 0;
>            desc_pa = vring_desc_addr(desc_pa, i);
> But, It init i to 0, then use i to update desc_pa. so we will always get:
> desc_pa = vring_desc_addr(desc_pa, 0);
> the last two line should swap.
> 
> Signed-off-by: Yin Yin <address@hidden>
> ---
>  hw/virtio/virtio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]