Skip to content

Commit 9fe436b

Browse files
Revert various related big-endian PI commits
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]>
1 parent 555d4c1 commit 9fe436b

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/nvme/ioctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,9 +1920,9 @@ static int nvme_set_var_size_tags(__u32 *cmd_dw2, __u32 *cmd_dw3, __u32 *cmd_dw1
19201920
return -1;
19211921
}
19221922

1923-
*cmd_dw2 = cpu_to_be32(cdw2);
1924-
*cmd_dw3 = cpu_to_be32(cdw3);
1925-
*cmd_dw14 = cpu_to_be32(cdw14);
1923+
*cmd_dw2 = cdw2;
1924+
*cmd_dw3 = cdw3;
1925+
*cmd_dw14 = cdw14;
19261926
return 0;
19271927
}
19281928

src/nvme/util.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,8 @@ const char *nvme_status_to_string(int status, bool fabrics)
413413

414414
static inline void nvme_init_copy_range_elbt(__u8 *elbt, __u64 eilbrt)
415415
{
416-
int i;
417-
418-
for (i = 0; i < 8; i++)
419-
elbt[9 - i] = (eilbrt >> (8 * i)) & 0xff;
416+
__u64 *ref_tag_region = (__u64 *)&elbt[2];
417+
*ref_tag_region = eilbrt;
420418
elbt[1] = 0;
421419
elbt[0] = 0;
422420
}

0 commit comments

Comments
 (0)