Revert various related big-endian PI commits#982
Revert various related big-endian PI commits#982brandon-paupore-sndk wants to merge 1 commit intolinux-nvme:masterfrom
Conversation
| cdw2 = (args->storage_tag >> 32) & 0xffff; | ||
| cdw3 = args->storage_tag & 0xffffffff; | ||
| cdw14 = args->reftag; | ||
| cdw2 = cpu_to_le32((args->storage_tag >> 32) & 0xffff); |
There was a problem hiding this comment.
This is still wrong, you should never have to do any byte swapping for the command dwords. The driver will take care of that if necessary. Just store the command values in native cpu format.
There was a problem hiding this comment.
Good to know, will update the commit message as well.
This reverts a series of related changes that mapped storage and reference tags into the shared region over multiple CDWords in big-endian ordering. Keith confirmed the CDWords are always in host-endian ordering, and that the MSB-LSB representation in the spec is for the metadata payload itself as handled by the driver. Signed-off-by: Brandon Paupore <[email protected]>
d50b0e0 to
9fe436b
Compare
|
@keithbusch this PR also updates the |
|
The copy command's elbt field is part of the payload, so that part does need the host to do whatever encoding manipulation is required. The patch will mean big vs little endian CPU's will produce different payloads, so I don't think it's right. But I am not sure exactly what the format is supposed to be here, the spec is a bit confusing on this. I'd just drop that part from the patch. |
|
Thanks, so that means your patch on the mailing list the likely the only fix needed. Gosh, I already thought I am too stupid to read the spec. This part of the spec is completely bonkers. |
|
Seems good to me, thanks for the details Keith. Feel free to close this, or if you prefer I could update to just have the non-payload updates here. |
|
Okay, I'll take the version from Keith. Thanks for everyone helping out with this one. Highly appreciated! |
And we didn't even have a copy-offload talk at LSFMM this year. We're losing our touch... |
This reverts a series of related changes that mapped storage and reference tags into the shared region over multiple CDWords in big-endian ordering. Keith confirmed the CDWords are always in little-endian ordering, and that the MSB-LSB representation in the spec is for the metadata payload itself.