Commit df26ab05 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme: add priority field to qpair



Set up the infrastructure for creating I/O submission queues with
variable queue priority (QPRIO in Create I/O SQ command).

Currently, this is unused, since we always use the default arbitration
method (round robin), but it will allow reinitializing submission queues
with the correct priority once weighted round robin is supported.

Change-Id: I425003879e624cfcc9687bdc495b5c1726b5a8af
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 0b2848ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ nvme_ctrlr_cmd_create_io_sq(struct spdk_nvme_ctrlr *ctrlr,
	 */
	cmd->cdw10 = ((io_que->num_entries - 1) << 16) | io_que->id;
	/* 0x1 = physically contiguous */
	cmd->cdw11 = (io_que->id << 16) | 0x1;
	cmd->cdw11 = (io_que->id << 16) | (io_que->qprio << 1) | 0x1;
	cmd->dptr.prp.prp1 = io_que->cmd_bus_addr;

	nvme_ctrlr_submit_admin_request(ctrlr, req);
+2 −0
Original line number Diff line number Diff line
@@ -275,6 +275,8 @@ struct spdk_nvme_qpair {

	uint64_t			cmd_bus_addr;
	uint64_t			cpl_bus_addr;

	uint8_t				qprio;
};

struct spdk_nvme_ns {
+1 −0
Original line number Diff line number Diff line
@@ -536,6 +536,7 @@ nvme_qpair_construct(struct spdk_nvme_qpair *qpair, uint16_t id,

	qpair->id = id;
	qpair->num_entries = num_entries;
	qpair->qprio = 0;

	qpair->ctrlr = ctrlr;