From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
Jason Wang <jasowang@redhat.com>, Cindy Lu <lulu@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: [PATCH 3/3] virtio-net: Fix log message
Date: Wed, 17 Nov 2021 20:28:51 +0100 [thread overview]
Message-ID: <20211117192851.65529-4-eperezma@redhat.com> (raw)
In-Reply-To: <20211117192851.65529-1-eperezma@redhat.com>
The message has never been true in the case of non tap networking, so
only tell that userland networking will be used if possible.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
hw/net/virtio-net.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 8c5c4e5a9d..5933c0961c 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -245,6 +245,7 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
NetClientState *nc = qemu_get_queue(n->nic);
int queue_pairs = n->multiqueue ? n->max_queue_pairs : 1;
int cvq = n->max_ncs - n->max_queue_pairs;
+ bool tap_backend = nc->peer->info->type == NET_CLIENT_DRIVER_TAP;
if (!get_vhost_net(nc->peer)) {
return;
@@ -258,9 +259,9 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
int r, i;
if (n->needs_vnet_hdr_swap) {
- error_report("backend does not support %s vnet headers; "
- "falling back on userspace virtio",
- virtio_is_big_endian(vdev) ? "BE" : "LE");
+ error_report("backend does not support %s vnet headers%s",
+ virtio_is_big_endian(vdev) ? "BE" : "LE",
+ tap_backend ? "; falling back on userspace virtio" : "");
return;
}
@@ -288,8 +289,8 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
n->vhost_started = 1;
r = vhost_net_start(vdev, n->nic->ncs, queue_pairs, cvq);
if (r < 0) {
- error_report("unable to start vhost net: %d: "
- "falling back on userspace virtio", -r);
+ error_report("unable to start vhost net: %d%s", -r,
+ tap_backend ? " falling back on userspace virtio" : "");
n->vhost_started = 0;
}
} else {
--
2.27.0
next prev parent reply other threads:[~2021-11-17 19:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 19:28 [PATCH 0/3] virtio-net: Only enable userland vq if using tap backend Eugenio Pérez
2021-11-17 19:28 ` [PATCH 1/3] virtio-net: Fix indentation Eugenio Pérez
2021-11-17 19:28 ` [PATCH 2/3] virtio-net: Only enable userland vq if using tap backend Eugenio Pérez
2021-11-18 5:06 ` Jason Wang
2021-11-18 7:56 ` Eugenio Perez Martin
2021-11-19 2:44 ` Jason Wang
2021-11-19 7:49 ` Eugenio Perez Martin
2021-11-22 2:39 ` Jason Wang
2021-11-22 6:23 ` Eugenio Perez Martin
2021-11-22 6:30 ` Jason Wang
2021-11-17 19:28 ` Eugenio Pérez [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-19 10:20 [PATCH 0/3] vdpa: Fix SIGSEGV on failed vdpa devices Eugenio Pérez
2021-11-19 10:20 ` [PATCH 3/3] virtio-net: Fix log message Eugenio Pérez
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=20211117192851.65529-4-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=lulu@redhat.com \
--cc=lvivier@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).