Page MenuHomeFreeBSD

cam nvme: Decode NVMe status for NVMe command failures
ClosedPublic

Authored by jhb on Sat, May 31, 9:02 PM.
Tags
None
Referenced Files
F120545965: D50632.diff
Thu, Jun 19, 12:26 AM
Unknown Object (File)
Fri, Jun 13, 6:15 AM
Unknown Object (File)
Fri, Jun 13, 6:14 AM
Unknown Object (File)
Fri, Jun 13, 6:12 AM
Unknown Object (File)
Fri, Jun 13, 2:40 AM
Unknown Object (File)
Fri, Jun 13, 2:05 AM
Unknown Object (File)
Wed, Jun 11, 10:36 PM
Unknown Object (File)
Sat, Jun 7, 4:35 PM
Subscribers
None

Details

Summary

Similar to ATA and SCSI, log the command status (in this case the
status code from the CQE) on the console for failed NVMe commands.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I wanted this to debug a NVMeoF error I saw in testing, but the error didn't reproduce after this. However, on my test machine, the NVMe drive it uses for its main storage doesn't implement support for flush, so I get an error in dmesg on every reboot and this is the output from that with these two patches applied:

nvme0: FLUSH sqid:1 cid:127 nsid:1
nvme0: INVALID OPCODE (00/01) crd:0 m:0 dnr:0 p:1 sqid:1 cid:127 cdw0:0
(nda0:nvme0:0:0:1): FLUSH. NCB: opc=0 fuse=0 nsid=1 prp1=0 prp2=0 cdw=0 0 0 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: INVALID_OPCODE
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
(nda0:nvme0:0:0:1): Synchronize cache failed

I have some similar changes to do this for devd as well...

This revision is now accepted and ready to land.Sat, May 31, 9:11 PM
In D50632#1155884, @imp wrote:

I have some similar changes to do this for devd as well...

Are you good with the earlier change as well (D50631)?

In D50632#1155908, @jhb wrote:
In D50632#1155884, @imp wrote:

I have some similar changes to do this for devd as well...

Are you good with the earlier change as well (D50631)?

Yea. I am. There's no conflicts or other reasons I can think to stop this.. with the proviso we'll likely refactor this and its companion un the fututre