From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
Max Reitz <mreitz@redhat.com>, Keith Busch <kbusch@kernel.org>,
Eric Auger <eric.auger@redhat.com>,
Klaus Jensen <its@irrelevant.dk>
Subject: Re: [PATCH-for-5.2] block/nvme: Fix nvme_submit_command() on big-endian host
Date: Wed, 28 Oct 2020 07:51:38 +0000 [thread overview]
Message-ID: <20201028075138.GA221115@stefanha-x1.localdomain> (raw)
In-Reply-To: <20201027160407.418423-1-philmd@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
On Tue, Oct 27, 2020 at 05:04:07PM +0100, Philippe Mathieu-Daudé wrote:
> The Completion Queue Command Identifier is a 16-bit value,
> so nvme_submit_command() is unlikely to work on big-endian
> hosts, as the relevant bits are truncated.
>
> The "Completion Queue Entry: DW 2" describes it as:
>
> This identifier is assigned by host software when
> the command is submitted to the Submission
>
> As the is just an opaque cookie, it is pointless to byte-swap it.
The code does not make it clear that the missing byteswap is
intentional. Please either fix the byteswap (32 -> 16) or add code
comments explaining why the byteswap is not necessary.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-10-28 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 16:04 [PATCH-for-5.2] block/nvme: Fix nvme_submit_command() on big-endian host Philippe Mathieu-Daudé
2020-10-28 7:51 ` Stefan Hajnoczi [this message]
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=20201028075138.GA221115@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=eric.auger@redhat.com \
--cc=fam@euphon.net \
--cc=its@irrelevant.dk \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--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).