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: signature.asc
Description: PGP signature

Reply via email to