]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: refactor NVMe IO command handling
authorChuck Tuffli <chuck@FreeBSD.org>
Mon, 29 Jun 2020 00:31:14 +0000 (00:31 +0000)
committerChuck Tuffli <chuck@FreeBSD.org>
Mon, 29 Jun 2020 00:31:14 +0000 (00:31 +0000)
commita43ab8d253d988d7ae5399ac1d8b5f2da6601712
treec4d9a613d6a8fb68c441af8a55874b2200bc6759
parent0220a2aeed34b2a001cb009365dab10d1be271d3
bhyve: refactor NVMe IO command handling

This refactors the NVMe I/O command processing function to make adding
new commands easier. The main change is to move command specific
processing (i.e. Read/Write) to separate functions for each NVMe I/O
command and leave the common per-command processing in the existing
pci_nvme_handle_io_cmd() function.

While here, add checks for some common errors (invalid Namespace ID,
invalid opcode, LBA out of range).

Add myself to the Copyright holders

Reviewed by: imp
Tested by: Jason Tubnor
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24879
usr.sbin/bhyve/pci_nvme.c