Commit 74c16d8e authored by Alex Michon's avatar Alex Michon Committed by Tomasz Zawadzki
Browse files

nvme/pcie: Force psdt to PRP on admin commands without payload



The NVMe spec mentions:
PRPs shall be used for all Admin commands for NVMe over PCIe
implementations.

The psdt bit may not always be correctly set to PRP. For
example, if a command is received on the nvmf layer and is
forwarded to the nvme layer using passthru APIs, the psdt
bit will be incorrect.

Change-Id: Ib9ae49898230ee619894ca267650abd2503d90f5
Signed-off-by: default avatarAlex Michon <amichon@kalrayinc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21567


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 18d5de4a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1649,6 +1649,8 @@ nvme_pcie_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_reques
	tr->cb_fn = req->cb_fn;
	tr->cb_arg = req->cb_arg;
	req->cmd.cid = tr->cid;
	/* Use PRP by default. This bit will be overridden below if needed. */
	req->cmd.psdt = SPDK_NVME_PSDT_PRP;

	if (req->payload_size != 0) {
		payload_type = nvme_payload_type(&req->payload);