virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	virtualization@lists.linux-foundation.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v1 1/6] virtio: rename vring_unmap_state_packed() to vring_unmap_extra_packed()
Date: Wed, 23 Feb 2022 10:41:05 +0800	[thread overview]
Message-ID: <82834889-b780-b091-a9f7-b5de849011c5@redhat.com> (raw)
In-Reply-To: <20220210085124.15466-2-xuanzhuo@linux.alibaba.com>


在 2022/2/10 下午4:51, Xuan Zhuo 写道:
> The actual parameter handled by vring_unmap_state_packed() is that
> vring_desc_extra, so this function should use "extra" instead of "state".
>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>


Acked-by: Jason Wang <jasowang@redhat.com>


> ---
>   drivers/virtio/virtio_ring.c | 17 ++++++++---------
>   1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 962f1477b1fa..7cf3ae057833 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -984,24 +984,24 @@ static struct virtqueue *vring_create_virtqueue_split(
>    * Packed ring specific functions - *_packed().
>    */
>   
> -static void vring_unmap_state_packed(const struct vring_virtqueue *vq,
> -				     struct vring_desc_extra *state)
> +static void vring_unmap_extra_packed(const struct vring_virtqueue *vq,
> +				     struct vring_desc_extra *extra)
>   {
>   	u16 flags;
>   
>   	if (!vq->use_dma_api)
>   		return;
>   
> -	flags = state->flags;
> +	flags = extra->flags;
>   
>   	if (flags & VRING_DESC_F_INDIRECT) {
>   		dma_unmap_single(vring_dma_dev(vq),
> -				 state->addr, state->len,
> +				 extra->addr, extra->len,
>   				 (flags & VRING_DESC_F_WRITE) ?
>   				 DMA_FROM_DEVICE : DMA_TO_DEVICE);
>   	} else {
>   		dma_unmap_page(vring_dma_dev(vq),
> -			       state->addr, state->len,
> +			       extra->addr, extra->len,
>   			       (flags & VRING_DESC_F_WRITE) ?
>   			       DMA_FROM_DEVICE : DMA_TO_DEVICE);
>   	}
> @@ -1303,8 +1303,7 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq,
>   	for (n = 0; n < total_sg; n++) {
>   		if (i == err_idx)
>   			break;
> -		vring_unmap_state_packed(vq,
> -					 &vq->packed.desc_extra[curr]);
> +		vring_unmap_extra_packed(vq, &vq->packed.desc_extra[curr]);
>   		curr = vq->packed.desc_extra[curr].next;
>   		i++;
>   		if (i >= vq->packed.vring.num)
> @@ -1383,8 +1382,8 @@ static void detach_buf_packed(struct vring_virtqueue *vq,
>   	if (unlikely(vq->use_dma_api)) {
>   		curr = id;
>   		for (i = 0; i < state->num; i++) {
> -			vring_unmap_state_packed(vq,
> -				&vq->packed.desc_extra[curr]);
> +			vring_unmap_extra_packed(vq,
> +						 &vq->packed.desc_extra[curr]);
>   			curr = vq->packed.desc_extra[curr].next;
>   		}
>   	}

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-02-23  2:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  8:51 [PATCH v1 0/6] virtio: support advance DMA Xuan Zhuo
2022-02-10  8:51 ` [PATCH v1 1/6] virtio: rename vring_unmap_state_packed() to vring_unmap_extra_packed() Xuan Zhuo
2022-02-23  2:41   ` Jason Wang [this message]
2022-02-10  8:51 ` [PATCH v1 2/6] virtio: remove flags check for unmap split indirect desc Xuan Zhuo
2022-02-23  2:42   ` Jason Wang
2022-02-10  8:51 ` [PATCH v1 3/6] virtio: remove flags check for unmap packed " Xuan Zhuo
2022-02-23  2:53   ` Jason Wang
2022-02-23  8:30     ` Xuan Zhuo
2022-02-10  8:51 ` [PATCH v1 4/6] virtio: virtqueue_add() support predma Xuan Zhuo
2022-02-23  3:00   ` Jason Wang
2022-02-23  3:02     ` Jason Wang
2022-02-10  8:51 ` [PATCH v1 5/6] virtio: split: virtqueue_add_split() support dma address Xuan Zhuo
2022-02-23  3:38   ` Jason Wang
2022-02-10  8:51 ` [PATCH v1 6/6] virtio: packed: virtqueue_add_packed() " Xuan Zhuo
2022-02-23  3:43   ` Jason Wang
2022-02-17  7:19 ` [PATCH v1 0/6] virtio: support advance DMA Jason Wang
2022-02-18  8:55   ` Xuan Zhuo
2022-02-18  9:24     ` Michael S. Tsirkin
2022-02-18  9:29       ` Xuan Zhuo
2022-02-21  1:36       ` Jason Wang
2022-02-21  3:32     ` Jason Wang
2022-02-21  3:39       ` Xuan Zhuo
2022-02-21  3:53         ` Jason Wang
2022-02-21  5:59           ` Xuan Zhuo
2022-02-21  6:18             ` Xuan Zhuo
2022-02-21  6:37               ` Jason Wang
2022-02-21  6:41                 ` Xuan Zhuo
2022-02-21  6:55                   ` Jason Wang
2022-02-21  7:46                     ` Xuan Zhuo
2022-02-21  6:46                 ` Xuan Zhuo
2022-02-21  6:56                   ` Jason Wang
2022-02-21 11:23       ` Xuan Zhuo
2022-02-22  4:02         ` Jason Wang
2022-02-22  7:48           ` Xuan Zhuo
2022-02-23  2:58             ` Jason Wang
2022-02-23  3:44               ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82834889-b780-b091-a9f7-b5de849011c5@redhat.com \
    --to=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).