From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 1/6] virtio-net: use the backend cross-endian capabilities
Date: Fri, 5 Feb 2016 12:33:44 +0100 [thread overview]
Message-ID: <20160205123344.5daf7a47.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20160205103937.21017.4795.stgit@bahia.huguette.org>
On Fri, 05 Feb 2016 11:43:11 +0100
Greg Kurz <gkurz@linux.vnet.ibm.com> wrote:
> +static bool virtio_net_set_vnet_endian(VirtIODevice *vdev, NetClientState *ncs,
> + int queues, bool enable)
You might consider adding a comment like "returns whether endianness
handling needs to fall back to the device" or so, as it's not
immediately obvious what true/false is supposed to mean. But the patch
is fine.
> +{
> + int i;
> +
> + for (i = 0; i < queues; i++) {
> + if (virtio_net_set_vnet_endian_one(vdev, ncs[i].peer, enable) < 0 &&
> + enable) {
> + while (--i >= 0) {
> + virtio_net_set_vnet_endian_one(vdev, ncs[i].peer, false);
> + }
> +
> + return true;
> + }
> + }
> +
> + return false;
> +}
next prev parent reply other threads:[~2016-02-05 11:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 10:39 [Qemu-devel] [PATCH v4 0/6] virtio/vhost cross-endian cleanup Greg Kurz
2016-02-05 10:43 ` [Qemu-devel] [PATCH v4 1/6] virtio-net: use the backend cross-endian capabilities Greg Kurz
2016-02-05 11:33 ` Cornelia Huck [this message]
2016-02-05 15:41 ` Greg Kurz
2016-02-05 10:45 ` [Qemu-devel] [PATCH v4 2/6] vhost-net: revert support of cross-endian vnet headers Greg Kurz
2016-02-05 10:45 ` [Qemu-devel] [PATCH v4 3/6] virtio: move cross-endian helper to vhost Greg Kurz
2016-02-05 10:45 ` [Qemu-devel] [PATCH v4 4/6] vhost: move virtio 1.0 check to cross-endian helper Greg Kurz
2016-02-05 13:06 ` Laurent Vivier
2016-02-05 10:46 ` [Qemu-devel] [PATCH v4 5/6] vhost: simplify vhost_needs_vring_endian() Greg Kurz
2016-02-05 11:39 ` Cornelia Huck
2016-02-05 13:02 ` Laurent Vivier
2016-02-05 10:46 ` [Qemu-devel] [PATCH v4 6/6] virtio: optimize virtio_access_is_big_endian() for little-endian targets Greg Kurz
2016-02-05 13:07 ` [Qemu-devel] [PATCH v4 0/6] virtio/vhost cross-endian cleanup Laurent Vivier
2016-02-10 10:22 ` Laurent Vivier
2016-02-16 9:57 ` Greg Kurz
2016-02-16 10:04 ` Michael S. Tsirkin
2016-02-16 10:07 ` Greg Kurz
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=20160205123344.5daf7a47.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=gkurz@linux.vnet.ibm.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).