Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149004774
D54714.1789356586.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D54714.1789356586.diff
View Options
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1877,8 +1877,10 @@
struct nvme_request *req)
{
struct nvme_qpair *qpair;
+ int32_t ioq;
- qpair = &ctrlr->ioq[QP(ctrlr, curcpu)];
+ ioq = req->ioq == NVME_IOQ_DEFAULT ? QP(ctrlr, curcpu) : req->ioq;
+ qpair = &ctrlr->ioq[ioq];
nvme_qpair_submit_request(qpair, req);
}
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -113,6 +113,8 @@
nvme_cb_fn_t cb_fn;
void *cb_arg;
int32_t retries;
+ int32_t ioq;
+#define NVME_IOQ_DEFAULT (-1)
bool payload_valid;
bool timeout;
bool spare[2]; /* Future use */
@@ -491,6 +493,7 @@
req = malloc(sizeof(*req), M_NVME, how | M_ZERO);
if (req != NULL) {
+ req->ioq = NVME_IOQ_DEFAULT;
req->cb_fn = cb_fn;
req->cb_arg = cb_arg;
req->timeout = true;
@@ -551,6 +554,16 @@
#define nvme_free_request(req) free(req, M_NVME)
+static __inline void
+nvme_request_set_ioq(struct nvme_controller *ctrlr, struct nvme_request *req, int32_t ioq)
+{
+ KASSERT(ioq == NVME_IOQ_DEFAULT || ioq < ctrlr->num_io_queues,
+ ("ioq %d out of range 0..%d", ioq, ctrlr->num_io_queues));
+ if (ioq < 0 || ioq >= ctrlr->num_io_queues)
+ ioq = NVME_IOQ_DEFAULT;
+ req->ioq = ioq;
+}
+
void nvme_notify_async(struct nvme_controller *ctrlr,
const struct nvme_completion *async_cpl,
uint32_t log_page_id, void *log_page_buffer,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 3:29 AM (11 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29613039
Default Alt Text
D54714.1789356586.diff (1 KB)
Attached To
Mode
D54714: nvme: Add ability to override ioq to put the request on
Attached
Detach File
Event Timeline
Log In to Comment