Public bug reported: The attached screenshot of a PCIe trace snippet is from Ubuntu 20.04.3 LTS, k5.4.0-73-generic, with an NVMe controller formatted to 4K+8 DIX PI2
It shows - A Single-sector Write Zeroes command with SLBA=0x02E18439, ILBRT=0x0 (valid for PI2), PRCHK=0x0 (no checks), PRACT=0 *, DEAC=0 **. Command succeeds. - A Single-sector Read command with SLBA=0x02E18439, EILBRT=0x02E18439, PRCHK=0x5. Command rejected with ‘End to End Ref tag Check Error’. Using ILBRT/EILBRT=SLBA and PRCHK=0x5 is standard for PI2 Reads and Writes in Ubuntu (so making it no different to PI1); but if Ubuntu wants to use these values to successfully read data following a Write Zeroes command, the Write Zeroes command should either: a) set the PRACT bit, causing the controller to generate PI data in accordance with the PI mode*; or b) set the DEAC bit, causing the controller to generate standard Deallocated PI data** (all FFs) thus disabling all checks on the next Read via the AppTag/RefTag=0xFFFF rule. Relevant NVMe 1.4 text: * “If the Protection Information Action bit (PRACT) is cleared to ‘0’, then the protection information for this command shall be all zeroes. If the Protection Information Action bit (PRACT) is set to ‘1’, then the protection information shall be based on the End-to-end Data Protection Type Settings (DPS) field in the Identify Namespace data structure and the CDW14.ILBRT, CDW15. LBATM, and CDW15. LBAT fields in the Write Zeroes command. “ ** “If the Deallocate bit is cleared to ‘0’ in a Write Zeroes command… [the controller] shall return the protection information in that logical block based on CDW12.PRINFO in that Write Zeroes command. If the Deallocate bit (CDW12.DEAC) is set to ‘1’ in a Write Zeroes command… [the controller] shall return the protection information in that logical block as specified in section 6.7.1.1 [DSM]” ** Affects: ubuntu Importance: Undecided Status: New ** Tags: nvme ** Attachment added: "Screenshot of LeCroy PCIe trace" https://bugs.launchpad.net/bugs/1947757/+attachment/5534326/+files/4k8DixPI2_Wr0s-Rd.png -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1947757 Title: NVMe Write Zeroes command has incorrect values for PI modes To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/1947757/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs