qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Kangjie Xu <kangjie.xu@linux.alibaba.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com, arei.gonglei@huawei.com,
	hengqi@linux.alibaba.com, xuanzhuo@linux.alibaba.com
Subject: Re: [PATCH v2 5/6] virtio-net: vhost-user: update queue_reset and queue_enable
Date: Wed, 14 Sep 2022 11:14:54 +0800	[thread overview]
Message-ID: <12f89fc0-871e-c29a-89b9-cfe4ae2486ef@redhat.com> (raw)
In-Reply-To: <407c17b9a62bb7be06423b00a77b0fe301dc46de.1662949366.git.kangjie.xu@linux.alibaba.com>


在 2022/9/12 11:10, Kangjie Xu 写道:
> Update virtio_net_queue_reset() and virtio_net_queue_enable()
> for vhost-user scenario.
>
> Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
> Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>


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


> ---
>   hw/net/virtio-net.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 6ab796b399..19a2132180 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -550,7 +550,8 @@ static void virtio_net_queue_reset(VirtIODevice *vdev, uint32_t queue_index)
>       }
>   
>       if (get_vhost_net(nc->peer) &&
> -        nc->peer->info->type == NET_CLIENT_DRIVER_TAP) {
> +        (nc->peer->info->type == NET_CLIENT_DRIVER_TAP ||
> +         nc->peer->info->type == NET_CLIENT_DRIVER_VHOST_USER)) {
>           vhost_net_virtqueue_reset(vdev, nc, queue_index);
>       }
>   
> @@ -568,7 +569,8 @@ static void virtio_net_queue_enable(VirtIODevice *vdev, uint32_t queue_index)
>       }
>   
>       if (get_vhost_net(nc->peer) &&
> -        nc->peer->info->type == NET_CLIENT_DRIVER_TAP) {
> +        (nc->peer->info->type == NET_CLIENT_DRIVER_TAP ||
> +         nc->peer->info->type == NET_CLIENT_DRIVER_VHOST_USER)) {
>           r = vhost_net_virtqueue_restart(vdev, nc, queue_index);
>           if (r < 0) {
>               error_report("unable to restart vhost net virtqueue: %d, "



  reply	other threads:[~2022-09-14  3:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  3:10 [PATCH v2 0/6] Support VIRTIO_F_RING_RESET for vhost-user in virtio pci-modern Kangjie Xu
2022-09-12  3:10 ` [PATCH v2 1/6] net: virtio: rename vhost_set_vring_enable to vhost_set_dev_enable Kangjie Xu
2022-09-14  3:06   ` Jason Wang
2022-09-12  3:10 ` [PATCH v2 2/6] vhost-user: add op to enable or disable a single vring Kangjie Xu
2022-09-14  3:07   ` Jason Wang
2022-09-12  3:10 ` [PATCH v2 3/6] vhost-net: vhost-user: update vhost_net_virtqueue_reset() Kangjie Xu
2022-09-14  3:13   ` Jason Wang
2022-09-14  6:18     ` Xuan Zhuo
2022-09-15  2:12       ` Jason Wang
2022-09-15 11:17         ` Xuan Zhuo
2022-09-26  7:51         ` Xuan Zhuo
2022-09-12  3:10 ` [PATCH v2 4/6] vhost-net: vhost-user: update vhost_net_virtqueue_restart() Kangjie Xu
2022-09-12  3:10 ` [PATCH v2 5/6] virtio-net: vhost-user: update queue_reset and queue_enable Kangjie Xu
2022-09-14  3:14   ` Jason Wang [this message]
2022-09-12  3:10 ` [PATCH v2 6/6] vhost: vhost-user: enable vq reset feature Kangjie Xu
2022-09-14  3:15   ` 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=12f89fc0-871e-c29a-89b9-cfe4ae2486ef@redhat.com \
    --to=jasowang@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=kangjie.xu@linux.alibaba.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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).