From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org, stefanha@redhat.com
Cc: "Eugenio Pérez" <eperezma@redhat.com>,
"Si-Wei Liu" <si-wei.liu@oracle.com>,
"Jason Wang" <jasowang@redhat.com>
Subject: [PULL 6/8] virtio-net: Update virtio-net curr_queue_pairs in vdpa backends
Date: Tue, 27 Sep 2022 15:30:20 +0800 [thread overview]
Message-ID: <20220927073022.28378-7-jasowang@redhat.com> (raw)
In-Reply-To: <20220927073022.28378-1-jasowang@redhat.com>
From: Eugenio Pérez <eperezma@redhat.com>
It was returned as error before. Instead of it, simply update the
corresponding field so qemu can send it in the migration data.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/virtio-net.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index dd0d056..63a8332 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1412,19 +1412,14 @@ static int virtio_net_handle_mq(VirtIONet *n, uint8_t cmd,
return VIRTIO_NET_ERR;
}
- /* Avoid changing the number of queue_pairs for vdpa device in
- * userspace handler. A future fix is needed to handle the mq
- * change in userspace handler with vhost-vdpa. Let's disable
- * the mq handling from userspace for now and only allow get
- * done through the kernel. Ripples may be seen when falling
- * back to userspace, but without doing it qemu process would
- * crash on a recursive entry to virtio_net_set_status().
- */
+ n->curr_queue_pairs = queue_pairs;
if (nc->peer && nc->peer->info->type == NET_CLIENT_DRIVER_VHOST_VDPA) {
- return VIRTIO_NET_ERR;
+ /*
+ * Avoid updating the backend for a vdpa device: We're only interested
+ * in updating the device model queues.
+ */
+ return VIRTIO_NET_OK;
}
-
- n->curr_queue_pairs = queue_pairs;
/* stop the backend before changing the number of queue_pairs to avoid handling a
* disabled queue */
virtio_net_set_status(vdev, vdev->status);
--
2.7.4
next prev parent reply other threads:[~2022-09-27 7:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 7:30 [PULL 0/8] Net patches Jason Wang
2022-09-27 7:30 ` [PULL 1/8] e1000e: set RX desc status with DD flag in a separate operation Jason Wang
2022-09-27 7:30 ` [PULL 2/8] vdpa: Make VhostVDPAState cvq_cmd_in_buffer control ack type Jason Wang
2022-09-27 7:30 ` [PULL 3/8] vdpa: extract vhost_vdpa_net_load_mac from vhost_vdpa_net_load Jason Wang
2022-09-27 7:30 ` [PULL 4/8] vdpa: Add vhost_vdpa_net_load_mq Jason Wang
2022-09-27 7:30 ` [PULL 5/8] vdpa: validate MQ CVQ commands Jason Wang
2022-09-27 7:30 ` Jason Wang [this message]
2022-09-27 7:30 ` [PULL 7/8] vdpa: Allow MQ feature in SVQ Jason Wang
2022-09-27 7:30 ` [PULL 8/8] virtio: del net client if net_init_tap_one failed Jason Wang
2022-09-27 18:40 ` [PULL 0/8] Net patches Stefan Hajnoczi
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=20220927073022.28378-7-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=eperezma@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=si-wei.liu@oracle.com \
--cc=stefanha@redhat.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).