mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
nvme: name the Create I/O queue cdw11 fields, use Medium QPRIO
The Create I/O queue commands carried magic 0x1/0x3 cdw11 values, and the implicit QPRIO of zero classifies every I/O queue Urgent the moment weighted round robin arbitration is enabled. No functional change with the round robin default. Approved by: ngie (co-mentor) Reviewed by: ngie, imp, adrian Differential Revision: https://reviews.freebsd.org/D59153
This commit is contained in:
1 parent
a14a81016b
commit
82f70a0070
2 files changed
+19
-4
No files matched your search
@@ -234,6 +234,20 @@ enum nvme_psdt {
|
||||
#define NVME_CMD_PSDT_SHIFT (6)
|
||||
#define NVME_CMD_PSDT_MASK (0x3)
|
||||
|
||||
/* Create I/O Submission Queue, cdw11 */
|
||||
#define NVME_CREATE_IO_SQ_PC (0x1)
|
||||
#define NVME_CREATE_IO_SQ_QPRIO_SHIFT (1)
|
||||
#define NVME_CREATE_IO_SQ_QPRIO_MASK (0x3)
|
||||
|
||||
/* Create I/O Completion Queue, cdw11 */
|
||||
#define NVME_CREATE_IO_CQ_PC (0x1)
|
||||
#define NVME_CREATE_IO_CQ_IEN (0x2)
|
||||
|
||||
/* Queue priority classes, used with weighted round robin arbitration. */
|
||||
#define NVME_QPRIO_URGENT (0)
|
||||
#define NVME_QPRIO_HIGH (1)
|
||||
#define NVME_QPRIO_MEDIUM (2)
|
||||
#define NVME_QPRIO_LOW (3)
|
||||
|
||||
#define NVME_STATUS_P_SHIFT (0)
|
||||
#define NVME_STATUS_P_MASK (0x1)
|
||||
|
||||
@@ -89,8 +89,8 @@ nvme_ctrlr_cmd_create_io_cq(struct nvme_controller *ctrlr,
|
||||
* structure.
|
||||
*/
|
||||
cmd->cdw10 = htole32(((io_que->num_entries-1) << 16) | io_que->id);
|
||||
/* 0x3 = interrupts enabled | physically contiguous */
|
||||
cmd->cdw11 = htole32((io_que->vector << 16) | 0x3);
|
||||
cmd->cdw11 = htole32((io_que->vector << 16) |
|
||||
NVME_CREATE_IO_CQ_IEN | NVME_CREATE_IO_CQ_PC);
|
||||
cmd->prp1 = htole64(io_que->cpl_bus_addr);
|
||||
|
||||
nvme_ctrlr_submit_admin_request(ctrlr, req);
|
||||
@@ -113,8 +113,9 @@ nvme_ctrlr_cmd_create_io_sq(struct nvme_controller *ctrlr,
|
||||
* structure.
|
||||
*/
|
||||
cmd->cdw10 = htole32(((io_que->num_entries-1) << 16) | io_que->id);
|
||||
/* 0x1 = physically contiguous */
|
||||
cmd->cdw11 = htole32((io_que->id << 16) | 0x1);
|
||||
cmd->cdw11 = htole32((io_que->id << 16) |
|
||||
NVMEF(NVME_CREATE_IO_SQ_QPRIO, NVME_QPRIO_MEDIUM) |
|
||||
NVME_CREATE_IO_SQ_PC);
|
||||
cmd->prp1 = htole64(io_que->cmd_bus_addr);
|
||||
|
||||
nvme_ctrlr_submit_admin_request(ctrlr, req);
|
||||
|
||||
Reference in new issue
Block a user