NVMe Target implementation question
James Swaro
j.swaro at samsung.com
Mon Nov 9 03:01:15 PST 2026
Hi everyone,
I'm writing an NVMe initiator implementation and noticed an oddity in the kernel target implementation. When initializing a request structure in the target for a received message (drivers/nvme/target/core.c:966), the driver is checking whether the flags are set to SGL_METABUF and returning an error if it isn't set to SGL_METABUF. This seems to be incorrect according to the specification, so I wanted to get clarification here first.
According to the NVMe 2.4 Base Specification, section 6.5 & 6.6 (Property semantics), byte 1 containing the PDST/flags is supposed to be cleared to 0h. When clearing that byte on the initiator, this causes the target to return with an invalid command and DNR=1. Is this a case of legacy behavior being preserved from older specifications? Is there some part of the specification which contradicts this that I missed?
Kind regards,
James Swaro
Samsung SDS
More information about the Linux-nvme
mailing list