Commit a1a2e2b4 authored by Vincent Fu's avatar Vincent Fu Committed by Tomasz Zawadzki
Browse files

nvme/pcie: add debug print for number of SGL/PRP entries



Add debug prints for the number of SGL and PRP entries. This can be
useful for testing.

Change-Id: If78d1f5e0c3587f41da5018869f10de10a5e6253
Signed-off-by: default avatarVincent Fu <vincent.fu@samsung.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24196


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 8b5c4be8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1286,6 +1286,8 @@ nvme_pcie_qpair_build_contig_request(struct spdk_nvme_qpair *qpair, struct nvme_
				       req->payload_size, qpair->ctrlr->page_size);
	if (rc) {
		nvme_pcie_fail_request_bad_vtophys(qpair, tr);
	} else {
		SPDK_DEBUGLOG(nvme, "Number of PRP entries: %" PRIu32 "\n", prp_index);
	}

	return rc;
@@ -1371,6 +1373,7 @@ nvme_pcie_qpair_build_contig_hw_sgl_request(struct spdk_nvme_qpair *qpair, struc
		req->cmd.dptr.sgl1.unkeyed.length = nseg * sizeof(struct spdk_nvme_sgl_descriptor);
	}

	SPDK_DEBUGLOG(nvme, "Number of SGL descriptors: %" PRIu32 "\n", nseg);
	return 0;
}

@@ -1502,6 +1505,7 @@ nvme_pcie_qpair_build_hw_sgl_request(struct spdk_nvme_qpair *qpair, struct nvme_
		req->cmd.dptr.sgl1.unkeyed.length = nseg * sizeof(struct spdk_nvme_sgl_descriptor);
	}

	SPDK_DEBUGLOG(nvme, "Number of SGL descriptors: %" PRIu32 "\n", nseg);
	return 0;

exit:
@@ -1558,6 +1562,7 @@ nvme_pcie_qpair_build_prps_sgl_request(struct spdk_nvme_qpair *qpair, struct nvm
		remaining_transfer_len -= length;
	}

	SPDK_DEBUGLOG(nvme, "Number of PRP entries: %" PRIu32 "\n", prp_index);
	return 0;
}