From 513b7bb12fb4a50c75f5225076fcaf5fafc02133 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Tue, 25 Aug 2026 16:45:11 -0700 Subject: [PATCH] ebsnvme-stats: Correct numd Per the NVMe specification: "Number of Dwords Lower (NUMDL): This field specifies the least significant 16 bits of the number of dwords to return unless otherwise specified. If the host specifies a size larger than the log page requested, the controller returns the complete log page with undefined results for dwords beyond the end of the log page, unless otherwise specified. The combined NUMDL field and NUMDU field form a 0's based value." Since the number of Dwords is 1024 (4096 / 4) and this is expressed as a *0's based value* the value which must be stored in the top 16 bits of Command Dword 10 is 1024 - 1 = 1023, not 1024. Signed-off-by: Colin Percival --- ebsnvme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebsnvme b/ebsnvme index 2c2f931..76734fc 100755 --- a/ebsnvme +++ b/ebsnvme @@ -231,7 +231,7 @@ class ebs_nvme_device_stats(ebs_nvme_device): addr=addressof(stats), alen=sizeof(stats), nsid=1, - cdw10=(AMZN_NVME_STATS_LOGPAGE_ID | (1024 << 16)) + cdw10=(AMZN_NVME_STATS_LOGPAGE_ID | (1023 << 16)) ) self._nvme_ioctl(admin_cmd)