HomeFreeBSD

bhyve: refactor NVMe IO command handling

Description

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

Details

Provenance
chuckAuthored on
Reviewer
imp
Differential Revision
D24879: bhyve: refactor NVMe IO command handling
Parents
rS362744: bhyve: convert NVMe logging statements
Branches
Unknown
Tags
Unknown