Thread (28 messages) 28 messages, 4 authors, 2018-11-20

Re: [PATCH 05/11] nvmet: Add install_queue callout

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2018-11-19 21:22:03
Also in: linux-block, linux-nvme

quoted
diff --git a/drivers/nvme/target/fabrics-cmd.c 
b/drivers/nvme/target/fabrics-cmd.c
index 1f05d8507e35..a84668e8939c 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -117,6 +117,15 @@ static u16 nvmet_install_queue(struct nvmet_ctrl 
*ctrl, struct nvmet_req *req)
      nvmet_sq_setup(ctrl, req->sq, qid, sqsize + 1,
              !!(c->cattr & NVME_CONNECT_DISABLE_SQFLOW));
what is your code base ? does SQFLOW must for TCP ?
Not really, just happens to sit on top..
quoted
+    if (ctrl->ops->install_queue) {
+        int ret = ctrl->ops->install_queue(req->sq);
+        if (ret) {
+            pr_err("failed to install queue %d cntlid %d ret %d\n",
+                qid, ret, ctrl->cntlid);
+            return NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
I'm not sure regarding the INVALID_PARAM rc.

maybe use NVME_SC_INTERNAL ?
You're right, perhaps we should propagate ->install_queue() status.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help